feat(train_management): 增加考试前的条件检查
- 在进入考试页面前,增加对学员考试状态的检查 - 如果学员已经考试通过,提示无需再次考试 - 检查学员剩余考试次数,如果为零,提示无法再次考试hyx_2025-01-13_xgf2.0
parent
4410e39751
commit
da8f1f4c8e
|
@ -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: {
|
||||
|
|
Loading…
Reference in New Issue