From e969feb46e9dcc6bb511873bf2ec48344b31b5d7 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期二, 31 十二月 2024 16:11:41 +0800 Subject: [PATCH] 题库进入判断是否购买 --- packageBookService/pages/bookServices/examination/examination.js | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/packageBookService/pages/bookServices/examination/examination.js b/packageBookService/pages/bookServices/examination/examination.js index f86f755..08a494e 100644 --- a/packageBookService/pages/bookServices/examination/examination.js +++ b/packageBookService/pages/bookServices/examination/examination.js @@ -628,8 +628,35 @@ 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: '璇峰厛璐拱棰樺簱鍐嶇瓟棰�', + complete: (res) => { + this.setData({ + submitStatus: true + }) + wx.navigateBack() + } + }) this.setData({ loading: true, subjectiveTotal: 0, -- Gitblit v1.9.1