| | |
| | | deadline: options.deadline, |
| | | formPath: options.formPath, |
| | | }) |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | | loginInfo(app, (data) => { |
| | | if (options.formPath == 'jsek_cloudLearning') { |
| | | this.setData({ |
| | | learnStartTime: Date.now(), |
| | | }) |
| | | this.getLearnTime() |
| | | } |
| | | this.getBookInfo(this.data.bookId) |
| | | // if (data) { |
| | | // this.resourceDetailsData() |
| | | // } else { |
| | | // this.resourceDetailsData() |
| | | // } |
| | | if (options.formPath == 'jsek_cloudLearning') { |
| | | this.setData({ |
| | | learnStartTime: Date.now(), |
| | | }) |
| | | } else { |
| | | if (options.formPath == 'jsek_cloudLearning') { |
| | | this.setData({ |
| | | learnStartTime: Date.now(), |
| | | }) |
| | | this.getLearnTime() |
| | | } |
| | | this.getBookInfo(this.data.bookId) |
| | | // this.resourceDetailsData() |
| | | this.getLearnTime() |
| | | } |
| | | this.getBookInfo(this.data.bookId) |
| | | }, |
| | | |
| | | /** |
| | |
| | | isBuy: res.datas.purchasedSaleMethodIdList.includes(res.datas.defaultSaleMethodId) |
| | | }) |
| | | res.datas.cmsDatas[0].datas.forEach((item) => { |
| | | // if (this.data.productLinkPath == item.productLinkPath) { |
| | | // this.handleTeachData(item) |
| | | // this.setData({ |
| | | // titleName: item.name, |
| | | // selectType: item.selectType, |
| | | // learnSelectType: item.learnSelectType |
| | | // }) |
| | | // } else { |
| | | // return wx.showToast({ |
| | | // icon: 'none', |
| | | // title: '暂无资源', |
| | | // }) |
| | | // } |
| | | if (this.data.productLinkPath == item.productLinkPath) { |
| | | this.handleTeachData(item) |
| | | this.setData({ |
| | | titleName: item.name, |
| | | selectType: item.selectType, |
| | | learnSelectType: item.learnSelectType |
| | | }) |
| | | } |
| | | if (this.data.storeInfo == 'jsek_digitalCourses') { |
| | | if (this.data.isBuy) { |
| | | if (this.data.productLinkPath == item.productLinkPath) { |
| | |
| | | learnSelectType: item.learnSelectType, |
| | | }) |
| | | } else { |
| | | wx.showToast({ |
| | | icon: 'none', |
| | | title: '请先返回资源所在图书详情购买视频资源', |
| | | }) |
| | | wx.navigateTo({ |
| | | url: `/packageBookService/pages/bookServices/detail/index?id=${this.data.bookDetail.id}&name=${this.data.bookDetail.name}&tabValue=jsek_cloudLearning`, |
| | | }); |
| | | // wx.showToast({ |
| | | // icon: 'none', |
| | | // title: '请先返回资源所在图书详情购买视频资源', |
| | | // }) |
| | | // wx.navigateTo({ |
| | | // url: `/packageBookService/pages/bookServices/detail/index?id=${this.data.bookDetail.id}&name=${this.data.bookDetail.name}&tabValue=jsek_cloudLearning`, |
| | | // }); |
| | | } |
| | | }) |
| | | }, |