From 33602ea01329cce26b18682bc32e937266ad7e23 Mon Sep 17 00:00:00 2001 From: msh-agent Date: Sun, 3 May 2026 02:32:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(cart):=20=E8=B4=AD=E7=89=A9=E8=BD=A6?= =?UTF-8?q?=E5=85=A5=E5=8F=A3=E7=94=B1=20switchTab=20=E6=94=B9=E4=B8=BA=20?= =?UTF-8?q?navigate=EF=BC=88test-0415=20=E5=8F=8D=E9=A6=886-1=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - order_addcart 未注册在 tabBar,旧代码 switchTab 静默失败 → 用户点购物车按钮无反应 - goods_details 商品详情页底部购物车 navigator 改 open-type='navigate' - user/index switchTab/navigateTo 黑名单逻辑反向纠正 Co-Authored-By: Claude Opus 4.7 (1M context) --- msh_single_uniapp/pages/goods/goods_details/index.vue | 3 ++- msh_single_uniapp/pages/user/index.vue | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/msh_single_uniapp/pages/goods/goods_details/index.vue b/msh_single_uniapp/pages/goods/goods_details/index.vue index bbcfe90..76e51d7 100644 --- a/msh_single_uniapp/pages/goods/goods_details/index.vue +++ b/msh_single_uniapp/pages/goods/goods_details/index.vue @@ -219,7 +219,8 @@ 收藏 - + diff --git a/msh_single_uniapp/pages/user/index.vue b/msh_single_uniapp/pages/user/index.vue index 1dcba9e..ec2a5a6 100644 --- a/msh_single_uniapp/pages/user/index.vue +++ b/msh_single_uniapp/pages/user/index.vue @@ -336,12 +336,14 @@ }) // #endif }else{ - if(['/pages/goods_cate/goods_cate','/pages/order_addcart/order_addcart','/pages/user/index'].indexOf(url) == -1){ - uni.navigateTo({ + // test-0415 反馈6-1:order_addcart 不在 tabBar,必须 navigateTo; + // 仅 user/index 与 goods_cate(如已配置 tab)走 switchTab + if(['/pages/user/index','/pages/goods_cate/goods_cate'].indexOf(url) !== -1){ + uni.switchTab({ url:url }) }else{ - uni.switchTab({ + uni.navigateTo({ url:url }) }