module-menu-vue 0.0.49 → 0.0.50
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
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import request from 'axios'
|
|
2
2
|
// 获取租户列表
|
|
3
3
|
export const getTenantList = () => {
|
|
4
|
-
return request({
|
|
5
|
-
url: '/admin-api/system/user/getUserTenant',
|
|
4
|
+
return request('/admin-api/system/user/getUserTenant', {
|
|
6
5
|
method: 'get'
|
|
7
6
|
})
|
|
8
7
|
}
|
|
9
8
|
// 更改后台租户id
|
|
10
9
|
export const changeTenantId = (params) => {
|
|
11
|
-
return request({
|
|
12
|
-
url: `/admin-api/system/auth/setRedisTokenOfTenant?tenantId=${params.id}&token=${params.token}`,
|
|
10
|
+
return request(`/admin-api/system/auth/setRedisTokenOfTenant?tenantId=${params.id}&token=${params.token}`, {
|
|
13
11
|
method: 'get'
|
|
14
12
|
})
|
|
15
13
|
}
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
</div>
|
|
25
25
|
</template>
|
|
26
26
|
<script>
|
|
27
|
-
|
|
27
|
+
import Axios from '../Util/axios.js'
|
|
28
28
|
import { userMenuIcon } from './constant.js'
|
|
29
29
|
import { getUserName } from './../Util/userInfo.js'
|
|
30
|
-
import { integrationLogout, compactLogout } from './service.js'
|
|
30
|
+
// import { integrationLogout, compactLogout } 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
|
-
if (this.stash === 'integration') {
|
|
83
|
-
|
|
84
|
-
} else {
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
this.logoutUrl()
|
|
72
|
+
const url = this.stash === 'integration' ? '/admin-api/system/auth/logout' : '/auth/token/logout'
|
|
73
|
+
const method = this.stash === 'integration'? 'post' : 'delete'
|
|
74
|
+
Axios(url, method).then(() => {
|
|
75
|
+
localStorage.clear();
|
|
76
|
+
sessionStorage.clear();
|
|
77
|
+
location.href = this.stash === "integration" ? '/admin-ui/login' : '/#/login'
|
|
78
|
+
})
|
|
79
|
+
.catch((err) => {
|
|
80
|
+
console.log('err: ', err)
|
|
81
|
+
});
|
|
82
|
+
// if (this.stash === 'integration') {
|
|
83
|
+
// await integrationLogout()
|
|
84
|
+
// } else {
|
|
85
|
+
// await compactLogout()
|
|
86
|
+
// }
|
|
87
|
+
// this.logoutUrl()
|
|
88
88
|
},
|
|
89
89
|
logoutUrl() {
|
|
90
90
|
localStorage.clear();
|
package/vue.config.js
CHANGED
|
@@ -26,11 +26,11 @@ module.exports = {
|
|
|
26
26
|
"^/": "/",
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
'/admin-api': {
|
|
30
|
+
target: 'http://10.136.106.131:30097',
|
|
31
|
+
changeOrigin: true,
|
|
32
|
+
pathRewrite: { '^': '' },
|
|
33
|
+
}
|
|
34
34
|
// 3.5 以后不需要再配置
|
|
35
35
|
},
|
|
36
36
|
},
|