From 14ed505ae64153919fcfedbcdfc03e508a1ffa50 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期四, 02 一月 2025 15:12:08 +0800 Subject: [PATCH] 题库扫码未购买优化 --- packageBookService/pages/bookServices/examination/examination.js | 36 +++++++++++++++++++++++++++++++++++- 1 files changed, 35 insertions(+), 1 deletions(-) diff --git a/packageBookService/pages/bookServices/examination/examination.js b/packageBookService/pages/bookServices/examination/examination.js index 320d1a5..282145d 100644 --- a/packageBookService/pages/bookServices/examination/examination.js +++ b/packageBookService/pages/bookServices/examination/examination.js @@ -628,8 +628,42 @@ showDialog: false, }); }, + // 鍒濆鍖栧嚱鏁� async init() { + // 鑾峰彇鍥句功璇︽儏锛屽垽鏂搴撴槸鍚﹁喘涔� + const query = { + path: "*", + queryType: "*", + productId: this.data.bookId, + favoriteTypes: "FavoriteBookCity", + itemFields: { + "SysType=": "CmsFolder", + }, + coverSize: { + height: 300, + }, + fields: {}, + }; + const res = await app.MG.store.getProductDetail(query) + const saleData = res.datas.saleMethod.find(item => item.Name.includes('棰樺簱')) + if (saleData && !res.datas.purchasedSaleMethodIdList.includes(saleData.Id)) return wx.showModal({ + title: '鎻愮ず', + content: '璇峰厛璐拱棰樺簱鍐嶇瓟棰�', + confirmColor: "#ff6c00", + cancelColor: "#949494", + editable: false, //鏄惁鏄剧ず杈撳叆妗� + showCancel: false, + complete: () => { + this.setData({ + submitStatus: true + }) + wx.setStorageSync('tabValue', 'questionBank') + wx.navigateTo({ + url: `/packageBookService/pages/bookServices/detail/index?id=${res.datas.id}&name=${res.datas.name}`, + }) + } + }) this.setData({ loading: true, subjectiveTotal: 0, @@ -2501,7 +2535,7 @@ path: this.data.productLinkPath, content }), - type: 'Normal', + type: 'Public', cmsTypeRefCode: '', newDataListRequest: [] } -- Gitblit v1.9.1