答题主要页面

This commit is contained in:
caoqianming 2022-11-14 10:47:18 +08:00
parent 6a9fd2207c
commit 769ea453c4
2 changed files with 8 additions and 3 deletions

View File

@ -48,6 +48,7 @@ const install = (Vue, vm) => {
//考试有关 //考试有关
let getExamList = (params={})=>vm.$u.get('/exam/exam/', params);//考试列表 let getExamList = (params={})=>vm.$u.get('/exam/exam/', params);//考试列表
let startExam = (id)=>vm.$u.post(`/exam/exam/${id}/start/`);//开始考试
vm.$u.api = {getUserInfo, vm.$u.api = {getUserInfo,
getCode, getCode,
codeLogin, codeLogin,
@ -70,7 +71,8 @@ const install = (Vue, vm) => {
getDickey, getDickey,
putMyVideoView, putMyVideoView,
getExamList getExamList,
startExam
}; };
} }

View File

@ -36,9 +36,12 @@
}, },
methods: { methods: {
start(){ start(){
this.$u.api.startExam(this.currentExam.id).then(res=>{
uni.reLaunch({ uni.reLaunch({
url:'/pages/exam/main' url:'/pages/exam/main'
}) })
})
} }
} }
} }