From 46c17ea395352fc3d2bd3d5e5163f601f4d466c1 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期五, 17 五月 2024 15:28:17 +0800 Subject: [PATCH] 题目传参 --- src/books/childHealth/view/content/components/chapter003.vue | 2 src/books/childHealth/view/content/components/chapter010.vue | 2 src/books/childHealth/view/content/components/chapter007.vue | 2 src/books/childHealth/view/content/components/chapter0004.vue | 2 src/books/childHealth/view/content/components/chapter008.vue | 2 src/books/childHealth/view/content/components/chapter009.vue | 2 src/books/childHealth/view/content/components/chapter006.vue | 2 src/books/childHealth/view/content/components/chapter005.vue | 2 src/components/examinations/index.vue | 2 src/books/childHealth/view/content/components/chapter011.vue | 2 src/books/childHealth/view/content/components/chapter002.vue | 18 +++++--- src/books/childHealth/view/content/components/chapter001.vue | 35 +++++++++++++++-- 12 files changed, 51 insertions(+), 22 deletions(-) diff --git a/src/books/childHealth/view/content/components/chapter0004.vue b/src/books/childHealth/view/content/components/chapter0004.vue index 7c43c62..056454b 100644 --- a/src/books/childHealth/view/content/components/chapter0004.vue +++ b/src/books/childHealth/view/content/components/chapter0004.vue @@ -1208,7 +1208,7 @@ }, async mounted() { console.log('鏁版嵁',testData[4]); - this.$data.questionData = await getQuestionData(testData[4]) + this.$data.questionData = await getQuestionData('4',testData[4]) this.$data.pathOne = getResourcePath('f2980359eb32cb3b74b284bf5348a596') this.$data.pathTwo = getResourcePath('2677fc38748eeac767a4b3fab5989a38') this.$data.pathThree = getResourcePath('87836d6f409df33817589b6b67514979') diff --git a/src/books/childHealth/view/content/components/chapter001.vue b/src/books/childHealth/view/content/components/chapter001.vue index 8cc724b..80d3c7b 100644 --- a/src/books/childHealth/view/content/components/chapter001.vue +++ b/src/books/childHealth/view/content/components/chapter001.vue @@ -2655,7 +2655,12 @@ </h6> <p class="blockh6-c"> <span class="img center dl-bl w100">涓撻涓� 瀛︿範涓婚涓�</span> - <examinations :cardList="questionData[26]" v-if="questionData" /> + <examinations + :cardList="questionData[26]" + v-if="questionData" + :chapter="1" + :page="26" + /> </p> <h2 class="module_block" id="b008"> <div class="custom1">瀛︿範涓婚鍏�</div> @@ -3062,7 +3067,12 @@ </h6> <p class="blockh6-c"> <span class="img center dl-bl w100">涓撻涓� 瀛︿範涓婚鍏�</span> - <examinations :cardList="questionData[31]" v-if="questionData" /> + <examinations + :cardList="questionData[31]" + v-if="questionData" + :chapter="1" + :page="31" + /> </p> <h4 id="d065">锛堝叚锛夊畨鎺掍赴瀵岀殑娲诲姩鍙婇�傚綋鐨勪綋鑲查敾鐐�</h4> <p> @@ -3756,7 +3766,12 @@ <p class="blockh6-c"> <!-- <img class="img-g" alt="" src="image/0053-1.jpg" /><br /> --> <span class="img center dl-bl w100">涓撻涓� 瀛︿範涓婚涔�</span> - <examinations :cardList="questionData[40]" v-if="questionData"/> + <examinations + :cardList="questionData[40]" + v-if="questionData" + :chapter="1" + :page="40" + /> </p> <h6 class="Conclusion-title4">涓撻灏忕粨</h6> <p class="blockh6"> @@ -3950,10 +3965,20 @@ <p class="blockh6-c"> 瀛︿範瀹屾湰涓撻锛屼綘鐨勫涔犳晥鏋滃浣曞憿锛熷挶浠竴璧锋潵鎵爜娴嬩竴娴嬪惂锛�<br /> <span class="img">杩囧叧妫�娴嬶紙璧勬牸鑰冭瘯妯℃嫙棰橈級1</span><br /> - <examinations :cardList="questionData[421]" v-if="questionData" /> + <examinations + :cardList="questionData[421]" + v-if="questionData" + :chapter="1" + :page="421" + /> <span class="span-border"></span> <span class="img mt-20 dl-bl">杩囧叧妫�娴嬶紙璧勬牸鑰冭瘯妯℃嫙棰橈級2</span> - <examinations :cardList="questionData[422]" v-if="questionData" /> + <examinations + :cardList="questionData[422]" + v-if="questionData" + :chapter="1" + :page="422" + /> </p> <h6 class="Conclusion-title4">鈥㈠涔犲弽鎬濃��</h6> <p class="blockh6 fl fl-di fl-cn" style="text-indent: 0"> diff --git a/src/books/childHealth/view/content/components/chapter002.vue b/src/books/childHealth/view/content/components/chapter002.vue index 1e8a046..1908f45 100644 --- a/src/books/childHealth/view/content/components/chapter002.vue +++ b/src/books/childHealth/view/content/components/chapter002.vue @@ -345,7 +345,12 @@ </h6> <p class="blockh6-c"> <span class="img center dl-bl w100">涓撻浜� 瀛︿範涓婚涓�</span> - <examinations :cardList="questionData[46]" /> + <examinations + v-if="questionData" + :cardList="questionData[46]" + :chapter="2" + :page="46" + /> </p> <h2 class="module_block" id="b011"> <div class="custom1">瀛︿範涓婚浜�</div> @@ -718,7 +723,7 @@ <p class="blockh6-c"> <!-- <img class="img-g" alt="" src="image/0062-1.jpg" /><br /> --> <span class="img center dl-bl w100">涓撻浜� 瀛︿範涓婚浜�</span> - <examinations :cardList="questionData[49]" /> + <examinations v-if="questionData" :cardList="questionData[49]" /> </p> <p class="custom_tag"><b>鈥㈣祫鏂欓摼鎺モ��</b></p> <div class="fieldset"> @@ -1053,7 +1058,7 @@ <p class="blockh6-c center"> <!-- <img class="img-g" alt="" src="image/0065-1.jpg" /><br /> --> <span class="img center dl-bl w100">涓撻浜� 瀛︿範涓婚涓�</span> - <examinations :cardList="questionData[52]" /> + <examinations v-if="questionData" :cardList="questionData[52]" /> </p> </div> </div> @@ -1222,10 +1227,10 @@ <p class="blockh6-c"> 瀛︿範瀹屾湰涓撻锛屼綘鐨勫涔犳晥鏋滃浣曞憿锛熷挶浠竴璧锋潵鎵爜娴嬩竴娴嬪惂锛�<br /> <span class="img">杩囧叧妫�娴嬶紙璧勬牸鑰冭瘯妯℃嫙棰橈級1</span><br /> - <examinations :cardList="questionData[541]" /> + <examinations v-if="questionData" :cardList="questionData[541]" /> <span class="span-border"></span> <span class="img mt-20 dl-bl">杩囧叧妫�娴嬶紙璧勬牸鑰冭瘯妯℃嫙棰橈級2</span> - <examinations :cardList="questionData[542]" /> + <examinations v-if="questionData" :cardList="questionData[542]" /> </p> <h6 class="Conclusion-title4">鈥㈠涔犲弽鎬濃��</h6> <p class="blockh6 m0-t0 fl fl-di fl-cn"> @@ -1250,7 +1255,6 @@ import getQuestionData from "@/assets/methods/examination"; import testData from "../../../assets/examinationList"; import getResourcePath from "@/assets/methods/resources"; -import { mapState } from "vuex"; export default { name: "chapterTwo", components: { evenHeaderVue, oddHeaderVue, examinations }, @@ -1347,7 +1351,7 @@ }; }, async mounted() { - this.$data.questionData = await getQuestionData(testData[2]); + this.$data.questionData = await getQuestionData('2',testData[2]); this.$data.pathOne = getResourcePath("e2b2b610e8b77c82bad7cf94c7986646"); this.$data.pathTwo = getResourcePath("b11b51863da2a4e7e21c73358fa96c1e"); this.$data.pathThree = getResourcePath("67cf97bd8295dc3aeb46982c574df8d0"); diff --git a/src/books/childHealth/view/content/components/chapter003.vue b/src/books/childHealth/view/content/components/chapter003.vue index 1a6bd8c..34ad1dd 100644 --- a/src/books/childHealth/view/content/components/chapter003.vue +++ b/src/books/childHealth/view/content/components/chapter003.vue @@ -1530,7 +1530,7 @@ }, async mounted() { console.log('鏁版嵁',testData[3]); - this.$data.questionData = await getQuestionData(testData[3]) + this.$data.questionData = await getQuestionData('3',testData[3]) this.$data.pathOne = getResourcePath('ca2a1ae9429a5f7a28fe9aa1bfbf3b4a') this.$data.pathTwo = getResourcePath('8fa9d6565b97c5975b1a0a7ef09d38a9') this.$data.pathThree = getResourcePath('56170fb1a0ea272990fe51530086aab1') diff --git a/src/books/childHealth/view/content/components/chapter005.vue b/src/books/childHealth/view/content/components/chapter005.vue index b0165bf..5e3b6b8 100644 --- a/src/books/childHealth/view/content/components/chapter005.vue +++ b/src/books/childHealth/view/content/components/chapter005.vue @@ -2216,7 +2216,7 @@ }; }, async mounted() { - this.$data.questionData = await getQuestionData(testData[5]) + this.$data.questionData = await getQuestionData('5',testData[5]) this.$data.pathOne = getResourcePath('5698398be3f5c7fdb247218b2a687257') this.$data.pathTwo = getResourcePath('5905673b09837c74953dd11fcb27d123') this.$data.pathThree = getResourcePath('1f768157227c193ed5c11f972f66e692') diff --git a/src/books/childHealth/view/content/components/chapter006.vue b/src/books/childHealth/view/content/components/chapter006.vue index 66cb782..72fbcf6 100644 --- a/src/books/childHealth/view/content/components/chapter006.vue +++ b/src/books/childHealth/view/content/components/chapter006.vue @@ -2122,7 +2122,7 @@ }; }, async mounted() { - this.$data.questionData = await getQuestionData(testData[6]) + this.$data.questionData = await getQuestionData('6',testData[6]) this.$data.pathOne = getResourcePath('816cf9d161803aea47ea583ba5d4f0ac') this.$data.pathTwo = getResourcePath('15d4b47f10359b7ad77d87e2327db429') this.$data.pathThree = getResourcePath('66c19c1c7a772fc88080b607f70eebaf') diff --git a/src/books/childHealth/view/content/components/chapter007.vue b/src/books/childHealth/view/content/components/chapter007.vue index 5727228..a1c8c97 100644 --- a/src/books/childHealth/view/content/components/chapter007.vue +++ b/src/books/childHealth/view/content/components/chapter007.vue @@ -3060,7 +3060,7 @@ }; }, async mounted() { - this.$data.questionData = await getQuestionData(testData[7]) + this.$data.questionData = await getQuestionData('7',testData[7]) this.$data.pathOne = getResourcePath("0853ca76cbf745ea4023d2949a4d41d4"); this.$data.pathTwo = getResourcePath("95114c3e801192fb91b43e365b5aff83"); this.$data.pathThree = getResourcePath("79aa2ccd431dcc000dbe2962ded4397c"); diff --git a/src/books/childHealth/view/content/components/chapter008.vue b/src/books/childHealth/view/content/components/chapter008.vue index c00a12e..187c543 100644 --- a/src/books/childHealth/view/content/components/chapter008.vue +++ b/src/books/childHealth/view/content/components/chapter008.vue @@ -2030,7 +2030,7 @@ }; }, async mounted() { - this.$data.questionData = await getQuestionData(testData[8]) + this.$data.questionData = await getQuestionData('8',testData[8]) this.$data.pathOne = getResourcePath("53d9f18bbb3250e624ab608210ae3d1d"); this.$data.pathTwo = getResourcePath("faf38c63d16c12a7e415f9aee6e23880"); this.$data.pathThree = getResourcePath("e791b057b3f750aff6817824030a273a"); diff --git a/src/books/childHealth/view/content/components/chapter009.vue b/src/books/childHealth/view/content/components/chapter009.vue index 0d3eb27..43aa299 100644 --- a/src/books/childHealth/view/content/components/chapter009.vue +++ b/src/books/childHealth/view/content/components/chapter009.vue @@ -1448,7 +1448,7 @@ }; }, async mounted() { - this.$data.questionData = await getQuestionData(testData[9]) + this.$data.questionData = await getQuestionData('9',testData[9]) this.$data.pathOne = getResourcePath("730ab5395d1b5b5c87d7422cc6540f35"); this.$data.pathTwo = getResourcePath("e3c6884dc80cf947e3a38c5595d474ad"); this.$data.pathThree = getResourcePath("bdaec679118721e0623d62ac3031288e"); diff --git a/src/books/childHealth/view/content/components/chapter010.vue b/src/books/childHealth/view/content/components/chapter010.vue index da1bc4b..92f038a 100644 --- a/src/books/childHealth/view/content/components/chapter010.vue +++ b/src/books/childHealth/view/content/components/chapter010.vue @@ -1103,7 +1103,7 @@ }; }, async mounted() { - this.$data.questionData = await getQuestionData(testData[10]) + this.$data.questionData = await getQuestionData('10',testData[10]) this.$data.pathOne = getResourcePath("3f507f73eb9d8c2af4dfcfb032ae696e"); this.$data.pathTwo = getResourcePath("93d4edcc8ef4f947ebfb0cee38ccaa71"); }, diff --git a/src/books/childHealth/view/content/components/chapter011.vue b/src/books/childHealth/view/content/components/chapter011.vue index 31eccc5..1903958 100644 --- a/src/books/childHealth/view/content/components/chapter011.vue +++ b/src/books/childHealth/view/content/components/chapter011.vue @@ -97,7 +97,7 @@ }; }, async mounted() { - this.$data.questionData = await getQuestionData(testData[11]) + this.$data.questionData = await getQuestionData('11',testData[11]) }, }; </script> diff --git a/src/components/examinations/index.vue b/src/components/examinations/index.vue index c0c4482..e1dc40a 100644 --- a/src/components/examinations/index.vue +++ b/src/components/examinations/index.vue @@ -428,7 +428,7 @@ props: { cardList: { type: Array, - default: [], + default:[] }, primaryColor: { type: String, -- Gitblit v1.9.1