From 4eaafc69d96ad39662e02314f0ea61b53c3b9659 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期一, 16 十二月 2024 14:34:21 +0800 Subject: [PATCH] 教学互动答题完善 --- packageBookService/pages/bookServices/detail/index.js | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-) diff --git a/packageBookService/pages/bookServices/detail/index.js b/packageBookService/pages/bookServices/detail/index.js index 7ce8441..cbbe71c 100644 --- a/packageBookService/pages/bookServices/detail/index.js +++ b/packageBookService/pages/bookServices/detail/index.js @@ -7,6 +7,7 @@ } from "../../../../assets/js/login"; import FormData from '../../../../utils/formdata/index.js'; const app = getApp(); +var pastData = require('../../psychologyAnswer/testdata/index') Page({ /** * 椤甸潰鐨勫垵濮嬫暟鎹� @@ -435,6 +436,7 @@ }; app.MG.store.getProductDetail(query).then(async (res) => { this.getResourceCode(id, res.datas.rootCmsItemId) + console.log(res.datas, "res.datas") this.setData({ bookDetail: res.datas, buyIdList: res.datas.purchasedSaleMethodIdList, @@ -506,7 +508,7 @@ } } this.setData({ - "bookDetail.publicationDate": moment(this.data.bookDetail.publicationDate).format("YYYY骞碝M鏈�"), + "bookDetail.publicationDate": this.data.bookDetail.publicationDate ? moment(this.data.bookDetail.publicationDate).format("YYYY骞碝M鏈�") : '', "bookDetail.price": this.numFormat(this.data.bookDetail.price), "bookDetail.oldPrice": this.numFormat(this.data.bookDetail.oldPrice), "bookDetail.paperPrice": this.numFormat( @@ -1166,12 +1168,13 @@ data = res.datas.cmsDatas[0].datas.filter((item) => item.type == 'questionBankFolder' && (item.childrenFolderCount > 0 || item.childrenCount > 0) && (item.name !== '濉┖棰�' && item.name !== '鍒ゆ柇棰�' && item.name !== '澶氶�夐' && - item.name !== '绠�绛旈')) + item.name !== '绠�绛旈') && item.name !== '鍗曢�夐') that.setData({ jslx: false, }); } else { data = res.datas.cmsDatas[0].datas.filter((item) => item.type == 'questionBankFolder') + // && item.refCode != 'jsek_interaction' that.setData({ jslx: true, }); @@ -1187,6 +1190,20 @@ loading: false, openTeachids: result, }); + //Json璧嬪�� + // const bookId = that.data.bookId + // if (bookId == 6619) { + // const jsonData = {} + // jsonData.name = "蹇冪悊娴嬭瘎" + // jsonData.children = [...pastData.postData.list] + // var test = that.data.test; + // test.push(jsonData); + // that.setData({ + // test: test, + // }); + // console.log(that.data.test, "鏁欏浜掑姩"); + // } + } else { that.setData({ noResources: true, -- Gitblit v1.9.1