module-menu-vue 0.3.10 → 0.3.12
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
|
@@ -147,9 +147,6 @@ export default {
|
|
|
147
147
|
async logoutFunc () {
|
|
148
148
|
console.log('开始调用退出接口...')
|
|
149
149
|
if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
|
|
150
|
-
console.log('====================================');
|
|
151
|
-
console.log(111);
|
|
152
|
-
console.log('====================================');
|
|
153
150
|
await integrationLogout();
|
|
154
151
|
await this.logoutUrl()
|
|
155
152
|
} else {
|
|
@@ -171,9 +168,6 @@ export default {
|
|
|
171
168
|
}
|
|
172
169
|
},
|
|
173
170
|
async logoutUrl() {
|
|
174
|
-
console.log('====================================');
|
|
175
|
-
console.log(222);
|
|
176
|
-
console.log('====================================');
|
|
177
171
|
localStorage.clear();
|
|
178
172
|
sessionStorage.clear();
|
|
179
173
|
if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
|
|
@@ -181,15 +175,15 @@ export default {
|
|
|
181
175
|
.then((res) => {
|
|
182
176
|
if (res && res.data && res.data.data && res.data.data.loginoutUrl) {
|
|
183
177
|
console.log('Login URL found:', res.data.data.loginoutUrl);
|
|
184
|
-
window.location.
|
|
178
|
+
window.location.href = res.data.data.loginoutUrl;
|
|
185
179
|
} else {
|
|
186
180
|
console.log('No login URL found, redirect to default login page.');
|
|
187
|
-
window.location.
|
|
181
|
+
window.location.href = res.data.data.loginoutUrl;
|
|
188
182
|
}
|
|
189
183
|
})
|
|
190
184
|
.catch((e) => {
|
|
191
185
|
console.log('GetLoginUrl error: ', e);
|
|
192
|
-
window.location.
|
|
186
|
+
window.location.href = '/admin-ui/login';
|
|
193
187
|
});
|
|
194
188
|
return;
|
|
195
189
|
} else if (this.stash === 'GZW') {
|
|
@@ -14,21 +14,21 @@ export const checkToken = async (token) => {
|
|
|
14
14
|
.then((res) => {
|
|
15
15
|
if (res && res.data && res.data.data && res.data.data.loginoutUrl) {
|
|
16
16
|
console.log('Login URL found:', res.data.data.loginoutUrl);
|
|
17
|
-
window.location.
|
|
17
|
+
window.location.href = res.data.data.loginoutUrl;
|
|
18
18
|
} else {
|
|
19
19
|
console.log('No login URL found, redirect to default login page.');
|
|
20
|
-
window.location.
|
|
20
|
+
window.location.href = res.data.data.loginoutUrl;
|
|
21
21
|
}
|
|
22
22
|
})
|
|
23
23
|
.catch((e) => {
|
|
24
24
|
console.log('GetLoginUrl error: ', e);
|
|
25
|
-
window.location.
|
|
25
|
+
window.location.href = '/admin-ui/login';
|
|
26
26
|
});
|
|
27
27
|
}});
|
|
28
28
|
} else {
|
|
29
29
|
const url = stash === 'GZW' ? `/data-platform/auth/oauth/check_token?token=${token}` : `/auth/oauth/check_token?token=${token}`
|
|
30
|
-
Axios(
|
|
31
|
-
|
|
30
|
+
Axios(url, 'get')
|
|
31
|
+
.then().catch(() =>{
|
|
32
32
|
this.$message.error({content:'用户凭证已过期,请重新登录', onClose: ()=>{
|
|
33
33
|
localStorage.clear();
|
|
34
34
|
sessionStorage.clear();
|
|
@@ -41,7 +41,7 @@ export const checkToken = async (token) => {
|
|
|
41
41
|
// 获取登录地址信息
|
|
42
42
|
export function getLoginUrl() {
|
|
43
43
|
return Axios(
|
|
44
|
-
'get',
|
|
45
44
|
'/admin-api/system/auth/getCodeUrl',
|
|
45
|
+
'get',
|
|
46
46
|
)
|
|
47
47
|
}
|