Commit 06b39e80 by caoyanzhi

update: 切换商户

parent 74f33746
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div v-if="storeList.length > 0"> <div v-if="storeList.length > 0">
<el-dropdown @command="onChangeStore"> <el-dropdown @command="onChangeStore">
<span class="change-store-btn"> <span class="change-store-btn">
切换商户 {{ getActiveStoreName }}
<i class="iconfont-hb3 iconxiajiantou change-store-icon"></i> <i class="iconfont-hb3 iconxiajiantou change-store-icon"></i>
</span> </span>
<el-dropdown-menu slot="dropdown" class="change-store-popper"> <el-dropdown-menu slot="dropdown" class="change-store-popper">
...@@ -54,6 +54,12 @@ export default { ...@@ -54,6 +54,12 @@ export default {
isExpired: false isExpired: false
}; };
}, },
computed: {
getActiveStoreName() {
const store = this.storeList.find(el => el.enterpriseId == this.activedStoreId) || {};
return store.brandName ? store.brandName : '';
}
},
created() { created() {
this.getStoreList(); this.getStoreList();
this.activedStoreId = JSON.parse(sessionStorage.getItem('userInfos') || '{}').enterpriseId; this.activedStoreId = JSON.parse(sessionStorage.getItem('userInfos') || '{}').enterpriseId;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment