diff --git a/src/App.vue b/src/App.vue index f1c4b1d6..1a6dcc13 100644 --- a/src/App.vue +++ b/src/App.vue @@ -34,7 +34,7 @@ import {USER_PERMISSION, VALIDATE_TOKEN} from "@/api/apis"; const store = useStore(); const isLogin = ref(false); -console.log("版本3.3.1------------"); +console.log("版本3.3.2------------"); // 监听关闭浏览器 diff --git a/src/api/config.js b/src/api/config.js index dc624903..a8b7f4dd 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -9,6 +9,8 @@ import {message} from "ant-design-vue"; import axios from "axios"; import router from "@/router"; +import {REFRESH_TOKEN_API} from "@/api/ThirdApi"; +import {boeRequest} from "@/api/request"; // import { getCookie } from '../api/method' // const Qs = require("qs"); @@ -57,13 +59,15 @@ http.interceptors.response.use( return response; } if (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)) + 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) // TODO token过期后退出登录 清空当前用户标记 - 为了刷新页面使用 localStorage.removeItem('refreshPage') return Promise.reject(response); } + if (code === 1001) { + 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) + return Promise.reject(response); + } show ? message.error(msg):message.error('系统接口数据异常,请联系管理员'); console.log("api %o", msg); return Promise.reject(response); diff --git a/src/api/index.js b/src/api/index.js index f3f684d2..215b7666 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -53,7 +53,6 @@ export const getProjectList = (obj) => http.post('/admin/project/list', obj) // 获取项目详情信息(包含阶段及任务列表) export const getProjectDetail = (obj) => http.get('/admin/project/detail', {params: obj}) -export const getDraftTask = (obj) => http.get('/admin/project/detailDraft', { params: obj }) //发布项目 export const releaseProject = (obj) => http.post('/admin/project/publish', obj) //获取项目学员 diff --git a/src/api/index1.js b/src/api/index1.js index fd519e53..ac32f578 100644 --- a/src/api/index1.js +++ b/src/api/index1.js @@ -133,7 +133,7 @@ export const getStuList = (obj) => http.post('/admin/orgStruct/getStudentRef', o //获取用户登录 export const getUser = () => http.post('/admin/CheckUser/login', { withCredentials: true }) //公共信息--------------------------------------------------- -export const courseData =(obj)=> http.post("/admin/offcourse/allPlanList",obj); + //添加项目学员 export const addStudentProject = (obj) => http.post('/admin/project/addStudent', obj) //添加课程学员 @@ -178,7 +178,6 @@ export const exportHomeWork = (obj) => http.get('/admin/student/exportHomeWork', export const exportHomeWorkTemplate = (obj) => http.get('/admin/student/exportHomeWorkTemplate', { params: obj }) //签到 export const attendanceSign = (obj) => http.post('/stu/task/attendance/sign', obj) -export const attendanceSignAll = (obj) => http.post('/stu/task/all/sign', obj) //请假 export const attendanceLeave = (obj) => http.post('/stu/task/attendance/leave', obj) diff --git a/src/api/request.js b/src/api/request.js index 2efe7524..1d1e30f8 100644 --- a/src/api/request.js +++ b/src/api/request.js @@ -495,9 +495,7 @@ export async function request(_url, params) { return res; } if (res.code === 1000 || res.code === 1002) { - (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)) + 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); }else if(res.code=== 1001){ diff --git a/src/assets/scss/common.scss b/src/assets/scss/common.scss index 95df1ef7..6d09f7d9 100644 --- a/src/assets/scss/common.scss +++ b/src/assets/scss/common.scss @@ -374,234 +374,6 @@ textarea { } } - .drawerMain { - .header { - height: 73px; - border-bottom: 1px solid #e8e8e8; - display: flex; - justify-content: space-between; - align-items: center; - - .headerTitle { - font-size: 18px; - font-weight: 600; - color: #333333; - line-height: 25px; - margin-left: 24px; - } - } - - .contentMain { - .main_items { - display: flex; - - margin-bottom: 12px; - margin-top: 32px; - flex-wrap: wrap; - - .mi_ipts { - display: flex; - margin-bottom: 20px; - - .mii_ipt { - display: flex; - align-items: center; - margin-right: 24px; - - .ipt_name { - white-space: nowrap; - } - } - } - - .mi_btns { - display: flex; - margin-left: 38px; - margin-bottom: 20px; - cursor: pointer; - - .btn { - padding: 0px 26px 0px 26px; - height: 38px; - border-radius: 8px; - border: 1px solid rgba(64, 158, 255, 1); - display: flex; - align-items: center; - justify-content: center; - margin-left: 14px; - flex-shrink: 0; - - .search { - background-size: 100%; - } - - .btnText { - font-size: 14px; - font-weight: 400; - line-height: 36px; - margin-left: 5px; - } - } - - .btn1 { - background: rgb(64, 158, 255); - - .search { - width: 15px; - height: 17px; - background-image: url("@/assets/images/coursewareManage/search0.png"); - } - - .btnText { - color: rgb(255, 255, 255); - } - } - - .btn2 { - background: rgb(255, 255, 255); - - .search { - width: 15px; - height: 17px; - background-image: url("@/assets/images/coursewareManage/reset1.png"); - } - - .btnText { - color: rgb(64, 158, 255); - } - } - - .btn1:hover { - background: rgb(255, 255, 255); - - .search { - background-image: url("@/assets/images/courseManage/search1.png"); - } - - .btnText { - color: #4ea6ff; - } - } - - .btn2:hover { - background: rgba(64, 158, 255, 1); - - .search { - background-image: url("@/assets/images/courseManage/reset0.png"); - } - - .btnText { - color: #ffffff; - } - } - } - } - - .main_notice { - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 32px; - height: 40px; - background-color: #e9f6fe; - - .mntc_left { - display: flex; - align-items: center; - - .title { - color: rgba(0, 0, 0, 0.65); - margin-right: 17px; - } - - .data { - color: #4ea6ff; - } - - .notice_icon { - width: 14px; - height: 14px; - margin-right: 9px; - margin-left: 9px; - background-image: url(@/assets/images/coursewareManage/gan.png); - background-size: 100% 100%; - } - } - - .mntc_right { - cursor: pointer; - } - } - } - - .main_table { - position: relative; - padding-bottom: 80px; - - .ant-checkbox-wrapper { - align-items: center; - margin-top: -2px; - } - - .ant-table-selection-column { - padding: 0px !important; - padding-left: 5px !important; - } - - .ant-table-thead>tr>th { - background-color: rgba(239, 244, 252, 1); - } - - th.h { - background-color: #eff4fc !important; - } - - .ant-table-tbody>tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td { - background: #f6f9fd; - } - - .pa { - left: 0; - width: 100%; - display: flex; - justify-content: center; - position: absolute; - bottom: 20px; - } - } - - .main_btns { - height: 72px; - width: 100%; - bottom: 0; - left: 0; - display: flex; - align-items: center; - justify-content: center; - box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16); - - .btn1 { - width: 100px; - height: 40px; - border: 1px solid #4ea6ff; - border-radius: 8px; - color: #4ea6ff; - background-color: #fff; - cursor: pointer; - } - - .btn2 { - cursor: pointer; - width: 100px; - height: 40px; - background: #4ea6ff; - border-radius: 8px; - border: 0; - margin-left: 15px; - color: #fff; - } - } - } } //抽屉-------------------------------------------------------- diff --git a/src/components/NavTop.vue b/src/components/NavTop.vue index c6f27b51..345f6d7f 100644 --- a/src/components/NavTop.vue +++ b/src/components/NavTop.vue @@ -90,7 +90,7 @@ const logOut = async () => { store.replaceState(createStore({state: {openpages: []}}).state); localStorage.clear(); sessionStorage.clear(); - (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? router.push({path: '/login'}) : (window.location.href = window.location.protocol + process.env.VUE_APP_LOGIN_URL) + window.location.href = window.location.protocol + process.env.VUE_APP_LOGIN_URL };