diff --git a/layouts/module/header/HeaderInfoBar.vue b/layouts/module/header/HeaderInfoBar.vue index d40b782..84af96f 100644 --- a/layouts/module/header/HeaderInfoBar.vue +++ b/layouts/module/header/HeaderInfoBar.vue @@ -58,7 +58,7 @@
我的订单 @@ -116,10 +116,10 @@ export default { handleCommandClick(event) { switch (event) { case MENU_VALUE.PERSONAL: - this.$router.push("/account"); + this.$router.push("/account/userInfo"); break; case MENU_VALUE.ADDRESS: - this.$router.push("/account"); + this.$router.push("/account/address"); break; case MENU_VALUE.LOGON_OUT: this.$store.commit("setLoginOut"); @@ -127,8 +127,11 @@ export default { }, // 跳转个人中心页面 - onJumpPersonalPage(type) { - this.$router.push(`/account?type=${type}`); + onJumpPersonalPage(path) { + if (!this.$isLoginValidate()) { + return; + } + this.$router.push(`/account/${path}`); }, }, }; diff --git a/layouts/module/header/index.vue b/layouts/module/header/index.vue index 79c7d92..4f4ff3a 100644 --- a/layouts/module/header/index.vue +++ b/layouts/module/header/index.vue @@ -65,14 +65,14 @@
- 购物车
3
-
+
@@ -223,6 +223,12 @@ export default { this.tabPath = value; this.$router.push({ path: value }); }, + onJumpCart() { + if (!this.$isLoginValidate()) { + return; + } + this.$router.push("/cart"); + }, // 获取热门分类信息 async getCategroyData() { const { result } = await ApiGetCategoryOneList(); @@ -243,7 +249,6 @@ export default { } }, onSearch() { - // 储存搜索内容 this.$router.push({ path: "/goods/list", query: {