mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-11 11:56:48 +08:00
--fix bug
This commit is contained in:
@@ -97,17 +97,13 @@ export async function request(_url, params) {
|
||||
...method !== 'get' ? { data: JSON.stringify(body) } : {}
|
||||
}).then(resp => resp.data).then(response => {
|
||||
if (response.code !== 200 && response.code !== 0) {
|
||||
console.log('window.location.', window, router)
|
||||
if (response.code === 1000) {
|
||||
delCookie();
|
||||
(import.meta.env.MODE === 'development' || import.meta.env.MODE === 'test') ? router.push({ path: '/login', query: { returnUrl: router.currentRoute.value.fullPath } }) : window.open(window.location.protocol + import.meta.env.VITE_BASE_LOGIN_URL + encodeURIComponent(window.location.protocol + import.meta.env.VITE_BOE_BASE_URL + import.meta.env.VITE_BASE + router.currentRoute.value.fullPath), '_top')
|
||||
}
|
||||
if (response.code === 2001) {
|
||||
router.push({ path: '/FaceTeachSignUp', query: { courseId: router.currentRoute.value.query.courseId, type: 3 } })
|
||||
}
|
||||
if (response.code === 2002) {
|
||||
router.push({ path: '/FaceTeachNoCommon', query: { courseId: router.currentRoute.value.query.courseId, type: 3 } })
|
||||
}
|
||||
else if (response.code === 2001) router.push({ path: '/FaceTeachSignUp', query: { courseId: router.currentRoute.value.query.courseId, type: 3 } })
|
||||
else if (response.code === 2002) router.push({ path: '/FaceTeachNoCommon', query: { courseId: router.currentRoute.value.query.courseId, type: 3 } })
|
||||
else if (response.code === 9000) router.replace({ path: '/noData'})
|
||||
// if (import.meta.env.DEV && response.code === 1000) {
|
||||
// router.push({path: '/login'})
|
||||
// } else {
|
||||
|
||||
@@ -368,7 +368,7 @@ const {
|
||||
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId });
|
||||
|
||||
const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId));
|
||||
const isAllowSign = computed(() => dayjs().isBetween(dayjs(data.value.planDto?.beginTime).subtract(data.value.planDto?.beforeStart || 0, "minute"), dayjs(data.value.planDto.afterStart ? data.value.planDto?.beginTime : data.value.planDto?.endTime).add(data.value.planDto.afterStart || 0, "minute")));
|
||||
const isAllowSign = computed(() => dayjs().isBetween(dayjs(data.value.planDto?.beginTime).subtract(data.value.planDto?.beforeStart || 0, "minute"), dayjs(data.value.planDto?.afterStart ? data.value.planDto?.beginTime : data.value.planDto?.endTime).add(data.value.planDto?.afterStart || 0, "minute")));
|
||||
|
||||
const activeName = ref("first");
|
||||
|
||||
|
||||
14
src/views/nottask/NoData.vue
Normal file
14
src/views/nottask/NoData.vue
Normal file
@@ -0,0 +1,14 @@
|
||||
<template>
|
||||
<el-result
|
||||
icon="warning"
|
||||
title="该数据已经被删除或停用"
|
||||
sub-title="请联系管理员"
|
||||
>
|
||||
<template #extra>
|
||||
<el-button type="primary" @click="toIndex">返回首页</el-button>
|
||||
</template>
|
||||
</el-result>
|
||||
</template>
|
||||
<script setup>
|
||||
const toIndex = () => window.location.href = window.location.protocol + import.meta.env.VITE_BOE_HOME;
|
||||
</script>
|
||||
Reference in New Issue
Block a user