module-menu-vue 0.0.55 → 0.0.56

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.55",
3
+ "version": "0.0.56",
4
4
  "description": "城市大数据平台菜单--Vue版",
5
5
  "main": "/index.js",
6
6
  "scripts": {
@@ -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
- // import { integrationLogout } from './service.js'
30
+ import { integrationLogout } from './service.js'
31
31
  export default {
32
32
  name: 'UserInfo',
33
33
  data () {
@@ -60,24 +60,25 @@ export default {
60
60
  let url = ''
61
61
  if (flag === 'single') {
62
62
  url = this.stash === "integration" ? '/admin-ui/user/profile' : '/#/info/index'
63
+ location.href = url;
63
64
  } else if (flag === 'systerm') {
64
65
  url = this.stash === "integration" ? '/admin-ui/bpm/manager/user-group' : '/#/admin/user/index'
66
+ location.href = url;
65
67
  } else if (flag === 'logout') {
66
68
  this.logoutFunc()
67
69
  }
68
- location.href = url;
69
70
  },
70
71
  async logoutFunc () {
71
72
  console.log('开始调用退出接口...')
72
73
  if (this.stash === 'integration') {
73
- this.$emit('logout')
74
+ // this.$emit('logout')
75
+ await integrationLogout();
76
+ this.logoutUrl()
74
77
  } else {
75
78
  const url = this.stash === 'integration' ? '/admin-api/system/auth/logout' : '/auth/token/logout'
76
79
  const method = this.stash === 'integration'? 'post' : 'delete'
77
80
  Axios(url, method).then(() => {
78
- localStorage.clear();
79
- sessionStorage.clear();
80
- location.href = this.stash === "integration" ? '/admin-ui/login' : '/#/login'
81
+ this.logoutUrl();
81
82
  })
82
83
  .catch((err) => {
83
84
  console.log('err: ', err)