index.4f366f9f.js 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. import { _ as f, c as _, d as g } from './icon_discount.202ead11.js'
  2. import { _ as h, a as b } from './share-vip-tips.975e41da.js'
  3. import { _ as v, a as w } from './wx_bg.5eddda0b.js'
  4. import { C as x } from './index.9169d438.js'
  5. import { S as d } from './index.2778830d.js'
  6. import { U as I } from './index.fdb44d83.js'
  7. import { C as j } from './index.e311a214.js'
  8. import { b as n, s as m, p as l, r as y } from './index.9e4b607f.js'
  9. import {
  10. d as D,
  11. g as i,
  12. D as T,
  13. a as o,
  14. B as C,
  15. j as $
  16. } from './vendor.3506a68e.js'
  17. import { s as S } from './share.622205d9.js'
  18. import { q as p } from './index.339fc024.js'
  19. import './index.f15b595a.js'
  20. /* empty css */ /* empty css */ /* empty css */ import './icon_teacher.cb128c00.js'
  21. import './icon_timer2.5fb1750d.js'
  22. import './icon-jiaozi.20e415ca.js'
  23. const U = '_introduction_1vd6e_1',
  24. H = '_wxpopup_1vd6e_9'
  25. var u = { 'live-detail': '_live-detail_1vd6e_1', introduction: U, wxpopup: H }
  26. const N = e => {
  27. const s = `../images/${e}`
  28. return {
  29. '../images/icon-cert.png': f,
  30. '../images/icon_discount.png': _,
  31. '../images/icon_music.png': g,
  32. '../images/music-share-banner.png': h,
  33. '../images/share-banner.png': v,
  34. '../images/share-vip-tips.png': b,
  35. '../images/wx_bg.png': w
  36. }[s].default
  37. }
  38. var Q = D({
  39. name: 'LiveDetail',
  40. data() {
  41. const e = this.$route.query
  42. return {
  43. recomUserId: e.recomUserId,
  44. groupId: e.groupId,
  45. live: {},
  46. wxStatus: !1
  47. }
  48. },
  49. computed: {
  50. userInfo() {
  51. var a, c
  52. const e = this.live,
  53. s = e.planList || [],
  54. t = ((a = s[0]) == null ? void 0 : a.startTime) || new Date(),
  55. r = ((c = s[0]) == null ? void 0 : c.endTime) || new Date()
  56. return {
  57. headUrl: e.avatar,
  58. username: e.userName,
  59. id: e.teacherId,
  60. startTime:
  61. `${i(t).format('YYYY-MM-DD')} ${i(t).format('HH:mm')}~${i(r).format(
  62. 'HH:mm'
  63. )}` || '',
  64. lessonPrice: e.coursePrice,
  65. buyNum: e.studentCount || 0,
  66. lessonNum: e.courseNum || 0,
  67. lessonDesc: e.courseIntroduce,
  68. lessonCoverUrl: e.backgroundPic || e.backgroundPicTemplate,
  69. lessonName: e.courseGroupName,
  70. auditVersion: 0
  71. }
  72. },
  73. courseInfo() {
  74. const e = []
  75. return (
  76. (this.live.planList || []).forEach(t => {
  77. const r = t.startTime || new Date(),
  78. a = t.endTime || new Date()
  79. e.push({
  80. courseTime: `${i(r).format('YYYY-MM-DD')} ${i(r).format(
  81. 'HH:mm'
  82. )}~${i(a).format('HH:mm')}`,
  83. coursePlan: t.plan,
  84. roomUid: t.roomUid,
  85. liveState: t.liveState,
  86. id: t.courseId
  87. })
  88. }),
  89. e || []
  90. )
  91. }
  92. },
  93. created() {
  94. n().isApp
  95. ? m.platformType === 'STUDENT'
  96. ? n().ios
  97. ? window.location.replace(
  98. `${location.origin}/student/#/liveDetail??${p.stringify(
  99. this.$route.query
  100. )}`
  101. )
  102. : (l({
  103. api: 'openWebView',
  104. content: {
  105. url: `${location.origin}/student/#/liveDetail??${p.stringify(
  106. this.$route.query
  107. )}`,
  108. orientation: 1,
  109. isHideTitle: !1
  110. }
  111. }),
  112. l({ api: 'back' }))
  113. : m.platformType === 'TEACHER' &&
  114. T.alert({
  115. title: '\u63D0\u793A',
  116. message:
  117. '\u8BF7\u4F7F\u7528\u9177\u4E50\u79C0\u5B66\u751F\u7AEF\u626B\u7801\u6253\u5F00',
  118. confirmButtonColor: '#01C1B5'
  119. }).then(() => {
  120. l({ api: 'back' })
  121. })
  122. : this.reCall()
  123. },
  124. async mounted() {
  125. try {
  126. const e = await y.post('/api-teacher/open/liveShareProfit', {
  127. data: { bizId: this.groupId, userId: this.recomUserId }
  128. })
  129. this.live = e.data.liveCourseGroup || {}
  130. } catch {}
  131. },
  132. methods: {
  133. locationReplace(e) {
  134. history.replaceState
  135. ? (history.replaceState(null, document.title, e),
  136. window.location.reload())
  137. : location.replace(e)
  138. },
  139. reCall() {
  140. const { origin: e } = location
  141. let s = e + '/student/#/liveDetail'
  142. const t = this.$route.query
  143. ;(s += `?recomUserId=${this.recomUserId}&groupId=${t.groupId}`), S(s, {})
  144. },
  145. onShare() {
  146. if (n().weixin) {
  147. this.wxStatus = !0
  148. return
  149. }
  150. this.reCall(),
  151. setTimeout(() => {
  152. window.location.href = location.origin + '/student/#/download'
  153. }, 3e3)
  154. }
  155. },
  156. render() {
  157. return o('div', { class: [u['live-detail'], 'mb12'] }, [
  158. o(I, { userInfo: this.userInfo, showBuy: !1 }, null),
  159. o(
  160. d,
  161. { border: !0 },
  162. {
  163. default: () => [
  164. o('p', { class: u.introduction }, [this.userInfo.lessonDesc])
  165. ]
  166. }
  167. ),
  168. o(
  169. d,
  170. { title: '\u8BFE\u7A0B\u5217\u8868', icon: 'courseList', border: !0 },
  171. { default: () => [o(x, { courseInfo: this.courseInfo }, null)] }
  172. ),
  173. o(
  174. j,
  175. { position: 'bottom' },
  176. {
  177. default: () => [
  178. o('div', { class: ['btnGroup'], style: { paddingTop: '12px' } }, [
  179. o(
  180. C,
  181. {
  182. block: !0,
  183. round: !0,
  184. type: 'primary',
  185. onClick: this.onShare
  186. },
  187. {
  188. default: () => [
  189. $('\u4E0B\u8F7D\u9177\u4E50\u79C0\u8FDB\u5165\u8BFE\u7A0B')
  190. ]
  191. }
  192. )
  193. ])
  194. ]
  195. }
  196. ),
  197. this.wxStatus &&
  198. o(
  199. 'div',
  200. {
  201. class: u.wxpopup,
  202. onClick: () => {
  203. this.wxStatus = !1
  204. }
  205. },
  206. [o('img', { src: N('wx_bg.png'), alt: '' }, null)]
  207. )
  208. ])
  209. }
  210. })
  211. export { Q as default, N as getAssetsHomeFile }