module-menu-vue 0.0.60 → 0.0.62

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.60",
3
+ "version": "0.0.62",
4
4
  "description": "城市大数据平台菜单--Vue版",
5
5
  "main": "/index.js",
6
6
  "scripts": {
@@ -100,6 +100,12 @@ export default {
100
100
  const routesList = rspData[0].routes
101
101
  if (rsp.data.data) {
102
102
  const pathList = routesList.map(item => {
103
+ if (item.path.indexOf('appSystem') !== -1) {
104
+ const appSysMenuList = item.routes.map(obj => {
105
+ return obj.path.indexOf('/') === -1 ? '/' + obj.path : obj.path
106
+ }) || []
107
+ localStorage.setItem('appSysMenuList', JSON.stringify(appSysMenuList))
108
+ }
103
109
  return {
104
110
  ...item,
105
111
  path: item.path.indexOf('/') === -1 ? '/' + item.path : item.path
@@ -32,6 +32,7 @@ import Axios from '../Util/axios.js'
32
32
  import { userMenuIcon } from './constant.js'
33
33
  import { getUserName } from './../Util/userInfo.js'
34
34
  import { integrationLogout } from './service.js'
35
+ import {getMenuList} from '../Menu/service.js'
35
36
  export default {
36
37
  name: 'UserInfo',
37
38
  data () {
@@ -42,6 +43,7 @@ export default {
42
43
  SystemManageSrc: userMenuIcon.SystemManageSrc,
43
44
  appSystemSrc: userMenuIcon.appSystemSrc,
44
45
  LogoutSrc: userMenuIcon.LogoutSrc,
46
+ isShowApp: false
45
47
  }
46
48
  },
47
49
  computed: {
@@ -49,9 +51,6 @@ export default {
49
51
  isShowSys () {
50
52
  return this.stash === "integration" ? true : this.sysName !== 'admin' && this.isHaveSystemManagementPermission
51
53
  },
52
- isShowApp() {
53
- return this.stash === 'integration' ? true : false
54
- },
55
54
  },
56
55
  props: {
57
56
  sysName: {
@@ -63,7 +62,26 @@ export default {
63
62
  default: ''
64
63
  }
65
64
  },
65
+ created() {
66
+ if (this.stash === 'integration') {
67
+ this.isShowAppFunc()
68
+ }
69
+ },
66
70
  methods: {
71
+ async isShowAppFunc() {
72
+ const rsp = await getMenuList()
73
+ const rspData = rsp.data.data
74
+ if (rspData && rspData.length > 0) {
75
+ const routesList = rspData[0].routes
76
+ if (routesList) {
77
+ routesList.forEach(item => {
78
+ if (item.path.indexOf('appSystem') !== -1) {
79
+ this.isShowApp = true
80
+ }
81
+ })
82
+ }
83
+ }
84
+ },
67
85
  handleClickmenu (flag){
68
86
  let url = ''
69
87
  if (flag === 'single') {
@@ -1,7 +1,7 @@
1
1
  import axios from 'axios';
2
2
  import getStore from './userInfo';
3
3
  import { checkToken } from './permessionUtils';
4
- let tokenValue = 'c184d664eaff40928b80b70f67600780';
4
+ let tokenValue = 'be1f9416ecb34c8492944618834514c2';
5
5
  axios.interceptors.response.use(
6
6
  (response) => {
7
7
  if (response.status === 200) {