works.js 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762
  1. import httpRequestApi from '../../../utils/APIClient';
  2. import {
  3. formatDate
  4. } from '../../../utils/util';
  5. import {
  6. getOpenidNoLogin
  7. } from '../../../utils/httpUtilNoLogin';
  8. import {
  9. getOpenidSessionKey
  10. } from '../../../utils/httpUtil';
  11. const app = getApp()
  12. Page({
  13. data: {
  14. fullScreenBtn: false,
  15. playBtn: true,
  16. gesture: false,
  17. author: '',
  18. videoSrc: '',
  19. total: '',
  20. authorAvatar: '',
  21. user: [],
  22. inputValue: '',
  23. inputSBValue: '',
  24. replyList: [],
  25. howMuch: '200',
  26. moneySelect: 'moneySelect',
  27. moneyNormal: 'moneyNormal',
  28. ifReward: false,
  29. id: '',
  30. path: '',
  31. replyModal: false,
  32. totalRead: 0,
  33. pageNo: 1,
  34. pageSize: 3,
  35. goBackHome: false,
  36. isIOS: app.globalData.isIOS,
  37. alertFlag: false,
  38. modalType: "text",
  39. noScroll: '',
  40. modalText: [{
  41. text: '您还不是本课程的会员',
  42. type: 'bigOrange'
  43. },
  44. {
  45. text: '您可以开团,拼团成功获得使用权',
  46. type: 'normal'
  47. }
  48. ],
  49. modalBtnText: '去开团',
  50. isModalShow: false,
  51. modalCloseShow: true,
  52. hide: true,
  53. addComeOut: '',
  54. flowerNum: '6'
  55. // shareFlag: false
  56. },
  57. showAlert: function () {
  58. this.setData({
  59. alertFlag: !this.data.alertFlag
  60. })
  61. },
  62. onLoad: function (option) {
  63. console.log(option)
  64. console.log(option.flowerCount)
  65. console.log(option.flowerCount === 0)
  66. if (option.flowerCount) {
  67. this.setData({
  68. fromReading: true
  69. })
  70. this.flowerAnimationHandler();
  71. // setTimeout(() => {
  72. // this.openShare();
  73. // }, 300)
  74. if (option.flowerCount > 0) {
  75. this.setData({
  76. flowerNum: option.flowerCount
  77. })
  78. }
  79. }
  80. // getOpenidNoLogin
  81. getOpenidNoLogin((res) => {
  82. let id = option.id ? option.id : option.scene.replace('QR', '')
  83. if (option.scene || option.shareCard) {
  84. this.setData({
  85. goBackHome: true
  86. })
  87. }
  88. // wx.setNavigationBarTitle({
  89. // title: option.title //页面标题为路由参数
  90. // })
  91. this.uid = wx.getStorageSync('uid');
  92. let stackSize = 1;
  93. if (option.stackSize) {
  94. stackSize = option.stackSize;
  95. }
  96. this.setData({
  97. // title: option.title,
  98. id,
  99. myUid: this.uid,
  100. stackSize
  101. },()=>{
  102. this.getWorks(this.uid, id);
  103. })
  104. }, (error) => {
  105. wx.setStorageSync('userSourseType','reading')
  106. // this.setData({
  107. // hide: !this.data.hide,
  108. // onLoadOption: option
  109. // })
  110. return;
  111. });
  112. },
  113. onHide: function () {
  114. // this.data.stackSize >= 2
  115. console.log('hide')
  116. if (this.innerAudioContext) {
  117. console.log('音频应该被暂停')
  118. this.innerAudioContext.pause();
  119. }
  120. // this.videoCtx = null
  121. },
  122. onUnload: function () {
  123. console.log(this.data.productId)
  124. if (this.videoPlayTime) {
  125. const data = {
  126. "title": this.data.title,
  127. "lessonId": this.data.classId,
  128. "productId": this.data.productId,
  129. "playStopTime": Math.ceil(this.videoPlayTime),
  130. "userReadId": this.data.userReadId,
  131. "type": 'READ',
  132. }
  133. httpRequestApi.playLogReport(data).success(res => {
  134. console.log(res)
  135. })
  136. }
  137. if (this.innerAudioContext) {
  138. this.innerAudioContext.destroy();
  139. }
  140. this.videoCtx = null
  141. // let videoCtx = wx.createVideoContext('worksVideo', this);
  142. // videoCtx.stop();
  143. },
  144. getWorks: function (uid, id) {
  145. httpRequestApi.getWorksDetail(uid, id, this.data.goBackHome ? 'READ_SHARE' : '').success((res) => {
  146. const others = res.data.data.otherRead;
  147. const author = res.data.data.user;
  148. const works = res.data.data.userRead;
  149. wx.setNavigationBarTitle({
  150. title: works.title //页面标题为路由参数
  151. })
  152. const othersTemp = [];
  153. others.forEach((item) => {
  154. const temp = {};
  155. temp.uid = item.userRead.id;
  156. temp.title = item.userRead.title;
  157. temp.image = item.user.avatar;
  158. temp.nickName = item.user.wechatName;
  159. othersTemp.push(temp);
  160. });
  161. this.setData({
  162. user: othersTemp,
  163. totalRead: res.data.data.totalRead,
  164. author: author.wechatName,
  165. authorAvatar: author.avatar,
  166. authorProfession: author.profession,
  167. authorUid: author.uid,
  168. videoSrc: works.originVideo,
  169. audioSrc: works.audioPath,
  170. iconImg: works.iconImg,
  171. classId: works.lessonId,
  172. isLike: res.data.data.isLike,
  173. isFans: res.data.data.isFans,
  174. title: works.title,
  175. userReadId: works.id
  176. })
  177. httpRequestApi.checkLesson(works.lessonId).success(res => {
  178. const productId = res.data.data[0];
  179. this.setData({
  180. productId: productId
  181. })
  182. });
  183. // 设置音频路径
  184. this.innerAudioContext = wx.createInnerAudioContext();
  185. this.innerAudioContext.onPause((res) => {
  186. // 播放音频失败的回调
  187. console.log('音频暂停')
  188. })
  189. this.innerAudioContext.src = this.data.audioSrc; // 这里可以是录音的临时路径
  190. if(this.data.fromReading){
  191. setTimeout(()=>{
  192. this.openShare()
  193. })
  194. }
  195. });
  196. },
  197. onShow() {
  198. if(this.data.myUid){
  199. this.setData({
  200. replyList: [],
  201. pageNo: 1,
  202. pageSize: 2
  203. }, () => {
  204. this.getReply();
  205. })
  206. }
  207. },
  208. videoPlayHandler: function () {
  209. this.setData({
  210. videoLoad: true
  211. }, () => {
  212. this.videoCtx = wx.createVideoContext('worksVideo', this);
  213. debugger
  214. this.videoCtx.play();
  215. })
  216. },
  217. likeWorks: function (e) {
  218. // + 1 + 1的动画
  219. this.setData({
  220. addComeOut: 'add-one-come-out'
  221. // isLike: true
  222. })
  223. setTimeout(() => {
  224. if (this.data.addComeOut) {
  225. this.setData({
  226. addComeOut: ''
  227. })
  228. }
  229. }, 1100)
  230. // 恭喜获得x朵小红花
  231. if (this.data.isLike) {
  232. // wx.showToast({
  233. // title: '不要重复点赞哦',
  234. // icon: 'fail',
  235. // duration: 1000
  236. // })
  237. return;
  238. }
  239. httpRequestApi.likeWorks(this.uid, this.data.id).success(res => {
  240. this.setData({
  241. isLike: true,
  242. flowerNum: res.data.count
  243. }, () => {
  244. if (res.data.count > 0) {
  245. this.flowerAnimationHandler();
  246. }
  247. });
  248. })
  249. },
  250. // 弹出分享框
  251. openShare: function (e) {
  252. console.log(this.data.authorAvatar)
  253. console.log(this.data.author)
  254. console.log(this.data.iconImg)
  255. console.log(this.data.title)
  256. console.log(this.data.id)
  257. if (this.data.authorAvatar && this.data.author && this.data.iconImg && this.data.title && this.data.id) {
  258. this.shareDialog = this.selectComponent("#share-dialog");
  259. const data = {
  260. avatar: this.data.authorAvatar,
  261. author: this.data.author,
  262. iconImg: this.data.iconImg,
  263. title: this.data.title,
  264. path: `pages/social/works/works`,
  265. scene: this.data.id,
  266. productId: this.data.productId
  267. // tip: this.data.tip,
  268. }
  269. // console.log(data)
  270. this.setData({
  271. noScroll: 'noScroll'
  272. })
  273. this.shareDialog.share(data);
  274. }
  275. },
  276. // 分享框关闭
  277. shareDialogClose: function (e) {
  278. this.setData({
  279. noScroll: ''
  280. })
  281. },
  282. videoPlay: function () {
  283. // 视频开始 先结束 再开始
  284. // this.innerAudioContext.play();
  285. // this.innerAudioContext.pause();
  286. // wx.showToast({
  287. // title: '加载中',
  288. // icon: 'loading',
  289. // duration: 600
  290. // })
  291. // setTimeout(() => {
  292. this.innerAudioContext.play();
  293. // }, 800)
  294. // httpRequestApi.playWorks(this.uid, this.data.id).success(() => {
  295. // console.log('容个错')
  296. // });
  297. },
  298. // 视频播放完毕销毁录音
  299. videoEnd: function (e) {
  300. console.log(e)
  301. this.innerAudioContext.stop();
  302. },
  303. videoPause: function () {
  304. console.log('视频暂停')
  305. this.innerAudioContext.pause();
  306. },
  307. videoWaiting: function () {
  308. console.log('视频缓冲')
  309. this.innerAudioContext.pause();
  310. },
  311. videoProgress: function (e) {
  312. if (e.detail.buffered <= 10) {
  313. this.innerAudioContext.pause();
  314. } else {
  315. this.innerAudioContext.play();
  316. }
  317. },
  318. videoTimeupdate: function (e) {
  319. this.videoPlayTime = e.detail.currentTime
  320. if (e.detail.currentTime - this.innerAudioContext.currentTime >= 1) {
  321. this.innerAudioContext.seek(e.detail.currentTime - 0.1);
  322. }
  323. },
  324. goToReading: function () {
  325. const classId = this.data.classId;
  326. getOpenidSessionKey((res) => {
  327. httpRequestApi.areYouSuper(this.data.productId).success(res => {
  328. if (res.data.success) {
  329. wx.authorize({
  330. scope: 'scope.record',
  331. success () {
  332. // 用户已经同意小程序使用录音功能,后续调用 wx.startRecord 接口不会弹窗询问
  333. console.log('成功')
  334. wx.navigateTo({
  335. url: `../../main/reading/reading?id=${classId}`
  336. })
  337. },
  338. fail () {
  339. wx.showModal({
  340. title: '无法开启您的录音权限',
  341. content: '点击右上角浮点按钮->设置,进行授权',
  342. confirmText: '我知道了',
  343. showCancel: false,
  344. success(res) {
  345. console.log('用户点击确定')
  346. dialogFlag = false;
  347. }
  348. })
  349. }
  350. })
  351. } else {
  352. // ios用户 并且没有购买过此书
  353. // if (this.data.isIOS) {
  354. // wx.showModal({
  355. // title: '暂不支持',
  356. // content: '十分抱歉,由于相关规定,您暂时无法在这里朗读',
  357. // success(res) {
  358. // if (res.confirm) {
  359. // console.log('用户点击确定')
  360. // } else if (res.cancel) {
  361. // console.log('用户点击取消')
  362. // }
  363. // }
  364. // })
  365. // return;
  366. // }
  367. console.log('chulaiba')
  368. this.setData({
  369. isModalShow: true
  370. })
  371. // wx.showModal({
  372. // title: '您未购买过本书,不能朗读',
  373. // content: '超值团购进行中,快去看看',
  374. // success(res) {
  375. // if (res.confirm) {
  376. // console.log('用户点击确定')
  377. // wx.navigateTo({
  378. // url: `../../groupPage/grade-details/grade-details?productId=${productId}`
  379. // })
  380. // } else if (res.cancel) {
  381. // console.log('用户点击取消')
  382. // }
  383. // }
  384. // })
  385. }
  386. })
  387. }, (error) => {
  388. this.setData({
  389. hide: !this.data.hide
  390. })
  391. if (this.innerAudioContext && this.videoCtx) {
  392. this.videoCtx.stop();
  393. this.innerAudioContext.pause();
  394. console.log('关闭音频')
  395. }
  396. return;
  397. });
  398. },
  399. onShareAppMessage: function () {
  400. console.log(this.data.productId);
  401. const data = {
  402. shareTypeEnum: 'LINK',
  403. shareContentEnum: 'READ',
  404. productId: this.data.productId
  405. }
  406. httpRequestApi.shareRecord(data).success((res) => {
  407. console.log(res)
  408. })
  409. return {
  410. title: '一样的课文,不一样的味道!我的配音表演已开始,求各位大咖围观、点评!',
  411. path: `pages/social/works/works?id=${this.data.id}&title=${this.data.title}&shareCard=true`,
  412. imageUrl: `https://efunbox.lingjiao.cn/reader/resource/share/read_${this.data.productId}.jpg`,
  413. }
  414. },
  415. follow: function () {
  416. let followUid = this.data.authorUid;
  417. if (this.data.isFans) {
  418. httpRequestApi.cancerFollow(this.uid, followUid).success((res) => {
  419. this.setData({
  420. isFans: false
  421. })
  422. wx.showToast({
  423. title: '取消关注',
  424. icon: 'success',
  425. duration: 1000
  426. })
  427. });
  428. } else {
  429. httpRequestApi.followUser(this.uid, followUid).success((res) => {
  430. this.setData({
  431. isFans: true
  432. })
  433. wx.showToast({
  434. title: '关注啦',
  435. icon: 'success',
  436. duration: 1000
  437. })
  438. });
  439. }
  440. },
  441. // 点赞评论
  442. likeCommend: function (e) {
  443. console.log(e);
  444. // let uid = wx.getStorageSync('uid');
  445. let followUid = e.currentTarget.dataset.id;
  446. let index = e.currentTarget.dataset.index;
  447. httpRequestApi.likeCommend(this.uid, followUid).success(res => {
  448. console.log(res);
  449. const str = `replyList[${index}].likes`;
  450. const strImg = `replyList[${index}].isLike`;
  451. this.setData({
  452. [str]: res.data.data.favors,
  453. [strImg]: true
  454. })
  455. });
  456. },
  457. // 去用户主页
  458. goToUsers: function (e) {
  459. let uid = e.currentTarget.dataset.uid;
  460. wx.navigateTo({
  461. url: `../../user/myworks/myworks?uid=${uid}`
  462. });
  463. },
  464. // 去其他用户的作品页
  465. goToOthers: function (e) {
  466. this.data.stackSize++;
  467. console.log(this.data.stackSize)
  468. if (this.data.stackSize >= 3) {
  469. console.log('跳转', this.data.stackSize)
  470. wx.redirectTo({
  471. url: `../../social/works/works?id=${e.currentTarget.dataset.uid}&title=${e.currentTarget.dataset.title}&stackSize=${this.data.stackSize}`
  472. })
  473. } else {
  474. console.log('下一个页面', this.data.stackSize)
  475. wx.navigateTo({
  476. url: `../../social/works/works?id=${e.currentTarget.dataset.uid}&title=${e.currentTarget.dataset.title}&stackSize=${this.data.stackSize}`
  477. })
  478. }
  479. },
  480. // 查询回复
  481. getReply: function () {
  482. // let uid = wx.getStorageSync('uid');
  483. let columnId = this.data.id;
  484. let pageNo = this.data.pageNo;
  485. let pageSize = this.data.pageSize;
  486. httpRequestApi.getReply(this.uid, columnId, pageNo, pageSize).success((res) => {
  487. const replyList = res.data.data.list;
  488. // const replyTemp = [];
  489. replyList.forEach((item) => {
  490. const temp = {};
  491. temp.nickName = item.user.wechatName;
  492. temp.avatar = item.user.avatar;
  493. temp.profession = item.user.profession;
  494. temp.uid = item.user.uid;
  495. // temp.text = decodeURI(item.detailDesc);
  496. temp.text = item.detailDesc;
  497. temp.id = item.id;
  498. temp.replyCount = item.replyCount;
  499. temp.time = formatDate(item.gmtCreated, 3);
  500. temp.likes = item.postsAttributeInfo.favors || 0;
  501. temp.isLike = item.isLike;
  502. this.data.replyList.push(temp);
  503. });
  504. this.setData({
  505. replyList: this.data.replyList,
  506. total: res.data.data.totalSize,
  507. totalPage: res.data.data.totalNo
  508. })
  509. });
  510. },
  511. // 打开回复详情页
  512. goToDetail: function (e) {
  513. let id = e.currentTarget.dataset.id;
  514. // let count = e.currentTarget.dataset.count;
  515. wx.navigateTo({
  516. url: `../../social/replyDetail/replyDetail?id=${id}&productId=${this.data.productId}`
  517. })
  518. },
  519. // 绑定输入框内容
  520. inputValue: function (e) {
  521. this.setData({
  522. inputValue: e.detail.value
  523. });
  524. },
  525. // 发布回复
  526. sendHandler: function () {
  527. console.log(this.data.productId)
  528. if (this.data.inputValue !== '') {
  529. // let uid = wx.getStorageSync('uid');
  530. let data = {
  531. "columnId": this.data.id,
  532. colunmNames: 'what',
  533. // "detailDesc": encodeURI(this.data.inputValue)
  534. "detailDesc": this.data.inputValue,
  535. productId: this.data.productId
  536. }
  537. httpRequestApi.postReply(this.uid, data).success(res => {
  538. console.log(res)
  539. this.setData({
  540. inputValue: '',
  541. pageNo: 1,
  542. replyList: [],
  543. flowerNum: res.data.count
  544. })
  545. this.getReply();
  546. if (res.data.count > 0) {
  547. this.flowerAnimationHandler();
  548. }
  549. });
  550. // 评论成功后刷新数据
  551. }
  552. },
  553. flowerAnimationHandler: function () {
  554. this.flowerBox = this.selectComponent("#flower-box");
  555. this.flowerBox.comeOut();
  556. },
  557. // 触底加载
  558. onReachBottom: function () {
  559. // 当前在推荐页面 加载推荐
  560. if (this.data.pageNo <= this.data.totalPage) {
  561. this.setData({
  562. pageNo: this.data.pageNo + 1
  563. }, () => {
  564. this.getReply();
  565. })
  566. }
  567. },
  568. // 设置点击时的id
  569. setSBId: function (e) {
  570. this.setData({
  571. replySBId: e.currentTarget.dataset.id,
  572. replyModal: true,
  573. replyIndex: e.currentTarget.dataset.index
  574. })
  575. },
  576. // 回复某个评论
  577. replySB: function () {
  578. const data = {
  579. postsId: this.data.replySBId,
  580. content: this.data.inputSBValue,
  581. productId: this.data.productId
  582. }
  583. httpRequestApi.postReplyComment(this.uid, data).success(res => {
  584. const replyWho = this.data.replyList[this.data.replyIndex];
  585. const indexStr = `replyList[${this.data.replyIndex}]`;
  586. replyWho.replyCount++;
  587. this.setData({
  588. replyModal: false,
  589. [indexStr]: replyWho
  590. })
  591. });
  592. },
  593. // 获取回复楼中楼的内容
  594. inputSBValue: function (e) {
  595. this.setData({
  596. inputSBValue: e.detail.value
  597. });
  598. },
  599. // 选择金额
  600. setMoney: function (e) {
  601. this.setData({
  602. howMuch: e.currentTarget.dataset.money
  603. })
  604. },
  605. reward: function () {
  606. if (this.data.isIOS) {
  607. return
  608. };
  609. this.setData({
  610. ifReward: true
  611. })
  612. },
  613. quitReward: function () {
  614. this.setData({
  615. ifReward: false
  616. })
  617. },
  618. // 奖励
  619. rewardMoney: function () {
  620. const data = {
  621. targetUid: this.data.authorUid,
  622. amount: this.data.howMuch
  623. }
  624. // let uid = wx.getStorageSync('uid');
  625. httpRequestApi.rewardMoney(this.uid, data).success(res => {
  626. if (res.data.message) {
  627. wx.showModal({
  628. title: '提示',
  629. content: res.data.message,
  630. success(res) {
  631. if (res.confirm) {
  632. console.log('用户点击确定')
  633. } else if (res.cancel) {
  634. console.log('用户点击取消')
  635. }
  636. }
  637. })
  638. return false;
  639. }
  640. this.payMoney(res.data.data);
  641. })
  642. },
  643. //支付
  644. payMoney: function (orderInfo) {
  645. if (this.data.haveTapMoney) {
  646. return false
  647. }
  648. this.setData({
  649. haveTapMoney: true
  650. })
  651. wx.requestPayment({
  652. 'appId': orderInfo.appId,
  653. 'timeStamp': orderInfo.timeStamp,
  654. 'nonceStr': orderInfo.nonceStr,
  655. 'package': orderInfo.package,
  656. 'signType': orderInfo.signType,
  657. 'paySign': orderInfo.sign,
  658. 'success': res => {
  659. this.setData({
  660. modalType: 'image',
  661. isModalShow: true,
  662. modalCloseShow: false,
  663. modalBtnText: '确定',
  664. haveTapMoney: false,
  665. ifReward: false
  666. })
  667. // wx.showModal({
  668. // title: '提示',
  669. // content: '支付成功',
  670. // success(res) {
  671. // if (res.confirm) {
  672. // this.setData({
  673. // ifReward: false
  674. // })
  675. // } else if (res.cancel) {
  676. // this.setData({
  677. // ifReward: false
  678. // })
  679. // }
  680. // }
  681. // })
  682. },
  683. 'fail': res => {
  684. this.setData({
  685. haveTapMoney: false,
  686. })
  687. console.log('支付失败', res)
  688. }
  689. })
  690. },
  691. // 回到首页
  692. goBackHome: function () {
  693. wx.redirectTo({
  694. url: '../../index/index'
  695. })
  696. },
  697. modalConfirmHandler: function () {
  698. if (this.data.modalType === 'image') {
  699. this.setData({
  700. modalType: 'text',
  701. isModalShow: false,
  702. ifReward: false,
  703. modalCloseShow: true,
  704. modalBtnText: "去开团",
  705. // ifReward: false
  706. })
  707. return false
  708. }
  709. this.setData({
  710. isModalShow: false
  711. })
  712. wx.navigateTo({
  713. url: `../../groupPage/grade-details/grade-details?productId=${this.data.productId}`
  714. })
  715. },
  716. modalCloseHandler: function () {
  717. this.setData({
  718. isModalShow: false
  719. })
  720. },
  721. jurisdiction: function () {
  722. //隐藏弹框
  723. this.setData({
  724. hide: !this.data.hide
  725. })
  726. //登录页信息
  727. // this.onLoad(this.data.onLoadOption);
  728. this.goToReading();
  729. },
  730. goToClass: function () {
  731. if (!this.data.isIOS && this.videoCtx) {
  732. this.innerAudioContext.stop();
  733. this.innerAudioContext.destroy();
  734. this.videoCtx.stop();
  735. this.setData({
  736. videoLoad: false
  737. })
  738. }
  739. setTimeout(() => {
  740. wx.navigateTo({
  741. url: `../../main/class/class?id=${this.data.classId}`
  742. })
  743. }, 100)
  744. }
  745. })