diff --git a/src/components/layouts/TabLayout.vue b/src/components/layouts/TabLayout.vue
index 7be1037..e9c3b2e 100644
--- a/src/components/layouts/TabLayout.vue
+++ b/src/components/layouts/TabLayout.vue
@@ -4,6 +4,7 @@
onContextmenu(e)"
v-if="multipage"
:active-key="activePage"
@@ -39,6 +40,7 @@
const indexKey = '/dashboard/analysis'
import Vue from 'vue'
import { CACHE_INCLUDED_ROUTES } from '@/store/mutation-types'
+ import {mapState} from 'vuex'
export default {
name: 'TabLayout',
@@ -77,6 +79,13 @@
} else {
return this.$store.state.app.multipage
}
+ },
+ ...mapState({
+ // 系统名称 目的是监听是否是会员系统,会员系统隐藏菜单
+ system: state => state.user.system
+ }),
+ showMenu() {
+ return this.system !== 'member'
}
},
created() {
diff --git a/src/components/page/GlobalLayout.vue b/src/components/page/GlobalLayout.vue
index 7be2bc2..dfec8f8 100644
--- a/src/components/page/GlobalLayout.vue
+++ b/src/components/page/GlobalLayout.vue
@@ -1,6 +1,5 @@
-
@@ -119,8 +120,13 @@ export default {
// 主路由
mainRouters: state => state.permission.addRouters,
// 后台菜单
- permissionMenuList: state => state.user.permissionList
- })
+ permissionMenuList: state => state.user.permissionList,
+ // 系统名称 目的是监听是否是会员系统,会员系统隐藏菜单
+ system: state => state.user.system
+ }),
+ showMenu() {
+ return this.system !== 'member'
+ }
},
watch: {
sidebarOpened(val) {
diff --git a/src/permission.js b/src/permission.js
index c4798f9..f556a66 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -15,6 +15,10 @@ router.beforeEach((to, from, next) => {
if (to.query.token) {
Vue.ls.set(ACCESS_TOKEN, to.query.token, 7 * 24 * 60 * 60 * 1000)
store.commit('SET_TOKEN', to.query.token)
+ // 判断是否是会员系统iframe嵌入的,如果是 不先做左侧菜单和 头部标签
+ if(to.query.system === 'member') {
+ store.commit('SET_SYSTEM', to.query.system)
+ }
}
NProgress.start() // start progress bar
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index e7522bf..421ef53 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -7,6 +7,8 @@ import { getAction } from '@/api/manage'
const user = {
state: {
+ // 使用系统的名称,只有在会员系统嵌入来款系统的时候使用 传值为 member
+ system: '',
token: '',
username: '',
realname: '',
@@ -18,6 +20,9 @@ const user = {
},
mutations: {
+ SET_SYSTEM: (state, system) => {
+ state.system = system
+ },
SET_TOKEN: (state, token) => {
state.token = token
},
@@ -205,4 +210,4 @@ const user = {
}
}
-export default user
\ No newline at end of file
+export default user
diff --git a/src/utils/hasPermission.js b/src/utils/hasPermission.js
index 81df262..4f4691b 100644
--- a/src/utils/hasPermission.js
+++ b/src/utils/hasPermission.js
@@ -4,7 +4,7 @@ const hasPermission = {
install (Vue, options) {
Vue.directive('has', {
inserted: (el, binding, vnode)=>{
- // console.log('binding=====',binding.value)
+ // console.log('binding=====',binding)
if(binding.arg){
binding.value = binding.arg
// console.log( binding.value ,' binding.value =================')