删除无用代码

This commit is contained in:
2025-06-26 16:40:55 +08:00
parent d75fb55eec
commit cf1c69b6d6
74 changed files with 438 additions and 5506 deletions

View File

@@ -0,0 +1,69 @@
import {useEffect, useState} from "react";
import {Image, Button, Cell, CellGroup, Input, TextArea} from '@nutui/nutui-react-taro'
import Taro from '@tarojs/taro'
import {ShopGoods} from "@/api/shop/shopGoods/model";
import {getShopGoods} from "@/api/shop/shopGoods";
import './index.scss'
const OrderConfirm = () => {
const [goods, setGoods] = useState<ShopGoods | null>(null);
const router = Taro.getCurrentInstance().router;
const goodsId = router?.params?.goodsId;
useEffect(() => {
if (goodsId) {
getShopGoods(Number(goodsId)).then(res => {
setGoods(res);
}).catch(error => {
console.error("Failed to fetch goods detail:", error);
});
}
}, [goodsId]);
if (!goods) {
return <div>...</div>;
}
return (
<div className={'order-confirm-page'}>
<CellGroup title="商品信息">
<Cell>
<div className={'flex items-center'}>
<Image src={goods.image} width="80" height="80" />
<div className={'ml-2'}>
<div className={'text-sm font-bold'}>{goods.name}</div>
<div className={'text-red-500 text-lg'}>{goods.price}</div>
</div>
</div>
</Cell>
</CellGroup>
<CellGroup title="收货信息">
<Cell title="收货人">
<Input placeholder="请输入收货人姓名" />
</Cell>
<Cell title="手机号">
<Input placeholder="请输入手机号" type="tel" />
</Cell>
<Cell title="收货地址">
<TextArea placeholder="请输入详细收货地址" />
</Cell>
</CellGroup>
<CellGroup title="订单备注">
<Cell>
<TextArea placeholder="请输入订单备注" />
</Cell>
</CellGroup>
<div className={'fixed-bottom'}>
<div className={'total-price'}>
<span className={'text-red-500 text-xl font-bold'}>{goods.price}</span>
</div>
<Button type="primary" size="large" className={'submit-btn'}></Button>
</div>
</div>
);
};
export default OrderConfirm;