module-menu-vue 0.0.28 → 0.0.29
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
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
|
|
28
28
|
<script >
|
|
29
29
|
import {userMenuIcon} from './constant.js'
|
|
30
|
-
import { logout } from '../Util/permessionUtils'
|
|
30
|
+
// import { logout } from '../Util/permessionUtils'
|
|
31
|
+
import Axios from '../Util/axios'
|
|
31
32
|
export default {
|
|
32
33
|
name: 'UserInfo',
|
|
33
34
|
data () {
|
|
@@ -58,7 +59,12 @@ export default {
|
|
|
58
59
|
window.location.href = url;
|
|
59
60
|
},
|
|
60
61
|
logoutFunc () {
|
|
61
|
-
logout(
|
|
62
|
+
Axios('delete', '/auth/token/logout', '', {}).then(res => {
|
|
63
|
+
console.log('res: ', res)
|
|
64
|
+
this.$router.push({ path: "/login" });
|
|
65
|
+
}).catch((err) => {
|
|
66
|
+
console.error('err:', err)
|
|
67
|
+
})
|
|
62
68
|
},
|
|
63
69
|
getUserName () {
|
|
64
70
|
const userInfo = JSON.parse(sessionStorage.getItem('bigdata-userInfo')||"{}");
|
|
@@ -43,6 +43,7 @@ axios.interceptors.request.use(
|
|
|
43
43
|
async (params) => {
|
|
44
44
|
// 多种环境,对接门户时,需要在请求头中设置token等信息
|
|
45
45
|
const environmentList = ['production', 'development', 'test']
|
|
46
|
+
console.log('env: ', process.env.NODE_ENV)
|
|
46
47
|
if (environmentList.includes(process.env.NODE_ENV)) {
|
|
47
48
|
console.log('环境进来了。。。')
|
|
48
49
|
const TENANT_ID = getStore({ name: 'tenantId' }) || '1';
|