| | |
| | | type: Object, |
| | | value: {}, |
| | | }, |
| | | storeInfo: { |
| | | type: String, |
| | | value: "", |
| | | }, |
| | | jslx: { |
| | | type: Boolean, |
| | | }, |
| | | }, |
| | | |
| | | /** |
| | |
| | | }) |
| | | }, |
| | | async goTest(e) { |
| | | console.log(e, 666) |
| | | const value = e.detail.value.item; |
| | | const token = wx.getStorageSync("jsek-token"); |
| | | if (!token) { |
| | |
| | | }); |
| | | // 获取章节下是否有题目 |
| | | 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 || this.properties.jslx) { |
| | | 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({ |
| | |
| | | this.properties.bookInfo.rootCmsItemId |
| | | }&idPathList=${JSON.stringify(idPathList)}&answerTitle=${ |
| | | value.name |
| | | }&answerType=${"option"}`, |
| | | }&answerType=${"option"}&storeInfo=${this.properties.storeInfo}&jslx=${this.properties.jslx}`, |
| | | }); |
| | | }, |
| | | goMycollect(e) { |