|
|
@@ -5,6 +5,7 @@ import notification from 'ant-design-vue/es/notification'
|
|
|
import message from 'ant-design-vue/es/message'
|
|
|
import { VueAxios } from './axios'
|
|
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
|
|
+// import Vue from '../main'
|
|
|
|
|
|
// 站点配置文件
|
|
|
// window.serverConfig => public/config.js
|
|
|
@@ -44,13 +45,13 @@ service.interceptors.response.use((response) => {
|
|
|
if (result.status === 401) {
|
|
|
store.dispatch('Logout').then(() => {
|
|
|
notification.error({
|
|
|
+ key: 'notLoggedMessage',
|
|
|
message: '错误',
|
|
|
description: result.message,
|
|
|
duration: 3
|
|
|
})
|
|
|
- setTimeout(() => {
|
|
|
- window.location.reload()
|
|
|
- }, 1200)
|
|
|
+ // Vue.$router.push({ path: '/passport/login' }) // 会报错重复注册路由, 改用下面reload的方式
|
|
|
+ setTimeout(() => window.location.reload(), 1500)
|
|
|
})
|
|
|
return Promise.reject(result)
|
|
|
}
|