refactor(app): 重构用户中心和订单相关页面

-调整了 app.config.ts 中的页面路径和顺序
- 移除了 article 页面
- 重构了 cart、find、order 和 user 页面的布局和功能
- 优化了导航栏和订单状态的显示逻辑
- 统一了页面样式和图标使用
This commit is contained in:
2025-08-11 21:03:27 +08:00
parent 87b83b4d2c
commit f69decdf4d
23 changed files with 206 additions and 354 deletions

View File

@@ -133,7 +133,7 @@ const GoodsDetail = () => {
});
// 加载商品规格
listShopGoodsSpec({ goodsId: Number(goodsId) } as any)
listShopGoodsSpec({goodsId: Number(goodsId)} as any)
.then((data) => {
setSpecs(data || []);
})
@@ -142,7 +142,7 @@ const GoodsDetail = () => {
});
// 加载商品SKU
listShopGoodsSku({ goodsId: Number(goodsId) } as any)
listShopGoodsSku({goodsId: Number(goodsId)} as any)
.then((data) => {
setSkus(data || []);
})
@@ -217,7 +217,7 @@ const GoodsDetail = () => {
top: "50px",
right: "110px",
}}
onClick={() => navTo(`/pages/cart/cart`, true)}>
onClick={() => Taro.switchTab({url: `/pages/cart/cart`})}>
<Badge value={cartCount} top="-2" right="2">
<div style={{display: 'flex', alignItems: 'center'}}>
<Cart size={16}/>

View File

@@ -24,7 +24,7 @@ const OrderDetail = () => {
if (order.orderStatus === 7) return '客户端申请退款';
// 检查支付状态 (payStatus为boolean类型)
if (!order.payStatus || order.payStatus === false) return '待付款';
if (!order.payStatus) return '待付款';
// 已付款后检查发货状态
if (order.deliveryStatus === 10) return '待发货';
@@ -109,8 +109,8 @@ const OrderDetail = () => {
<div className={'fixed-bottom'}>
<Space>
{order.payStatus === 0 && <Button size="small" onClick={() => console.log('取消订单')}></Button>}
{order.payStatus === 0 && <Button size="small" type="primary" onClick={() => console.log('立即支付')}></Button>}
{!order.payStatus && <Button size="small" onClick={() => console.log('取消订单')}></Button>}
{!order.payStatus && <Button size="small" type="primary" onClick={() => console.log('立即支付')}></Button>}
{order.orderStatus === 1 && <Button size="small" onClick={() => console.log('申请退款')}>退</Button>}
{order.deliveryStatus === 20 && <Button size="small" type="primary" onClick={() => console.log('确认收货')}></Button>}
</Space>