|
@@ -124,24 +124,24 @@ serviceAxios.interceptors.response.use(res => {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
(error) => {
|
|
(error) => {
|
|
- // if (error.response.data.code == 5002) {
|
|
|
|
- // removeToken()
|
|
|
|
- // MessageBox.confirm('登录状态已过期,请重新登录', '系统提示', {
|
|
|
|
- // confirmButtonText: '确定',
|
|
|
|
- // showCancelButton: false,
|
|
|
|
- // closeOnClickModal: false,
|
|
|
|
- // cancelButtonText: '取消',
|
|
|
|
- // type: 'warning'
|
|
|
|
- // }
|
|
|
|
- // ).then(() => {
|
|
|
|
- // if (localStorage.getItem('entranceJumpType') == 'PC') {
|
|
|
|
- // window.location.href = process.env.VUE_APP_OUT_URL
|
|
|
|
- // } else {
|
|
|
|
- // window.location.href = '#/'
|
|
|
|
- // }
|
|
|
|
- // }).catch(() => {
|
|
|
|
- // })
|
|
|
|
- // }
|
|
|
|
|
|
+ if (error.response.data.code == 5002) {
|
|
|
|
+ removeToken()
|
|
|
|
+ MessageBox.confirm('登录状态已过期,请重新登录', '系统提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ showCancelButton: false,
|
|
|
|
+ closeOnClickModal: false,
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }
|
|
|
|
+ ).then(() => {
|
|
|
|
+ if (localStorage.getItem('entranceJumpType') == 'PC') {
|
|
|
|
+ window.location.href = process.env.VUE_APP_OUT_URL
|
|
|
|
+ } else {
|
|
|
|
+ window.location.href = '#/'
|
|
|
|
+ }
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ })
|
|
|
|
+ }
|
|
// 弹层相关
|
|
// 弹层相关
|
|
loadingCount--
|
|
loadingCount--
|
|
if (loadingCount === 0) {
|
|
if (loadingCount === 0) {
|
|
@@ -156,24 +156,22 @@ serviceAxios.interceptors.response.use(res => {
|
|
}
|
|
}
|
|
else if (message.includes('Request failed with status code')) {
|
|
else if (message.includes('Request failed with status code')) {
|
|
if (message.substr(message.length - 3) == 401) {
|
|
if (message.substr(message.length - 3) == 401) {
|
|
- if (getToken()) {
|
|
|
|
- removeToken()
|
|
|
|
- MessageBox.confirm('登录状态已过期,请重新登录', '系统提示', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- showCancelButton: false,
|
|
|
|
- closeOnClickModal: false,
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'warning'
|
|
|
|
- }
|
|
|
|
- ).then(() => {
|
|
|
|
- if (localStorage.getItem('entranceJumpType') == 'PC') {
|
|
|
|
- window.location.href = process.env.VUE_APP_OUT_URL
|
|
|
|
- } else {
|
|
|
|
- window.location.href = '#/'
|
|
|
|
- }
|
|
|
|
- }).catch(() => {
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ removeToken()
|
|
|
|
+ MessageBox.confirm('登录状态已过期,请重新登录', '系统提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ showCancelButton: false,
|
|
|
|
+ closeOnClickModal: false,
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }
|
|
|
|
+ ).then(() => {
|
|
|
|
+ if (localStorage.getItem('entranceJumpType') == 'PC') {
|
|
|
|
+ window.location.href = process.env.VUE_APP_OUT_URL
|
|
|
|
+ } else {
|
|
|
|
+ window.location.href = '#/'
|
|
|
|
+ }
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ })
|
|
} else {
|
|
} else {
|
|
messageData = Message({
|
|
messageData = Message({
|
|
message: message,
|
|
message: message,
|