diff --git a/.env b/.env index f02adc52..5abc8902 100644 --- a/.env +++ b/.env @@ -38,4 +38,6 @@ VUE_APP_H5=//u-pre.boe.com/student-h5 #用户头像 VUE_APP_AVATAR_PATH=/upload/ # 旧版管理员界面 -VUE_APP_OLD_MANAGE=//u-pre.boe.com/resource/index.html \ No newline at end of file +VUE_APP_OLD_MANAGE=//u-pre.boe.com/resource/index.html +# 批量面授报名模板 +VUE_APP_FACE_STUDENT_TEMPLATE=批量面授报名模版-1673963663229.xlsx \ No newline at end of file diff --git a/.env.boe b/.env.boe index dff531eb..a6bbf443 100644 --- a/.env.boe +++ b/.env.boe @@ -13,4 +13,6 @@ VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE=coursefile/外部考试学员成绩导入 #在线 VUE_APP_ONLINE_CLASS_URL=//u-pre.boe.com/mobile/pages/study/courseStudy?id= VITE_BOE_CASS_DETAIL_URL=//u-pre.boe.com/pc/case/detail?id= -VUE_APP_EXAM_DETAIL_URL=//u-pre.boe.com/mobile/pages/exam/exam?id= \ No newline at end of file +VUE_APP_EXAM_DETAIL_URL=//u-pre.boe.com/mobile/pages/exam/exam?id= +# 批量面授报名模板 +VUE_APP_FACE_STUDENT_TEMPLATE=coursefile/批量面授报名模版-1679595849719.xlsx \ No newline at end of file diff --git a/.env.prod b/.env.prod index 54f6aaed..fcf6b999 100644 --- a/.env.prod +++ b/.env.prod @@ -29,4 +29,6 @@ VUE_APP_FILE_PATH=/upload/boe/file/ #用户头像 VUE_APP_AVATAR_PATH=/upload/ # 旧版管理员界面 -VUE_APP_OLD_MANAGE=//u.boe.com/resource/index.html \ No newline at end of file +VUE_APP_OLD_MANAGE=//u.boe.com/resource/index.html +# 批量面授报名模板 +VUE_APP_FACE_STUDENT_TEMPLATE=/file/批量面授报名模版-1679595925822.xlsx \ No newline at end of file diff --git a/.env.release b/.env.release index 95765bc6..a38aecf3 100644 --- a/.env.release +++ b/.env.release @@ -25,4 +25,6 @@ VUE_APP_H5=//u.boe.com/student-h5-release #用户头像 VUE_APP_AVATAR_PATH=/upload/ # 旧版管理员界面 -VUE_APP_OLD_MANAGE=//u-pre.boe.com/resource/index.html \ No newline at end of file +VUE_APP_OLD_MANAGE=//u-pre.boe.com/resource/index.html +# 批量面授报名模板 +VUE_APP_FACE_STUDENT_TEMPLATE=批量面授报名模版-1673963663229.xlsx \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index cd90f36b..43bd6a64 100644 --- a/src/App.vue +++ b/src/App.vue @@ -33,7 +33,7 @@ import {USER_PERMISSION} from "@/api/ThirdApi"; const store = useStore(); const isLogin = ref(false); -console.log("版本2.2.5------------"); +console.log("版本2.2.6------------"); // 监听关闭浏览器 let time1 = ref(0); diff --git a/src/api/config.js b/src/api/config.js index 0130bcf3..dc624903 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -51,9 +51,8 @@ http.interceptors.response.use( (response) => { // console.log('response', response) const { - data: {code, msg, show}, + data: {code, msg ,show}, } = response; - console.log('code', code) if (code === 0 || code === 200) { return response; } @@ -65,7 +64,7 @@ http.interceptors.response.use( localStorage.removeItem('refreshPage') return Promise.reject(response); } - show && message.error(msg); + show ? message.error(msg):message.error('系统接口数据异常,请联系管理员'); console.log("api %o", msg); return Promise.reject(response); }, diff --git a/src/api/request.js b/src/api/request.js index cbdc783b..4efc7830 100644 --- a/src/api/request.js +++ b/src/api/request.js @@ -1,6 +1,8 @@ import {isRef, reactive, ref, toRefs, unref, watch, watchEffect} from "vue"; import {getCookieForName, throttle} from "@/api/method"; import JSONBigInt from "json-bigint"; +import router from "@/router"; +import {message} from "ant-design-vue"; const JSONBigIntStr = JSONBigInt({ storeAsString: true }); @@ -346,5 +348,18 @@ export async function request(_url, params) { return res.text(); }).then(res => { return JSONBigIntStr.parse(res); + }).then(res => { + if (res.code === 0 || res.code === 200) { + return res; + } + if (res.code === 1000) { + (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? + router.push({path: 'login', query: { returnUrl: router.currentRoute.value.fullPath }}) : + (window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath)) + localStorage.removeItem('refreshPage') + return Promise.reject(res); + } + res.show ? message.error(res.msg):message.error('系统接口数据异常,请联系管理员'); + return Promise.reject(res); }); } \ No newline at end of file diff --git a/src/components/drawers/AddDiscuss.vue b/src/components/drawers/AddDiscuss.vue index d3243b68..31d64ded 100644 --- a/src/components/drawers/AddDiscuss.vue +++ b/src/components/drawers/AddDiscuss.vue @@ -65,7 +65,7 @@ 讨论设置:
- 允许评论 + 允许评论
@@ -136,10 +136,14 @@ function openDrawer(i, row) { console.log(i,row) row && (formData.value = {...row.info}); (i >= 0) && (taskIndex.value = i); - row && (formData.value.discussSettings = row.info.discussSettings === "false" ? false : true); + row && (formData.value.discussSettings = row.info.discussSettings === "false" || row.info.discussSettings === false ? false : true); visible.value = true } +const discussSettings = () => { + formData.value.discussSettings = !formData.value.discussSettings; +} + defineExpose({openDrawer})