index.09374f7b.js 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. import { d as u, a as e, j as i, C as r, B as n } from './vendor.3506a68e.js'
  2. /* empty css */ import { q as d } from './index.339fc024.js'
  3. import { r as a, i as m, b as l, p as h } from './index.9e4b607f.js'
  4. import { i as p, a as _, b } from './icon_discount.202ead11.js'
  5. import { I as g } from './icon_teacher.cb128c00.js'
  6. const v = '_musicShare_bcot3_1',
  7. y = '_header_bcot3_5',
  8. F = '_btnMore_bcot3_23',
  9. I = '_section_bcot3_29',
  10. E = '_music_bcot3_1',
  11. f = '_discount_bcot3_56',
  12. A = '_shareTeacher_bcot3_61',
  13. C = '_teacherImg_bcot3_69',
  14. D = '_recommend_bcot3_75',
  15. T = '_img_bcot3_81',
  16. S = '_name_bcot3_86',
  17. B = '_titleTips_bcot3_91'
  18. var t = {
  19. musicShare: v,
  20. header: y,
  21. btnMore: F,
  22. section: I,
  23. music: E,
  24. discount: f,
  25. shareTeacher: A,
  26. teacherImg: C,
  27. recommend: D,
  28. img: T,
  29. name: S,
  30. titleTips: B
  31. },
  32. w = u({
  33. name: 'share-music-sheet',
  34. data() {
  35. const s = this.$route.query
  36. return {
  37. id: s.id,
  38. recomUserId: s.recomUserId,
  39. activityId: s.activityId || 0,
  40. discounts: 0,
  41. musicSheet: {},
  42. teacherName: ''
  43. }
  44. },
  45. async mounted() {
  46. try {
  47. const s = await a.post('/api-teacher/open/musicShareProfit', {
  48. data: { bizId: this.id, userId: this.recomUserId }
  49. })
  50. if (
  51. ((this.musicSheet = s.data.musicSheet || {}),
  52. (this.teacherName = s.data.name || ''),
  53. this.activityId)
  54. ) {
  55. const c = await a.post(
  56. `/api-student/open/activity/state/${this.activityId}`,
  57. { data: {} }
  58. )
  59. this.discounts = c.data.check || 0
  60. }
  61. } catch {}
  62. this.onDetail()
  63. },
  64. methods: {
  65. onDetail() {
  66. const s = m(),
  67. c = l(),
  68. o = d.stringifyUrl({
  69. url: location.origin + '/accompany',
  70. query: {
  71. id: this.id,
  72. recomUserId: this.recomUserId,
  73. activityId: this.activityId,
  74. discounts: this.discounts,
  75. client: c.isTeacher ? 'teacher' : 'student',
  76. behaviorId: s
  77. }
  78. })
  79. h({
  80. api: 'openAccompanyWebView',
  81. content: {
  82. url: o,
  83. orientation: 0,
  84. isHideTitle: !0,
  85. statusBarTextColor: !1,
  86. isOpenLight: !0
  87. }
  88. })
  89. }
  90. },
  91. render() {
  92. return e('div', { class: t.musicShare }, [
  93. e('div', { class: t.header }, [
  94. e('h2', null, [
  95. i('\u79D1\u5B66\u7684\u7EC3\u4E60\u6709\u52A9'),
  96. e('br', null, null),
  97. i('\u4E8E\u6C34\u5E73\u5FEB\u901F\u63D0\u5347')
  98. ]),
  99. e('p', null, [
  100. i(
  101. '\u4F60\u7684\u6C34\u5E73\u4E00\u5B9A\u80FD\u9A7E\u9A6D\u8FD9\u9996\u66F2\u5B50\uFF01'
  102. )
  103. ])
  104. ]),
  105. e('div', { class: t.section }, [
  106. e('div', { class: t.music }, [
  107. e('img', { src: p }, null),
  108. e('div', null, [
  109. e('h2', null, [this.musicSheet.musicSheetName]),
  110. e('p', null, [
  111. i('\u4F5C\u66F2\u4EBA: '),
  112. this.musicSheet.composer
  113. ]),
  114. this.discounts == 1 &&
  115. e('img', { src: _, class: t.discount }, null)
  116. ])
  117. ]),
  118. e(
  119. r,
  120. { center: !0, border: !1, class: t.shareTeacher },
  121. {
  122. icon: () =>
  123. e('div', { class: t.teacherImg }, [
  124. e(
  125. 'img',
  126. {
  127. src: this.musicSheet.avatar || g,
  128. class: t.img,
  129. style: { objectFit: 'cover' },
  130. crossorigin: 'anonymous'
  131. },
  132. null
  133. ),
  134. e('img', { class: t.recommend, src: b }, null)
  135. ]),
  136. title: () =>
  137. e('div', null, [
  138. e('p', { class: t.name }, [
  139. i(
  140. '\u8FD9\u4E2A\u66F2\u5B50\u633A\u4E0D\u9519\uFF01\u63A8\u8350\u7ED9\u4F60\uFF5E'
  141. )
  142. ]),
  143. e('p', { class: t.titleTips }, [
  144. e('span', null, [this.teacherName]),
  145. i(' \u8001\u5E08\u4E3A\u60A8\u63A8\u8350')
  146. ])
  147. ])
  148. }
  149. )
  150. ]),
  151. e(
  152. 'div',
  153. {
  154. class: ['btnGroup'],
  155. style: { paddingTop: '60px', margin: '0 28px' }
  156. },
  157. [
  158. e(
  159. n,
  160. {
  161. block: !0,
  162. round: !0,
  163. type: 'primary',
  164. onClick: this.onDetail,
  165. class: t.btnMore,
  166. color: 'linear-gradient(180deg, #59E5D5 0%, #01C1B5 100%)'
  167. },
  168. {
  169. default: () => [
  170. i(
  171. '\u6253\u5361\u5C0F\u9177Ai\u5F00\u59CB\u7EC3\u4E60\u5427\uFF01'
  172. )
  173. ]
  174. }
  175. )
  176. ]
  177. )
  178. ])
  179. }
  180. })
  181. export { w as default }