|
|
@@ -4,6 +4,7 @@ import qs from 'qs'
|
|
|
import { Modal, message, notification } from 'ant-design-vue'
|
|
|
import sysConfig from '@/config/index'
|
|
|
import tool from '@/utils/tool'
|
|
|
+import router from '@/router'
|
|
|
|
|
|
// 以下这些code需要重新登录
|
|
|
const reloadCodes = [401, 1011007, 1011008]
|
|
|
@@ -27,7 +28,13 @@ const service = axios.create({
|
|
|
baseURL: '/api', // api base_url
|
|
|
timeout: sysConfig.TIMEOUT // 请求超时时间
|
|
|
})
|
|
|
-const whiteList = ['footprint/add', 'coursestudentburialpoint/add', 'coursecentry/addViewCount','courselog/add','userread/add']
|
|
|
+const whiteList = [
|
|
|
+ 'footprint/add',
|
|
|
+ 'coursestudentburialpoint/add',
|
|
|
+ 'coursecentry/addViewCount',
|
|
|
+ 'courselog/add',
|
|
|
+ 'userread/add'
|
|
|
+]
|
|
|
function urlStr(str) {
|
|
|
const last = str.lastIndexOf('/')
|
|
|
const secondLast = str.lastIndexOf('/', last - 1)
|
|
|
@@ -65,7 +72,10 @@ const error = () => {
|
|
|
tool.data.remove('USER_INFO')
|
|
|
tool.data.remove('MENU')
|
|
|
tool.data.remove('PERMISSIONS')
|
|
|
- window.location.reload()
|
|
|
+ // window.location.reload()
|
|
|
+ router.replace({
|
|
|
+ path: '/'
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
}
|