module-menu-vue 0.0.50 → 0.0.51

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.50",
3
+ "version": "0.0.51",
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, compactLogout } from './service.js'
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
- 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()
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 async function integrationLogout() {
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
  }