module-menu-vue 0.0.85 → 0.0.87

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,6 +1,6 @@
1
1
  {
2
2
  "name": "module-menu-vue",
3
- "version": "0.0.85",
3
+ "version": "0.0.87",
4
4
  "description": "城市大数据平台菜单--Vue版",
5
5
  "main": "/index.js",
6
6
  "scripts": {
@@ -26,7 +26,7 @@
26
26
  lineHeight: item.children.length > 3 ? '45px' : '70px',
27
27
  borderBottom: index === menuList.length - 1 ? '0px' : '1px solid #E9E9E9',
28
28
  }">
29
- <span v-if="index === 0 && isExist">
29
+ <span v-show="index === 0 && isExist">
30
30
  <img :src="require('./../../assets/exchange_portal_logo.svg')" class="middle exchangeCss" />
31
31
  <span class="middle textPad" @click="toExchangePage()">政务共享交换平台</span>
32
32
  </span>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div className="right">
3
- <el-dropdown v-if="getName()" @command="handleClickmenu">
3
+ <el-dropdown v-show="getName()" @command="handleClickmenu">
4
4
  <span class="el-dropdown-link">
5
5
  <img src="../../assets/userLogo.svg" style="vertical-align:middle;padding-right:10px"/>
6
6
  <span style="color: rgba(0, 0, 0, 0.85);">{{getName()}}</span>
@@ -66,7 +66,11 @@ export default {
66
66
  if (this.stash === 'integration') {
67
67
  this.isShowAppFunc()
68
68
  }
69
- localStorage.setItem('stash', 'GZW')
69
+ if (this.stash === 'GZW') {
70
+ localStorage.setItem('stash', 'GZW')
71
+ } else {
72
+ localStorage.removeItem('stash')
73
+ }
70
74
  },
71
75
  methods: {
72
76
  async isShowAppFunc() {
@@ -12,8 +12,8 @@ export const checkToken = async (token) => {
12
12
  location.href = DEFAULT_LOGOUT_URL;
13
13
  }});
14
14
  } else {
15
- const flag = localStorage.getItem('stash')
16
- const url = flag === 'GZW' ? `/data-platform/auth/oauth/check_token?token=${token}` : `/auth/oauth/check_token?token=${token}`
15
+ const stash = localStorage.getItem('stash')
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(() =>{
19
19
  this.$message.error({content:'用户凭证已过期,请重新登录', onClose: ()=>{
@@ -63,6 +63,7 @@ export const getUserName = () => {
63
63
  } else {
64
64
  const userInfo = getStore({ name: 'userInfo' });
65
65
  if (userInfo && Object.keys(userInfo).length > 0 && userInfo.username) {
66
+ console.log('username', userInfo.username)
66
67
  return userInfo.username;
67
68
  }
68
69
  return '';