From f528764af3d856021a01fbcdede58e2d1a85f2c3 Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 18 Jun 2024 15:38:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client_mp/common/http.api.js | 2 +- client_mp/pages.json | 41 +--- client_mp/pages/document/index.vue | 1 + client_mp/pages/exam/exam.vue | 233 +++++++++++++++++++---- client_mp/pages/exam/index.vue | 38 +++- client_mp/pages/exam/main.vue | 12 +- client_mp/pages/exam/preview.vue | 73 ++++--- client_mp/pages/exam/record.vue | 48 ++++- client_mp/pages/exam/result.vue | 4 +- client_mp/pages/home/home.vue | 25 ++- client_mp/pages/login/login.vue | 2 +- client_mp/pages/login/login_password.vue | 2 +- client_mp/pages/my/my.vue | 66 ++++--- client_mp/pages/subtask/my.vue | 25 ++- client_mp/uview-ui/theme.scss | 2 +- 15 files changed, 425 insertions(+), 149 deletions(-) diff --git a/client_mp/common/http.api.js b/client_mp/common/http.api.js index fdb7fbc..9c4ad3d 100644 --- a/client_mp/common/http.api.js +++ b/client_mp/common/http.api.js @@ -37,7 +37,7 @@ const install = (Vue, vm) => { let getExamList = (params={})=>vm.$u.get('/exam/exam/', params);//考试列表 let startExam = (id)=>vm.$u.post(`/exam/exam/${id}/start/`);//开始考试 let submitExam = (id,params={})=>vm.$u.post(`/exam/examrecord/${id}/submit/`,params);//开始考试 - let examRecord = (id,params={})=>vm.$u.get(`/exam/examrecord/self/`,params);//我的考试记录 + let examRecord = (id,params={})=>vm.$u.get(`/exam/examrecord/`,params);//我的考试记录 let examRecordDetail = (id,params={})=>vm.$u.get(`/exam/examrecord/${id}/`,params);//我的考试记录 let paperDetail = (id,params={})=>vm.$u.get(`/exam/paper/${id}/`,params);//测试 let questionList = (params={})=>vm.$u.get(`/exam/question/`,params);//题目 diff --git a/client_mp/pages.json b/client_mp/pages.json index 751275d..31d5ba3 100644 --- a/client_mp/pages.json +++ b/client_mp/pages.json @@ -137,39 +137,12 @@ } } - // ,{ - // "path" : "pages/exam/test", - // "style" : - // { - // "navigationBarTitleText": "练习", - // "enablePullDownRefresh": false - // } - - // } - // ,{ - // "path" : "pages/exam/question", - // "style" : - // { - // "navigationBarTitleText": "专题练习", - // "enablePullDownRefresh": false - // } - - // } - // ,{ - // "path" : "pages/exam/testDetail", - // "style" : - // { - // "navigationBarTitleText": "练习题目", - // "enablePullDownRefresh": false - // } - - // } ,{ "path" : "pages/exam/exam", "style" : { "navigationBarTitleText": "考试列表", - "enablePullDownRefresh": false + "enablePullDownRefresh": true } } @@ -243,12 +216,12 @@ "selectedIconPath": "static/common/homec.png", "text": "主页" }, - { - "pagePath": "pages/exam/index", - "iconPath": "static/common/dati.png", - "selectedIconPath": "static/common/datic.png", - "text": "考试" - }, + // { + // "pagePath": "pages/exam/index", + // "iconPath": "static/common/dati.png", + // "selectedIconPath": "static/common/datic.png", + // "text": "考试" + // }, // { // "pagePath": "pages/vod/video", // "iconPath": "static/common/play.png", diff --git a/client_mp/pages/document/index.vue b/client_mp/pages/document/index.vue index 3470d13..71de7a8 100644 --- a/client_mp/pages/document/index.vue +++ b/client_mp/pages/document/index.vue @@ -46,6 +46,7 @@ }) var filePath = res.tempFilePath; uni.openDocument({ + showMenu:true, filePath: filePath, success: function (res) { uni.hideLoading() diff --git a/client_mp/pages/exam/exam.vue b/client_mp/pages/exam/exam.vue index 085c88e..c1ad426 100644 --- a/client_mp/pages/exam/exam.vue +++ b/client_mp/pages/exam/exam.vue @@ -1,60 +1,229 @@ - diff --git a/client_mp/pages/exam/index.vue b/client_mp/pages/exam/index.vue index 2d362cb..cf60dc8 100644 --- a/client_mp/pages/exam/index.vue +++ b/client_mp/pages/exam/index.vue @@ -2,10 +2,26 @@ - + + + {{item.title}} + @@ -17,8 +33,8 @@ page: 1 }, cellList: [ - {img:'../../static/exam/exam.png',title:'正式考试',id:'exam'}, - {img:'../../static/exam/test.png',title:'考试记录',id:'test'}, + {img:'../../static/exam/exam.png',title:'正式考试',id:'exam',class:'exam'}, + {img:'../../static/exam/test.png',title:'考试记录',id:'test',class:'test'}, // {img:'../../static/exam/question.png',title:'专题练习',id:'question'}, // {img:'../../static/exam/errorIcon.png',title:'错题记录',id:'record'}, ] @@ -91,4 +107,20 @@ .cellItem:nth-of-type(4) .cellText{ color: #d81e06; } +.exam{ + width: 200rpx; + height: 200rpx; + background: #46bb5a; + border-radius: 40rpx; + padding: 36rpx; + margin: auto; +} +.test{ + width: 200rpx; + height: 200rpx; + background: #ecc041; + border-radius: 40rpx; + padding: 36rpx; + margin: auto; +} diff --git a/client_mp/pages/exam/main.vue b/client_mp/pages/exam/main.vue index aff9d3c..321ec50 100644 --- a/client_mp/pages/exam/main.vue +++ b/client_mp/pages/exam/main.vue @@ -22,7 +22,7 @@ - {{currentIndex}}·{{currentQuestion.name}} + {{currentIndex+1}}·{{currentQuestion.name}} {{currentQuestion.img}} @@ -153,11 +153,16 @@ questions_.push(obj); } that.$u.api.submitExam(that.currentExam.examrecord,{questions_:questions_}).then(res=>{ + uni.showToast({ + title:"提交成功", + icon:"none" + }) uni.setStorageSync('currentExam',res.data) uni.hideLoading() - uni.redirectTo({ + uni.reLaunch({ url:'/pages/exam/result' }) + }).catch(e=>{ if(res.msg){ uni.showModal({ @@ -166,12 +171,11 @@ showCancel:false, success(res) { uni.reLaunch({ - url:'/pages/index/index' + url:'/pages/exam/exam' }) } }) } - }) // let questions = this.currentExam.questions // let score=0 diff --git a/client_mp/pages/exam/preview.vue b/client_mp/pages/exam/preview.vue index 440ddc9..8963f0f 100644 --- a/client_mp/pages/exam/preview.vue +++ b/client_mp/pages/exam/preview.vue @@ -11,16 +11,17 @@ 题目分布:单选{{currentExam.paper_.danxuan_count}}道;多选{{currentExam.paper_.duoxuan_count}}道;判断{{currentExam.paper_.panduan_count}} 判分规则:单选{{currentExam.paper_.danxuan_score}}分,多选{{currentExam.paper_.duoxuan_score}}分,多选{{currentExam.paper_.panduan_score}}分,错选少选均不得分 - 答题须知 +
    +
  • 答题须知。
  • 1.进入答题后请不要后退或返回。
  • 2.可点击上一题/下一题切换。
  • 3.可点击答题卡复查
  • 4.请合理安排时间答题,可提前交卷
- 开始答题 + 开始答题
@@ -53,31 +54,55 @@ diff --git a/client_mp/pages/exam/record.vue b/client_mp/pages/exam/record.vue index 9facd81..c1ea30a 100644 --- a/client_mp/pages/exam/record.vue +++ b/client_mp/pages/exam/record.vue @@ -1,11 +1,14 @@