feat:增加二维码判断

This commit is contained in:
lixg
2023-03-17 14:13:27 +08:00
14 changed files with 316 additions and 480 deletions

View File

@@ -213,6 +213,7 @@ import {
PROJECT_DETAIL,
SubmitExternalExam,
UPDATE_CURRENT_TASK,
checkStudentExist,
} from "@/api/api";
import { useRoute, useRouter } from "vue-router";
import store from "@/store";
@@ -229,12 +230,27 @@ const router = useRouter();
const { commit, dispatch, state } = useStore();
const data = computed(() => state.projectInfo);
useRequest(PROJECT_PROCESS, { projectId: projectId, type }, (e) => {
if (e.code === 6) {
console.log("eee", e);
router.push({
path: "/notpath",
});
}
useRequest(
checkStudentExist,
{
targetId: projectId,
type: type,
},
(res) => {
console.log("判断任务是否删除", res);
if (res.code === 7) {
router.push({
path: "/loseefficacy",
});
} else {
if (e.code === 6) {
router.push({
path: "/notpath",
});
}
}
}
);
});
watch(data, () => {
if (data.value.code === 6) {