From 8cdcb6b7950710cbcf701cb5149e1b2f949e1b0f Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期三, 15 五月 2024 11:50:57 +0800 Subject: [PATCH] 题目资源 --- src/books/childHealth/view/index.vue | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/books/childHealth/view/index.vue b/src/books/childHealth/view/index.vue index 7683b14..10af5bd 100644 --- a/src/books/childHealth/view/index.vue +++ b/src/books/childHealth/view/index.vue @@ -6,8 +6,9 @@ <script> import examinations from "./components/examinations/index.vue"; -import testData from '../assets/examinationList.json' import pageContent from "./content/index.vue"; +import testData from '../assets/examinationList' +import getQuestionData from '@/assets/methods/examination' export default { name: "child-health", components: { @@ -21,7 +22,6 @@ idPathList: [], cardList: [], isMouseDown: false, - showToolBox: false, move: false, }; }, @@ -66,9 +66,18 @@ }, }; this.MG.store.getProductDetail(query).then((res) => { - console.log("鍥句功淇℃伅",res.datas.cmsDatas[0].datas); + console.log("鍥句功淇℃伅",res.datas,testData); this.$data.bookData = res.datas.cmsDatas[0].datas - + const questiondata = testData + for(let key in testData) { + for(let tkey in testData[key]) { + console.log(testData[key][tkey]); + questiondata[key][tkey] = getQuestionData(res.datas.rootCmsItemId,testData[key][tkey]) + } + } + this.$store.commit('setQuestionData',questiondata) + console.log(this.$store); + // console.log(questiondata); }); }, getParentWithClass(element, className) { @@ -96,7 +105,6 @@ let chapterNum; if (chapterDom) chapterNum = chapterDom.getAttribute("num"); if (txt && pageHtml) { - this.$dsta.showToolBox = true; const page = pageHtml.getAttribute("page"); console.log( { @@ -131,7 +139,6 @@ handleMouseDown() { this.$data.isMouseDown = true; - this.$data.showToolBox = false; }, handleMousemove() { if (this.$data.isMouseDown) { @@ -160,3 +167,4 @@ </script> <style lang="less" scoped></style> +../assets/examinationList.js../assets/examinationList.js \ No newline at end of file -- Gitblit v1.9.1