| | |
| | | }) |
| | | this.getLearnTime() |
| | | } |
| | | this.resourceDetailsData() |
| | | this.getBookInfo(options.bookId) |
| | | }, |
| | | /** |
| | |
| | | coverSize: { |
| | | height: 1, |
| | | }, |
| | | fields: {}, |
| | | fields: { |
| | | IsTextbook: [] |
| | | }, |
| | | }; |
| | | if (this.data.storeInfo) query['storeInfo'] = this.data.storeInfo |
| | | app.MG.store.getProductDetail(query).then(async (res) => { |
| | |
| | | buyIdList: res.datas.purchasedSaleMethodIdList, |
| | | learnClassData: res.datas.cmsDatas[0].datas.find(item => item.refCode == "jsek_cloudLearning") |
| | | }) |
| | | this.resourceDetailsData() |
| | | this.getResourceDataList(this.data.learnClassData) |
| | | }); |
| | | }, |
| | |
| | | if (isBuy == 2) { |
| | | // 未购买 |
| | | if (dataList[0].freeFile) { |
| | | dataList[0].isFreeFile = true; // 这个资源可以试看 |
| | | cmsItemData = dataList[0] |
| | | } else { |
| | | wx.hideLoading(); |
| | |
| | | if (selectedId !== -1) { |
| | | let datas = this.data.threeLeveData[selectedId]; |
| | | if (this.data.formPath == 'jsek_cloudLearning') { |
| | | let file = this.cmsItemIsBuy(datas) ? datas.protectedFile || datas.freeFile : datas.freeFile |
| | | // let file = this.cmsItemIsBuy(datas) ? datas.protectedFile || datas.freeFile : datas.freeFile |
| | | let file |
| | | if (!datas.isFreeFile) { |
| | | file = datas.protectedFile |
| | | } else { |
| | | file = datas.freeFile |
| | | } |
| | | showDataUrl = app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + file + '&token=' + wx.getStorageSync(app.config.tokenKey); |
| | | } else { |
| | | showDataUrl = datas.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + datas.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + datas.freeFile |
| | |
| | | }) |
| | | if (item.selectType == "audio" || item.learnSelectType === "audio") { |
| | | if (this.data.formPath == 'jsek_cloudLearning') { |
| | | let file = item.protectedFile ? item.protectedFile : item.freeFile |
| | | let file |
| | | if (!item.isFreeFile) { |
| | | file = item.protectedFile |
| | | } else { |
| | | file = item.freeFile |
| | | } |
| | | // 这里处理云学习的 |
| | | this.setData({ |
| | | showData: app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + file + '&token=' + wx.getStorageSync(app.config.tokenKey) |