|
@@ -7,7 +7,7 @@
|
|
|
<sub-menu :menuData="menuList" :menuIndex="1"></sub-menu>
|
|
|
</el-menu>
|
|
|
</div>
|
|
|
- <div class="app-main-button" @click="set">
|
|
|
+ <div class="app-main-button" @click="$router.push(setPath)" v-if="setPath">
|
|
|
<i class="iconfont huifont-shezhi"></i>
|
|
|
<div>后台设置</div>
|
|
|
</div>
|
|
@@ -96,7 +96,8 @@
|
|
|
badge: 0,
|
|
|
badges: 0,
|
|
|
isCustomer: false,
|
|
|
- chatType: 1
|
|
|
+ chatType: 1,
|
|
|
+ setPath: ''
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -106,7 +107,7 @@
|
|
|
},
|
|
|
methods: {
|
|
|
init() {
|
|
|
- this.menuList = this.$store.getters.menuData.filter(node => node.title != '系统设置' && node.title != '优惠管理' && node.title != '商品管理');
|
|
|
+ this.initMenu();
|
|
|
this.$chat.getConversationList(data => {
|
|
|
this.countNumber('badge', data.data)
|
|
|
});
|
|
@@ -124,6 +125,22 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ initMenu() {
|
|
|
+ this.menuList = this.$store.getters.menuData.filter(node => this.$systemMenu.filter(item => item === node
|
|
|
+ .title).length === 0);
|
|
|
+ let list = this.$store.getters.menuData.filter(node => this.$systemMenu.filter(item => item === node.title)
|
|
|
+ .length > 0);
|
|
|
+ this.findPath(list);
|
|
|
+ },
|
|
|
+ findPath(data) {
|
|
|
+ if (this.setPath) return;
|
|
|
+ for (let i = 0; i < data.length; i++) {
|
|
|
+ if (!this.setPath) {
|
|
|
+ if (data[i].index) this.setPath = data[i].index;
|
|
|
+ if (data[i].children) this.findPath(data[i].children);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
openChat(type) {
|
|
|
this.chatType = type;
|
|
|
this.visible = true;
|
|
@@ -151,9 +168,6 @@
|
|
|
this.initCoupon();
|
|
|
}
|
|
|
})
|
|
|
- },
|
|
|
- set() {
|
|
|
-
|
|
|
}
|
|
|
},
|
|
|
components: {
|