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 b3ec1f83..533d8072 100644 --- a/src/App.vue +++ b/src/App.vue @@ -33,9 +33,7 @@ import {USER_PERMISSION} from "@/api/ThirdApi"; const store = useStore(); const isLogin = ref(false); - -console.log("版本1.4.9------------"); - +console.log("版本2.3.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/index1.js b/src/api/index1.js index ae145812..8fb4412b 100644 --- a/src/api/index1.js +++ b/src/api/index1.js @@ -184,6 +184,7 @@ export const attendanceLeave = (obj) => http.post('/stu/task/attendance/leave', export const batchFinishTask = (obj) => http.post('/admin/student/batchFinishTask', obj) //批量更新学员状态 export const batchUpdateStatus = (obj) => http.post('/admin/student/batchUpdateStatus', obj) +export const auditStudentBatch = (obj) => http.post('/admin/student/auditStudentBatch', obj) // //面授课批量导入成绩 export const batchImportScore = (obj) => http.post('/admin/student/importHomeWork', obj, { 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/common/CommonImport.vue b/src/components/common/CommonImport.vue index 44966b06..ef55088b 100644 --- a/src/components/common/CommonImport.vue +++ b/src/components/common/CommonImport.vue @@ -148,6 +148,10 @@ function handleChange({ file }) {