| | |
| | | </template> |
| | | |
| | | <script> |
| | | import examinations from "./components/examinations/index.vue"; |
| | | import pageContent from "./content/index.vue"; |
| | | import testData from "../assets/examinationList"; |
| | | import getQuestionData from "@/assets/methods/examination"; |
| | | export default { |
| | | name: "child-health", |
| | | components: { |
| | | pageContent, |
| | | examinations |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | } |
| | | }; |
| | | this.MG.store.getProductDetail(query).then((res) => { |
| | | 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); |
| | | console.log("图书信息",res.datas); |
| | | this.$data.bookData = res.datas |
| | | this.$store.commit('setRootCmsItemId',res.datas.rootCmsItemId) |
| | | }); |
| | | }, |
| | | getParentWithClass(element, className) { |