packageDomain/pages/resourceDetails/document/index.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
packageDomain/pages/resourceDetails/myAudio/index.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
packageDomain/pages/resourceDetails/myVideo/index.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
packageDomain/pages/resourceDetails/document/index.js
@@ -86,6 +86,7 @@ applyState: options.applyState, deadline: options.deadline, formPath: options.formPath, source: options.source, }) if (options.formPath == 'jsek_cloudLearning') { this.setData({ @@ -284,12 +285,13 @@ if (data) return data; }) let isBuy = 1; // ###这里的逻辑是从最子层开始判断,最子层的salemethod优先级最高,如果将云学习的salemethod优先级设为最高,需要在判断前,将dataList中的云学习通过refcode滤出,先判断云学习,再判断后续的代码 for (let i = 0; i < dataList.length; i++) { const dataItem = dataList[i]; if (dataItem) { if (dataItem.saleMethod.length > 0) { isBuy = 2; if (this.data.bookDetail.purchasedSaleMethodIdList.indexOf(dataItem.saleMethod[0].Id) > -1) { if (this.data.bookDetail.purchasedSaleMethodIdList.indexOf(dataItem.saleMethod[0].Id) > -1 || dataItem.saleMethod[0].Price == 0) { isBuy = 3; break; } else { packageDomain/pages/resourceDetails/myAudio/index.js
@@ -388,7 +388,7 @@ if (dataItem) { if (dataItem.saleMethod.length > 0) { isBuy = 2; if (this.data.bookDetail.purchasedSaleMethodIdList.indexOf(dataItem.saleMethod[0].Id) > -1) { if (this.data.bookDetail.purchasedSaleMethodIdList.indexOf(dataItem.saleMethod[0].Id) > -1 || dataItem.saleMethod[0].Price == 0) { isBuy = 3; break; } else { @@ -458,9 +458,10 @@ let selectedId = -1; // 初始化选中项索引 let showDataUrl = ''; let titleName = ''; res.datas.cmsDatas[0].datas.forEach((item, index) => { if (item.selectType === "audio" || item.learnSelectType === "audio") { if (this.data.storeInfo == 'jsek_digitalCourses') { // ###视频页面这里判断了是否购买,但音频这里没有判断,需要再核实 if (this.data.storeInfo == 'jsek_digitalCourses') { res.datas.cmsDatas[0].datas.forEach((item, index) => { if (item.selectType === "audio" || item.learnSelectType === "audio") { if (item.sysType == 'CmsItem') { this.data.threeLeveData.push(item) } @@ -468,11 +469,12 @@ this.data.threeLeveData.push(item) } } }); } else { const itemCms = await this.getBuyCmsItem() if (itemCms != null) { this.data.threeLeveData.push(itemCms) } }); const itemCms = await this.getBuyCmsItem() if (itemCms != null) { this.data.threeLeveData.push(itemCms) } if (this.data.threeLeveData.length > 0) { selectedId = this.data.threeLeveData.findIndex(items => items.productLinkPath == this.data.productLinkPath) packageDomain/pages/resourceDetails/myVideo/index.js
@@ -372,7 +372,7 @@ if (dataItem) { if (dataItem.saleMethod.length > 0) { isBuy = 2; if (this.data.bookDetail.purchasedSaleMethodIdList.indexOf(dataItem.saleMethod[0].Id) > -1) { if (this.data.bookDetail.purchasedSaleMethodIdList.indexOf(dataItem.saleMethod[0].Id) > -1 || dataItem.saleMethod[0].Price == 0) { isBuy = 3; break; } else { @@ -444,9 +444,9 @@ this.setData({ isBuy: res.datas.purchasedSaleMethodIdList.includes(res.datas.defaultSaleMethodId) }) res.datas.cmsDatas[0].datas.forEach((item) => { if (item.selectType === "video" || item.learnSelectType === "video") { if (this.data.storeInfo == 'jsek_digitalCourses') { if (this.data.storeInfo == 'jsek_digitalCourses') { res.datas.cmsDatas[0].datas.forEach((item) => { if (item.selectType === "video" || item.learnSelectType === "video") { if (this.data.isBuy) { if (item.sysType == 'CmsItem') { this.data.threeLeveData.push(item) @@ -457,11 +457,12 @@ } } } }) } else { const itemCms = await this.getBuyCmsItem() if (itemCms != null) { this.data.threeLeveData.push(itemCms) } }) const itemCms = await this.getBuyCmsItem() if (itemCms != null) { this.data.threeLeveData.push(itemCms) } if (this.data.threeLeveData.length > 0) { this.data.threeLeveData.forEach((items, index) => { // 修改此处添加index参数