diff --git a/pages/train_management/index.vue b/pages/train_management/index.vue index 7d9369f..707d6ba 100644 --- a/pages/train_management/index.vue +++ b/pages/train_management/index.vue @@ -46,7 +46,7 @@ <script> import store from '@/store/index' -import {getClassInfoByParams, getClassList} from "../../api"; +import {getClassInfoByParams, getClassList, getExamExercises} from "../../api"; import {getStudentInfoApi} from "../../api/api"; export default { @@ -144,6 +144,19 @@ export default { } else if (type === '3') { // 考试二维码方式进入 [type: 3 --> 考试二维码方式进入] if (classInfo) { + console.log('classInfo :>> ', classInfo); + if (classInfo.stageexamstate === "3") { + uni.$u.toast("您已经考试通过,无需再次考试!") + return; + } + const resData = await getExamExercises({ + stageexampaperinputId, + classId, + }) + if (resData.numberofexams <= 0) { + uni.$u.toast("您的考试次数已用尽,无法再次考试!") + return; + } uni.$u.route({ url: '/pages/train_management/face_authentication', params: {