src/views/personalCenter/components/LeftMenu.vue
@@ -28,15 +28,26 @@ this.activeIndex = this.$route.query.id } }, data() { return { menuList: [ computed:{ menuList() { let menu = [ // { name: "账户总览" }, // { name: "订单管理" }, // { name: "消息中心" }, { name: "基本资料", tab: "baseInfo" }, { name: "子账户管理", tab: "subAccount" } ], ] let userInfo = JSON.parse(sessionStorage.getItem("userInfo")) if (userInfo.username == "Administrator") { menu.push({ name: "子账户管理", tab: "subAccount" }) } return menu } }, data() { return { userInfo: null, activeIndex: 0 }