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:
@@ -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'>
|
||||
|
||||
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user