fix(cart): 购物车入口由 switchTab 改为 navigate(test-0415 反馈6-1)

- order_addcart 未注册在 tabBar,旧代码 switchTab 静默失败 → 用户点购物车按钮无反应
- goods_details 商品详情页底部购物车 navigator 改 open-type='navigate'
- user/index switchTab/navigateTo 黑名单逻辑反向纠正

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
msh-agent
2026-05-03 02:32:17 +08:00
parent 5c0beeceb9
commit 33602ea013
2 changed files with 7 additions and 4 deletions

View File

@@ -219,7 +219,8 @@
<view class='iconfont icon-shoucang' v-else></view>
<view>收藏</view>
</view>
<navigator open-type='switchTab' class="animated item skeleton-rect"
<!-- order_addcart 不在 tabBar必须用 navigate旧版 switchTab 会静默失败导致无法进入购物车test-0415 反馈6-1 -->
<navigator open-type='navigate' class="animated item skeleton-rect"
:class="animated==true?'bounceIn':''" url='/pages/order_addcart/order_addcart'
hover-class="none">
<view class='iconfont icon-gouwuche1'>

View File

@@ -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-1order_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
})
}