fix(shop): 修正购物车页面跳转为切换标签页

- 将购物车按钮点击事件由 navigateTo 改为 switchTab
- 统一购物车跳转逻辑,提升用户体验
- 修复商品详情页跳转购物车方式错误问题
This commit is contained in:
2026-07-16 21:58:54 +08:00
parent 1b3ce58528
commit 1461a0e563
2 changed files with 2 additions and 2 deletions

View File

@@ -361,7 +361,7 @@ const ShopPage: React.FC = () => {
zIndex: 999,
boxShadow: '0 2px 8px rgba(0,0,0,0.15)',
}}
onClick={() => Taro.navigateTo({ url: '/pages/shop/cart' })}
onClick={() => Taro.switchTab({ url: '/pages/shop/cart' })}
>
<Image
className='w-7 h-7'

View File

@@ -199,7 +199,7 @@ const ProductDetailPage: React.FC = () => {
}
const handleGoCart = () => {
Taro.navigateTo({ url: '/pages/shop/cart' })
Taro.switchTab({ url: '/pages/shop/cart' })
}
if (!product) {