module-menu-vue 0.0.87 → 0.0.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -67,9 +67,9 @@ export default {
|
|
|
67
67
|
this.isShowAppFunc()
|
|
68
68
|
}
|
|
69
69
|
if (this.stash === 'GZW') {
|
|
70
|
-
|
|
70
|
+
sessionStorage.setItem('stash', 'GZW')
|
|
71
71
|
} else {
|
|
72
|
-
|
|
72
|
+
sessionStorage.removeItem('stash')
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
methods: {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import Axios from './axios';
|
|
2
2
|
const localStorageToken = localStorage.getItem('ACCESS_TOKEN')
|
|
3
|
-
const
|
|
3
|
+
const stash = sessionStorage.getItem('stash')
|
|
4
|
+
const DEFAULT_LOGOUT_URL = localStorageToken ? '/admin-ui/login' : stash === 'GZW' ? '/data-platform/#/login' : '/#/login'
|
|
4
5
|
import { integrationLogout } from '../User/service.js'
|
|
5
6
|
// 校验token是否失效
|
|
6
7
|
export const checkToken = async (token) => {
|
|
7
8
|
if (localStorageToken) {
|
|
8
|
-
integrationLogout()
|
|
9
|
+
await integrationLogout()
|
|
9
10
|
this.$message.error({content:'用户凭证已过期,请重新登录', onClose: ()=>{
|
|
10
11
|
localStorage.clear();
|
|
11
12
|
sessionStorage.clear();
|
|
12
13
|
location.href = DEFAULT_LOGOUT_URL;
|
|
13
14
|
}});
|
|
14
15
|
} else {
|
|
15
|
-
const stash = localStorage.getItem('stash')
|
|
16
16
|
const url = stash === 'GZW' ? `/data-platform/auth/oauth/check_token?token=${token}` : `/auth/oauth/check_token?token=${token}`
|
|
17
17
|
Axios('get', url, '', {})
|
|
18
18
|
.then().catch(() =>{
|