From 6066633f42ed5b1e32da4d9fc67070b750789a3c Mon Sep 17 00:00:00 2001 From: 670788339 <670788339@qq.com> Date: Wed, 16 Jul 2025 14:22:19 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E8=80=83=E8=AF=95?= =?UTF-8?q?=E6=9C=AA=E9=9A=8F=E6=9C=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/study/exam.vue | 14 ++++++++++---- unpackage/dist/build/h5/index.html | 2 +- .../js/{index.fc078fed.js => index.ebc9c896.js} | 2 +- .../h5/static/js/pages-study-exam.55209609.js | 1 - .../h5/static/js/pages-study-exam.9b9f52a2.js | 1 + 5 files changed, 13 insertions(+), 7 deletions(-) rename unpackage/dist/build/h5/static/js/{index.fc078fed.js => index.ebc9c896.js} (99%) delete mode 100644 unpackage/dist/build/h5/static/js/pages-study-exam.55209609.js create mode 100644 unpackage/dist/build/h5/static/js/pages-study-exam.9b9f52a2.js diff --git a/pages/study/exam.vue b/pages/study/exam.vue index a6bdc3c..22ddc20 100644 --- a/pages/study/exam.vue +++ b/pages/study/exam.vue @@ -83,6 +83,10 @@ scoreShow:false, lastScore:0, timerValue:0, + examPaper:{ + json:{},//试题的json格式 + items:[],//试题内容 + }, noAnswers:[] //有未答完的试题 } }, @@ -117,10 +121,12 @@ // apiExamPaper.getPaperContent(this.info.paperId).then(rs=>{ apiExamPaper.getPcPaperContent(this.info.id).then(rs=>{ if(rs.status==200){ - //console.log(rs.result) - let paperItems=JSON.parse(rs.result); - //console.log(this.examPaper.json,'this.examPaper.json'); - let qitems=this.convertToItems(paperItems); + //console.log(rs.result)// 判断 result 是否是字符串,如果是才 parse + // let paperItems=JSON.parse(rs.result); + + this.examPaper.json=rs.result; + console.log(this.examPaper.json,'this.examPaper.json'); + let qitems=this.convertToItems(this.examPaper.json); this.paper ={items:qitems}; this.total=qitems.length; this.curItem=qitems[this.curIndex]; diff --git a/unpackage/dist/build/h5/index.html b/unpackage/dist/build/h5/index.html index e9c14b6..495c8d9 100644 --- a/unpackage/dist/build/h5/index.html +++ b/unpackage/dist/build/h5/index.html @@ -19,4 +19,4 @@ hm.src = "https://hm.baidu.com/hm.js?ea89f02dca369037a73c5e3907e2c14a"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); - })();