From 03606dadb0634a4643e218546773219c00bd6fd0 Mon Sep 17 00:00:00 2001 From: xiaoguang Date: Tue, 10 May 2022 14:10:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B6=88=E6=81=AF/=E8=B4=AD=E7=89=A9?= =?UTF-8?q?=E8=BD=A6=E9=A1=B5=E9=9D=A2=E8=B7=B3=E8=BD=AC=E5=89=8D=E5=89=8D?= =?UTF-8?q?=E7=BD=AE=E7=99=BB=E5=BD=95=E6=8B=A6=E6=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/module/header/HeaderInfoBar.vue | 13 ++++++++----- layouts/module/header/index.vue | 13 +++++++++---- 2 files changed, 17 insertions(+), 9 deletions(-) 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: {