index-legacy.b1ce3249.js 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. ;(function () {
  2. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  3. try {
  4. var info = gen[key](arg)
  5. var value = info.value
  6. } catch (error) {
  7. reject(error)
  8. return
  9. }
  10. if (info.done) {
  11. resolve(value)
  12. } else {
  13. Promise.resolve(value).then(_next, _throw)
  14. }
  15. }
  16. function _asyncToGenerator(fn) {
  17. return function () {
  18. var self = this,
  19. args = arguments
  20. return new Promise(function (resolve, reject) {
  21. var gen = fn.apply(self, args)
  22. function _next(value) {
  23. asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value)
  24. }
  25. function _throw(err) {
  26. asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err)
  27. }
  28. _next(undefined)
  29. })
  30. }
  31. }
  32. var __vite_style__ = document.createElement('style')
  33. __vite_style__.innerHTML =
  34. '._video-detail_q1sek_1 ._introduction_q1sek_1{color:#7a7a7a;line-height:.61333rem;padding-bottom:.21333rem}._video-detail_q1sek_1 .van-tabs__wrap{margin-bottom:.4rem}._video-detail_q1sek_1 ._wxpopup_q1sek_9{width:100%;height:100vh;position:fixed;top:0;left:0;background:rgba(0,0,0,.5);z-index:9999}._video-detail_q1sek_1 ._wxpopup_q1sek_9 img{width:88%;margin:0 6%}\n'
  35. document.head.appendChild(__vite_style__)
  36. System.register(
  37. [
  38. './icon_discount-legacy.e2eed755.js',
  39. './share-vip-tips-legacy.2d9caa16.js',
  40. './wx_bg-legacy.3b62a53a.js',
  41. './index-legacy.141c974d.js',
  42. './index-legacy.f9759ffc.js',
  43. './index-legacy.34e07a99.js',
  44. './vendor-legacy.09f20d09.js',
  45. './index-legacy.595c24c3.js',
  46. './index-legacy.53480b15.js',
  47. './share-legacy.bdbb3344.js',
  48. './index-legacy.c75fe8a2.js',
  49. './index-legacy.f25f109a.js',
  50. './index-legacy.f25f109a2.js',
  51. './bars-legacy.9085ff9b.js',
  52. './index-legacy.f25f109a4.js',
  53. './icon_teacher-legacy.e765b7f7.js',
  54. './icon_timer2-legacy.b6c78faa.js',
  55. './icon-jiaozi-legacy.dd5ed0e2.js'
  56. ],
  57. function (exports) {
  58. 'use strict'
  59. var __glob_17_0,
  60. __glob_17_1,
  61. __glob_17_2,
  62. __glob_17_3,
  63. __glob_17_5,
  64. __glob_17_4,
  65. __glob_17_6,
  66. CourseVideoItem,
  67. SectionDetail,
  68. UserDetail,
  69. defineComponent,
  70. Dialog,
  71. createVNode,
  72. isVNode,
  73. Button,
  74. createTextVNode,
  75. browser,
  76. state,
  77. postMessage,
  78. request,
  79. ColSticky,
  80. shareCall,
  81. qs
  82. return {
  83. setters: [
  84. function (module) {
  85. __glob_17_0 = module._
  86. __glob_17_1 = module.c
  87. __glob_17_2 = module.d
  88. },
  89. function (module) {
  90. __glob_17_3 = module._
  91. __glob_17_5 = module.a
  92. },
  93. function (module) {
  94. __glob_17_4 = module._
  95. __glob_17_6 = module.a
  96. },
  97. function (module) {
  98. CourseVideoItem = module.C
  99. },
  100. function (module) {
  101. SectionDetail = module.S
  102. },
  103. function (module) {
  104. UserDetail = module.U
  105. },
  106. function (module) {
  107. defineComponent = module.d
  108. Dialog = module.D
  109. createVNode = module.a
  110. isVNode = module.x
  111. Button = module.B
  112. createTextVNode = module.j
  113. },
  114. function (module) {
  115. browser = module.b
  116. state = module.s
  117. postMessage = module.p
  118. request = module.r
  119. },
  120. function (module) {
  121. ColSticky = module.C
  122. },
  123. function (module) {
  124. shareCall = module.s
  125. },
  126. function (module) {
  127. qs = module.q
  128. },
  129. function () {},
  130. function () {},
  131. function () {},
  132. function () {},
  133. function () {},
  134. function () {},
  135. function () {}
  136. ],
  137. execute: function execute() {
  138. var introduction = '_introduction_q1sek_1'
  139. var wxpopup = '_wxpopup_q1sek_9'
  140. var styles = {
  141. 'video-detail': '_video-detail_q1sek_1',
  142. introduction: introduction,
  143. wxpopup: wxpopup
  144. }
  145. function _isSlot(s) {
  146. return (
  147. typeof s === 'function' ||
  148. (Object.prototype.toString.call(s) === '[object Object]' &&
  149. !isVNode(s))
  150. )
  151. }
  152. var getAssetsHomeFile = exports(
  153. 'getAssetsHomeFile',
  154. function (fileName) {
  155. var path = '../images/'.concat(fileName)
  156. var modules = {
  157. '../images/icon-cert.png': __glob_17_0,
  158. '../images/icon_discount.png': __glob_17_1,
  159. '../images/icon_music.png': __glob_17_2,
  160. '../images/music-share-banner.png': __glob_17_3,
  161. '../images/share-banner.png': __glob_17_4,
  162. '../images/share-vip-tips.png': __glob_17_5,
  163. '../images/wx_bg.png': __glob_17_6
  164. }
  165. return modules[path].default
  166. }
  167. )
  168. var index = exports(
  169. 'default',
  170. defineComponent({
  171. name: 'VideoDetail',
  172. data: function data() {
  173. var query = this.$route.query
  174. return {
  175. userInfo: {},
  176. detailList: [],
  177. buyUserList: [], // 购买学生数
  178. dataShow: true, // 判断是否有数据
  179. loading: false,
  180. finished: false,
  181. recomUserId: query.recomUserId, // 分享人编号
  182. params: {
  183. videoLessonGroupId: query.groupId,
  184. page: 1,
  185. rows: 20
  186. },
  187. wxStatus: false
  188. }
  189. },
  190. created: function created() {
  191. if (browser().isApp) {
  192. if (state.platformType === 'STUDENT') {
  193. // 自动跳转到学生端视频课详情购买页
  194. window.location.replace(
  195. ''
  196. .concat(location.origin, '/student/#/videoDetail?')
  197. .concat(qs.stringify(this.$route.query))
  198. ) // 为了处理andoird webview的跳转问题
  199. if (browser().ios) {
  200. window.location.replace(
  201. ''
  202. .concat(location.origin, '/student/#/videoDetail?')
  203. .concat(qs.stringify(this.$route.query))
  204. )
  205. } else {
  206. postMessage({
  207. api: 'openWebView',
  208. content: {
  209. url: ''
  210. .concat(location.origin, '/student/#/videoDetail?')
  211. .concat(qs.stringify(this.$route.query)),
  212. orientation: 1,
  213. isHideTitle: false
  214. }
  215. })
  216. postMessage({ api: 'back' })
  217. } // this.locationReplace(
  218. // `${location.origin}/student/#/videoDetail?${qs.stringify(
  219. // this.$route.query
  220. // )}`
  221. // )
  222. return
  223. } else if (state.platformType === 'TEACHER') {
  224. Dialog.alert({
  225. title: '提示',
  226. message: '请使用酷乐秀学生端扫码打开',
  227. confirmButtonColor: '#01C1B5'
  228. }).then(function () {
  229. postMessage({ api: 'back' })
  230. })
  231. }
  232. } else {
  233. // 如果不在app里面则不需要唤起操作
  234. this.reCall()
  235. }
  236. },
  237. mounted: function mounted() {
  238. var _this = this
  239. return _asyncToGenerator(
  240. /*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
  241. var res, result, _result$videoGroup, lessonGroup, detailList
  242. return regeneratorRuntime.wrap(
  243. function _callee$(_context) {
  244. while (1) {
  245. switch ((_context.prev = _context.next)) {
  246. case 0:
  247. _context.prev = 0
  248. _context.next = 3
  249. return request.post(
  250. '/api-teacher/open/videoShareProfit',
  251. {
  252. data: {
  253. bizId: _this.params.videoLessonGroupId,
  254. userId: _this.recomUserId
  255. }
  256. }
  257. )
  258. case 3:
  259. res = _context.sent
  260. result = res.data || {}
  261. ;(_result$videoGroup = result.videoGroup),
  262. (lessonGroup = _result$videoGroup.lessonGroup),
  263. (detailList = _result$videoGroup.detailList)
  264. _this.userInfo = {
  265. username: result.name,
  266. headUrl: result.avatar,
  267. buyNum: lessonGroup.countStudent,
  268. lessonNum: lessonGroup.lessonCount,
  269. lessonName: lessonGroup.lessonName,
  270. lessonDesc: lessonGroup.lessonDesc,
  271. lessonPrice: lessonGroup.lessonPrice,
  272. lessonCoverUrl: lessonGroup.lessonCoverUrl
  273. }
  274. _this.detailList = detailList || []
  275. _context.next = 12
  276. break
  277. case 10:
  278. _context.prev = 10
  279. _context.t0 = _context['catch'](0)
  280. case 12:
  281. case 'end':
  282. return _context.stop()
  283. }
  284. }
  285. },
  286. _callee,
  287. null,
  288. [[0, 10]]
  289. )
  290. })
  291. )()
  292. },
  293. methods: {
  294. locationReplace: function locationReplace(url) {
  295. // alert(url)
  296. if (history.replaceState) {
  297. history.replaceState(null, document.title, url)
  298. window.location.reload()
  299. } else {
  300. location.replace(url)
  301. }
  302. },
  303. reCall: function reCall() {
  304. var _location = location,
  305. origin = _location.origin
  306. var str = origin + '/student/#/videoDetail'
  307. var params = this.$route.query
  308. str += '?recomUserId='
  309. .concat(this.recomUserId, '&groupId=')
  310. .concat(params.groupId)
  311. console.log(str)
  312. shareCall(str, {})
  313. },
  314. onShare: function onShare() {
  315. if (browser().weixin) {
  316. this.wxStatus = true
  317. return
  318. }
  319. this.reCall()
  320. setTimeout(function () {
  321. window.location.href =
  322. location.origin + '/student/#/download'
  323. }, 3000)
  324. }
  325. },
  326. render: function render() {
  327. var _this2 = this
  328. var _slot
  329. return createVNode(
  330. 'div',
  331. { class: [styles['video-detail'], 'mb12'] },
  332. [
  333. createVNode(
  334. UserDetail,
  335. { userInfo: this.userInfo, showBuy: false },
  336. null
  337. ),
  338. createVNode(
  339. SectionDetail,
  340. { border: true },
  341. {
  342. default: function _default() {
  343. return [
  344. createVNode('p', { class: styles.introduction }, [
  345. _this2.userInfo.lessonDesc
  346. ])
  347. ]
  348. }
  349. }
  350. ),
  351. createVNode(
  352. SectionDetail,
  353. {
  354. title: '课程列表',
  355. icon: 'courseList',
  356. contentStyle: { paddingTop: '0' }
  357. },
  358. _isSlot(
  359. (_slot = this.detailList.map(function (item) {
  360. return createVNode(
  361. CourseVideoItem,
  362. {
  363. class: 'mb12',
  364. detail: {
  365. id: item.id,
  366. title: item.videoTitle,
  367. content: item.videoContent,
  368. imgUrl: item.coverUrl
  369. }
  370. },
  371. null
  372. )
  373. }))
  374. )
  375. ? _slot
  376. : {
  377. default: function _default() {
  378. return [_slot]
  379. }
  380. }
  381. ),
  382. createVNode(
  383. ColSticky,
  384. { position: 'bottom' },
  385. {
  386. default: function _default() {
  387. return [
  388. createVNode(
  389. 'div',
  390. {
  391. class: ['btnGroup'],
  392. style: { paddingTop: '12px' }
  393. },
  394. [
  395. createVNode(
  396. Button,
  397. {
  398. block: true,
  399. round: true,
  400. type: 'primary',
  401. onClick: _this2.onShare
  402. },
  403. {
  404. default: function _default() {
  405. return [
  406. createTextVNode(
  407. '\u4E0B\u8F7D\u9177\u4E50\u79C0\u8FDB\u5165\u8BFE\u7A0B'
  408. )
  409. ]
  410. }
  411. }
  412. )
  413. ]
  414. )
  415. ]
  416. }
  417. }
  418. ),
  419. this.wxStatus &&
  420. createVNode(
  421. 'div',
  422. {
  423. class: styles.wxpopup,
  424. onClick: function onClick() {
  425. _this2.wxStatus = false
  426. }
  427. },
  428. [
  429. createVNode(
  430. 'img',
  431. { src: getAssetsHomeFile('wx_bg.png'), alt: '' },
  432. null
  433. )
  434. ]
  435. )
  436. ]
  437. )
  438. }
  439. })
  440. )
  441. }
  442. }
  443. }
  444. )
  445. })()