From f4e7324c27b7c6ecb824029e22a13541c5033ade Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期一, 22 七月 2024 16:07:56 +0800 Subject: [PATCH] ceshi --- packageBookService/pages/bookServices/examination/examination.js | 25 +++++++++++++++++++------ 1 files changed, 19 insertions(+), 6 deletions(-) diff --git a/packageBookService/pages/bookServices/examination/examination.js b/packageBookService/pages/bookServices/examination/examination.js index a8121dc..19bcdfe 100644 --- a/packageBookService/pages/bookServices/examination/examination.js +++ b/packageBookService/pages/bookServices/examination/examination.js @@ -15,6 +15,7 @@ isCountdownRunning: true, // 鏄惁鍊掕鏃� countdownTime: 0, // 鍊掕鏃舵椂闂� storeInfo: '', + jslx: '', bookId: "", productLinkPath: "", rootCmsItemId: "", @@ -70,6 +71,7 @@ idPathList: options.idPathList ? JSON.parse(options.idPathList) : [], answerType: options.answerType, storeInfo: options.storeInfo, + jslx: options.jslx, }); wx.setNavigationBarTitle({ title: options.answerTitle, @@ -464,7 +466,6 @@ const inputData = e.detail.value.detail.value; const id = e.detail.value.currentTarget.dataset.id; const index = Number(e.detail.value.currentTarget.dataset.index); - console.log(index); const questionList = this.data.questionDataList; questionList.forEach((item) => { if (item.id == id) { @@ -820,7 +821,7 @@ let query = { path: "*", queryType: "*", - storeInfo: this.data.storeInfo, + productId: this.data.bookId, cmsPath: pathitem.productLinkPath, itemFields: { @@ -840,6 +841,9 @@ size: 999, }, }; + if (this.data.storeInfo) { + query.storeInfo = this.data.storeInfo + } await app.MG.store.getProductDetail(query).then((res) => { this.setData({ total: res.datas.cmsDatas[0].datas.length, @@ -856,7 +860,7 @@ }); } res.datas.cmsDatas[0].datas.forEach((item, index) => { - if (this.data.storeInfo) { + if (this.data.storeInfo || this.data.jslx) { if (item.Embedded_QuestionBank_QuestionType == 'singleChoice') { pathitem.name = "鍗曢�夐" } else if (item.Embedded_QuestionBank_QuestionType == 'shortAnswer') { @@ -1040,6 +1044,9 @@ questionDataList: questionList, cardList: cardUpdatedList, }); + console.log( + '棰樼洰', this.data.questionDataList + ); }); }); } @@ -1355,7 +1362,6 @@ for (let qindex = 0; qindex < this.data.collectList.length; qindex++) { const qitem = this.data.collectList[qindex]; let query = { - storeInfo: this.data.storeInfo, path: "*", cmsPath: this.data.rootCmsItemId, cmsType: "*", @@ -1374,6 +1380,9 @@ Embedded_QuestionBank_Difficulty: [], }, }; + if (this.data.storeInfo) { + query.storeInfo = this.data.storeInfo + } await app.MG.store.getProductDetail(query).then((res) => { let questionArr = []; res.datas.cmsDatas[0].datas.forEach((item, index) => { @@ -1603,7 +1612,6 @@ let multipleChoiceArr = []; // 澶氶�� let completionArr = []; // 濉┖ let query = { - storeInfo: this.data.storeInfo, path: "*", cmsPath: this.data.rootCmsItemId, cmsType: "*", @@ -1622,6 +1630,9 @@ Embedded_QuestionBank_Difficulty: [], }, }; + if (this.data.storeInfo) { + query.storeInfo = this.data.storeInfo + } await app.MG.store.getProductDetail(query).then((res) => { let questionArr = []; res.datas.cmsDatas[0].datas.forEach((item, index) => { @@ -1889,7 +1900,6 @@ itemIds.push(item.id + ""); }); let query = { - storeInfo: this.data.storeInfo, path: "*", cmsPath: this.data.rootCmsItemId, cmsType: "*", @@ -1908,6 +1918,9 @@ Embedded_QuestionBank_Difficulty: [], }, }; + if (this.data.storeInfo) { + query.storeInfo = this.data.storeInfo + } await app.MG.store.getProductDetail(query).then((res) => { res.datas.cmsDatas[0].datas.forEach((item, index) => { // 寰幆questionList,缁欐瘡棰樿祴鍊煎垎鏁� -- Gitblit v1.9.1