From e2b9cf5cb19ba0ae4bffd787d96f0d0cb8fb63bf Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期二, 09 七月 2024 15:52:58 +0800 Subject: [PATCH] css --- packageBookService/pages/bookServices/detail/components/testResource/testResource.js | 76 +++++++++++++++++++++++++------------- 1 files changed, 50 insertions(+), 26 deletions(-) diff --git a/packageBookService/pages/bookServices/detail/components/testResource/testResource.js b/packageBookService/pages/bookServices/detail/components/testResource/testResource.js index 4081119..09b18ad 100644 --- a/packageBookService/pages/bookServices/detail/components/testResource/testResource.js +++ b/packageBookService/pages/bookServices/detail/components/testResource/testResource.js @@ -13,9 +13,21 @@ type: Object, value: "", }, + tab: { + type: String, + value: "", + }, + openIds: { + type: Array, + value: [], + }, mockData: { type: Object, value: {}, + }, + storeInfo: { + type: String, + value: "", }, }, @@ -27,6 +39,8 @@ radioItem: "test", loading: false, }, + + ready() {}, /** * 缁勪欢鐨勬柟娉曞垪琛� @@ -43,7 +57,8 @@ }) }, async goTest(e) { - const value = e.currentTarget.dataset.value; + console.log(e.detail.value.item, 666) + const value = e.detail.value.item; const token = wx.getStorageSync("jsek-token"); if (!token) { return wx.getUserProfile({ @@ -58,32 +73,41 @@ }); // 鑾峰彇绔犺妭涓嬫槸鍚︽湁棰樼洰 let idPathList = []; - let query = { - path: "*", - queryType: "*", - productId: this.properties.bookInfo.id, - cmsPath: value.productLinkPath, - pading: { - start: 0, - size: 999, - }, - }; - if (value.childrenFolderCount == 0) { - wx.hideLoading(); - return wx.showToast({ - icon: "error", - title: "鏆傛棤鏁版嵁", - }); + if (this.properties.storeInfo) { + idPathList.push({ + id: this.properties.bookInfo.id, + name: this.properties.bookInfo.name, + productLinkPath: value.productLinkPath, + type: value.type, + }) } else { - const res = await app.MG.store.getProductDetail(query); - res.datas.cmsDatas[0].datas.forEach((item) => { - idPathList.push({ - id: item.id, - name: item.name, - productLinkPath: item.productLinkPath, - type: item.type, + let query = { + path: "*", + queryType: "*", + productId: this.properties.bookInfo.id, + cmsPath: value.productLinkPath, + pading: { + start: 0, + size: 999, + }, + }; + if (value.childrenFolderCount == 0) { + wx.hideLoading(); + return wx.showToast({ + icon: "error", + title: "鏆傛棤鏁版嵁", }); - }); + } else { + const res = await app.MG.store.getProductDetail(query); + res.datas.cmsDatas[0].datas.forEach((item) => { + idPathList.push({ + id: item.id, + name: item.name, + productLinkPath: item.productLinkPath, + type: item.type, + }); + }); + } } wx.hideLoading(); wx.navigateTo({ @@ -93,7 +117,7 @@ this.properties.bookInfo.rootCmsItemId }&idPathList=${JSON.stringify(idPathList)}&answerTitle=${ value.name - }&answerType=${"option"}`, + }&answerType=${"option"}&storeInfo=${this.properties.storeInfo}`, }); }, goMycollect(e) { -- Gitblit v1.9.1