mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-11 03:46:47 +08:00
feat:判断任务是否有学员
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="projectdetails" v-if="data?.projectId">
|
||||
<div class="projectdetails">
|
||||
<ReturnHead
|
||||
text="项目详情"
|
||||
:showfile="true"
|
||||
@@ -200,13 +200,6 @@
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-result icon="success" title="您不是此项目学员" sub-title="请联系管理员">
|
||||
<template #extra>
|
||||
<el-button type="primary" @click="toIndex">返回首页</el-button>
|
||||
</template>
|
||||
</el-result>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -233,7 +226,21 @@ const {
|
||||
const router = useRouter();
|
||||
const { commit, dispatch, state } = useStore();
|
||||
const data = computed(() => state.projectInfo);
|
||||
|
||||
useRequest(PROJECT_PROCESS, { projectId: projectId }, (e) => {
|
||||
if (e.code === 6) {
|
||||
console.log("eee", e);
|
||||
router.push({
|
||||
path: "/notpath",
|
||||
});
|
||||
}
|
||||
});
|
||||
watch(data, () => {
|
||||
if (data.value.code === 6) {
|
||||
router.push({
|
||||
path: "/notpath",
|
||||
});
|
||||
}
|
||||
});
|
||||
onMounted(() => {
|
||||
dispatch("getProjectInfo", { projectId });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user