| | |
| | | // childHealth |
| | | this.config.resourceCtx + "lifeCare" |
| | | ); |
| | | console.log('ac',this.activeBook); |
| | | this.config.activeBook = this.activeBook; |
| | | debugger |
| | | this.config.goodsStore = this.activeBook.storeRefcode; |
| | | } |
| | | } |
| | |
| | | import { activeBook, goodsStore } from "@/assets/js/config"; |
| | | import MG from "@/assets/js/middleGround/WebMiddleGroundApi"; |
| | | import getPublicImage from "@/assets/js/middleGround/tool"; |
| | | const getQuestionList = async (oldList, questionList) => { |
| | | const getQuestionList = async (oldList, questionList,activeBook) => { |
| | | let cardList = [ |
| | | { |
| | | catalogName: "单选题", |
| | |
| | | let shortArr = []; // 简答 |
| | | let multipleChoiceArr = []; // 多选 |
| | | let completionArr = []; // 填空 |
| | | console.log("active", activeBook); |
| | | for (let qindex = 0; qindex < questionList.length; qindex++) { |
| | | const qitem = questionList[qindex]; |
| | | let query = { |
| | | storeInfo: goodsStore, |
| | | storeInfo: activeBook.storeRefcode, |
| | | path: "*", |
| | | cmsPath: activeBook.rootCmsItemId, |
| | | cmsType: "*", |
| | |
| | | return cardList.filter((item) => item.infoList.length > 0); |
| | | }; |
| | | |
| | | const getQuestionData = async (chapter, chapterData) => { |
| | | const getQuestionData = async (chapter, chapterData,activeBook) => { |
| | | const data = { ...chapterData }; |
| | | const oldAnswerData = localStorage.getItem("oldAnswerData"); |
| | | const oldData = oldAnswerData ? JSON.parse(oldAnswerData) : {}; |
| | |
| | | if (oldChapterData) { |
| | | oldList = oldChapterData[key]; |
| | | } |
| | | data[key] = await getQuestionList(oldList, chapterData[key]); |
| | | data[key] = await getQuestionList(oldList, chapterData[key],activeBook); |
| | | } |
| | | return data; |
| | | }; |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | span:first-child { |
| | | box-sizing: border-box; |
| | | height: 30px; |
| | | display: inline-block; |
| | | padding: 5px 10px; |
| | | border-radius: 8px 0 0 8px; |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | // import getResourcePath from "@/assets/methods/resources.js"; |
| | | // import getQuestionData from "@/assets/methods/examination.js"; |
| | | import getResourcePath from "@/assets/methods/resources.js"; |
| | | import getQuestionData from "@/assets/methods/examination.js"; |
| | | import testData from "../js/examinationList.js"; |
| | | // import examinations from "@/components/examinations/index.vue"; |
| | | import examinations from "@/components/examinations/index.vue"; |
| | | |
| | | export default { |
| | | name: "chapter001", |
| | |
| | | }; |
| | | }, |
| | | components: { |
| | | // examinations, |
| | | examinations, |
| | | }, |
| | | created() { |
| | | async created() { |
| | | const localData = JSON.parse(localStorage.getItem("chapter001")); |
| | | if (localData) { |
| | | this.chapter001 = { ...Object.assign(this.chapter001, localData) }; |
| | | } |
| | | |
| | | // this.chapter001.videOneUrl = getResourcePath("68ebd5c05bcb742999a9ebdce4b4bd53"); |
| | | // this.qustionData = await getQuestionData('1',testData[1]); |
| | | this.chapter001.videOneUrl = getResourcePath("68ebd5c05bcb742999a9ebdce4b4bd53"); |
| | | this.chapter001.qustionData = await getQuestionData('1',testData[1],this.config.activeBook); |
| | | }, |
| | | methods: { |
| | | activityOne() { |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | // import getResourcePath from "@/assets/methods/resources.js"; |
| | | // import getQuestionData from "@/assets/methods/examination.js"; |
| | | import getResourcePath from "@/assets/methods/resources.js"; |
| | | import getQuestionData from "@/assets/methods/examination.js"; |
| | | import testData from "../js/examinationList.js"; |
| | | // import examinations from "@/components/examinations/index.vue"; |
| | | import examinations from "@/components/examinations/index.vue"; |
| | | |
| | | export default { |
| | | name: "chapter002", |
| | |
| | | }; |
| | | }, |
| | | components: { |
| | | // examinations, |
| | | examinations, |
| | | }, |
| | | created() { |
| | | async created() { |
| | | const localData = JSON.parse(localStorage.getItem("chapter002")); |
| | | if (localData) { |
| | | this.chapter002 = { ...Object.assign(this.chapter002, localData) }; |
| | | } |
| | | // this.chapter002.videOneUrl = getResourcePath("6e471afdbeb95a8891f1551cbb0cd4fd"); |
| | | // this.chapter002.videOneUrl116 = getResourcePath('b727b78f8036a38cbd054816a81da7f8') |
| | | this.chapter002.videOneUrl = getResourcePath("6e471afdbeb95a8891f1551cbb0cd4fd"); |
| | | this.chapter002.videOneUrl116 = getResourcePath('b727b78f8036a38cbd054816a81da7f8') |
| | | this.chapter002.videOneUrl116 = |
| | | "https:/jsek.bnuic.com/file/api/ApiDownload?md5=b727b78f8036a38cbd054816a81da7f8"; |
| | | this.chapter002.videOneUrl = |
| | | "https:/jsek.bnuic.com/file/api/ApiDownload?md5=6e471afdbeb95a8891f1551cbb0cd4fd"; |
| | | // this.qustionData = await getQuestionData("2",testData[2]); |
| | | this.qustionData = await getQuestionData("2",testData[2],this.config.activeBook); |
| | | }, |
| | | methods: { |
| | | activityOne() { |