| | |
| | | import MG from "@/assets/js/middleGround/WebMiddleGroundApi"; |
| | | import getPublicImage from '@/assets/js/middleGround/tool' |
| | | const getQuestionList = (questionList) => { |
| | | let questionArr = []; |
| | | let cardList = [ |
| | | { |
| | | catalogName: "单选题", |
| | |
| | | for (let cindex = 0; cindex < item.infoList.length; cindex++) { |
| | | const citem = item.infoList[cindex]; |
| | | citem.number = cindex + 1; |
| | | questionArr.push(citem); |
| | | } |
| | | } |
| | | console.log(cardList); |
| | | return cardList |
| | | }; |
| | | |
| | | const getQuestionData = (chapterData) => { |
| | | const data = chapterData |
| | | const data = {...chapterData} |
| | | for(let key in chapterData) { |
| | | data[key] = getQuestionList(chapterData[key]) |
| | | } |