feat:判断任务是否有学员

This commit is contained in:
lixg
2023-03-02 02:03:02 +08:00
parent 2546f61f04
commit b5beeeaa10
22 changed files with 315 additions and 75 deletions

View File

@@ -83,7 +83,7 @@
</template>
<script setup>
import { computed, onUnmounted, reactive, ref, toRefs } from "vue";
import { computed, onUnmounted, reactive, ref, toRefs, watch } from "vue";
import { request, useRequest } from "@/api/request";
import {
TASK_WORK_COMMIT,
@@ -117,8 +117,20 @@ const {
// console.log("type", type);
const { data } =
taskId && taskId !== "undefined"
? useRequest(TASK_WORK_DETAIL, { workId, taskId })
: useRequest(TASK_WORK_DETAIL, { workId });
? useRequest(TASK_WORK_DETAIL, { workId, taskId }, (e) => {
if (e.code === 6) {
router.push({
path: "/notpath",
});
}
})
: useRequest(TASK_WORK_DETAIL, { workId }, (e) => {
if (e.code === 6) {
router.push({
path: "/notpath",
});
}
});
console.log("data==----->", data);
//作业倒计时