module-menu-vue 0.0.50 → 0.0.52
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
|
@@ -87,8 +87,8 @@ export default {
|
|
|
87
87
|
},
|
|
88
88
|
methods: {
|
|
89
89
|
toHref () {
|
|
90
|
-
if (this.
|
|
91
|
-
location.href = '/#/admin/user/index'
|
|
90
|
+
if (this.sysName === 'admin') {
|
|
91
|
+
location.href = this.stash === "integration" ? '/dataadmin/#/datasource' : '/#/admin/user/index'
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
async getSessionMenu () {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
import Axios from '../Util/axios.js'
|
|
28
28
|
import { userMenuIcon } from './constant.js'
|
|
29
29
|
import { getUserName } from './../Util/userInfo.js'
|
|
30
|
-
|
|
30
|
+
import { integrationLogout } from './service.js'
|
|
31
31
|
export default {
|
|
32
32
|
name: 'UserInfo',
|
|
33
33
|
data () {
|
|
@@ -69,22 +69,22 @@ export default {
|
|
|
69
69
|
},
|
|
70
70
|
async logoutFunc () {
|
|
71
71
|
console.log('开始调用退出接口...')
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
72
|
+
if (this.stash === 'integration') {
|
|
73
|
+
await integrationLogout()
|
|
74
|
+
this.logoutUrl()
|
|
75
|
+
} else {
|
|
76
|
+
// await compactLogout()
|
|
77
|
+
const url = this.stash === 'integration' ? '/admin-api/system/auth/logout' : '/auth/token/logout'
|
|
78
|
+
const method = this.stash === 'integration'? 'post' : 'delete'
|
|
79
|
+
Axios(url, method).then(() => {
|
|
80
|
+
localStorage.clear();
|
|
81
|
+
sessionStorage.clear();
|
|
82
|
+
location.href = this.stash === "integration" ? '/admin-ui/login' : '/#/login'
|
|
83
|
+
})
|
|
84
|
+
.catch((err) => {
|
|
85
|
+
console.log('err: ', err)
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
88
|
},
|
|
89
89
|
logoutUrl() {
|
|
90
90
|
localStorage.clear();
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import request from 'axios'
|
|
2
2
|
// 一体化退出登录
|
|
3
|
-
export
|
|
4
|
-
return request({
|
|
5
|
-
url: '/admin-api/system/auth/logout',
|
|
3
|
+
export const integrationLogout = () => {
|
|
4
|
+
return request('/admin-api/system/auth/logout', {
|
|
6
5
|
method: 'post'
|
|
7
6
|
})
|
|
8
7
|
}
|