index.c894643d.js 6.1 KB

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