From 8f9242a0cfc60fa3718c93123282fcb2b8dbf7fa Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期一, 25 三月 2024 18:00:53 +0800 Subject: [PATCH] 答题器bug修改,设置功能 --- packageBookService/pages/bookServices/detail/buyResource/index.js | 65 +++++++++++++++++++++++++++++--- 1 files changed, 58 insertions(+), 7 deletions(-) diff --git a/packageBookService/pages/bookServices/detail/buyResource/index.js b/packageBookService/pages/bookServices/detail/buyResource/index.js index dc40f65..39062f7 100644 --- a/packageBookService/pages/bookServices/detail/buyResource/index.js +++ b/packageBookService/pages/bookServices/detail/buyResource/index.js @@ -218,16 +218,67 @@ } }) data.datas.cmsDatas[0].datas.forEach(item => { - if (this.data.tabValue == 'jsek_teachingResources') { - item.checked = false - } else if (this.data.tabValue == 'jsek_cloudLearning') { - item.checked = false - item.isbuy = this.resourceIsBuy(item) - item.isShopCar = this.isShoppingCart(item) - } + item.checked = false + item.isbuy = this.resourceIsBuy(item) + item.isShopCar = this.isShoppingCart(item) }) return data.datas.cmsDatas[0].datas }, + getBookInfo(id) { + this.setData({ + "mockData'.id": 0, + "mockData.price": 0, + "mockData.count": 0 + }) + const query = { + path: '*', + queryType: '*', + productId: id, + favoriteTypes: 'FavoriteBookCity', + itemFields: { + 'SysType=': 'CmsFolder', + }, + coverSize: { + height: 300, + }, + fields: { + seriesName: [], + author: [], + isbn: [], + publicationDate: [], + bookClassification: [], + paperPrice: [], + JDLink: [], + tmallLink: [], + dangdangLink: [], + weidianLink: [], + content: [], + authorIntroduction: [], + isApplyBook: [], + isSell: [], + pdf: [], + protectedEpub: [], + probationPage: [], //pdf璇曡椤垫暟 + freeEpubPage: [], //epub璇曡鐧惧垎姣� + }, + }; + app.MG.store.getProductDetail(query).then(async (res) => { + this.setData({ + bookDetail: res.datas, + buyIdList: res.datas.purchasedSaleMethodIdList + }); + }); + + }, + // 鍒ゆ柇璧勬簮鏄惁璐拱 + resourceIsBuy(data) { + if (data.saleMethod && data.saleMethod.length) { + const isSHow = this.data.buyIdList.some((item) => item == data.saleMethod[0].Id) + return !isSHow + } else { + return false + } + }, // 鑾峰彇灞曞紑椤� findChildIds(data, result) { let index = 0 -- Gitblit v1.9.1