refactor(shop/orderConfirm):优化订单确认页面布局和内容- 调整地址信息显示样式

- 添加支付方式选择功能
- 修改订单总价和配送费
This commit is contained in:
2025-08-11 16:32:02 +08:00
parent 20984811d7
commit c6fcf9c2e5

View File

@@ -4,7 +4,7 @@ import {Location, ArrowRight} from '@nutui/icons-react-taro'
import Taro, {useDidShow} from '@tarojs/taro'
import {ShopGoods} from "@/api/shop/shopGoods/model";
import {getShopGoods} from "@/api/shop/shopGoods";
import {View} from '@tarojs/components';
import {View, Text} from '@tarojs/components';
import {listShopUserAddress} from "@/api/shop/shopUserAddress";
import {ShopUserAddress} from "@/api/shop/shopUserAddress/model";
import './index.scss'
@@ -118,8 +118,9 @@ const OrderConfirm = () => {
<Space className={'flex flex-row w-full'}>
<View className={'flex-wrap text-nowrap whitespace-nowrap text-gray-500'}></View>
<View className={'font-medium text-sm flex items-center w-full'}>
<View style={{width: '64%'}}>{address.province} {address.city} {address.region} {address.address}</View>
<ArrowRight className={'text-gray-500'} size={14} />
<View
style={{width: '64%'}}>{address.province} {address.city} {address.region} {address.address}</View>
<ArrowRight className={'text-gray-500'} size={14}/>
</View>
</Space>
<View className={'pt-1 pb-3 text-gray-500'}>{address.name} {address.phone}</View>
@@ -157,20 +158,6 @@ const OrderConfirm = () => {
</Cell>
</CellGroup>
<CellGroup>
<Cell title={`商品总价共1件`} extra={<View className={'font-medium'}>{'¥' + goods.price}</View>}/>
<Cell title={'优惠券'} extra={(
<View className={'flex justify-between items-center'}>
<View className={'text-red-500 text-sm mr-1'}>-0.00</View>
<ArrowRight className={'text-gray-400'} size={14}/>
</View>
)}/>
{/*<Cell title={'配送费'} extra={'¥' + 10}/>*/}
<Cell title={'订单备注'} extra={(
<Input placeholder={'选填,请先和商家协商一致'} style={{padding: '0'}}/>
)}/>
</CellGroup>
<CellGroup>
<Cell
title={'支付方式'}
@@ -184,6 +171,31 @@ const OrderConfirm = () => {
/>
</CellGroup>
<CellGroup>
<Cell title={`商品总价共1件`} extra={<View className={'font-medium'}>{'¥' + goods.price}</View>}/>
<Cell title={'优惠券'} extra={(
<View className={'flex justify-between items-center'}>
<View className={'text-red-500 text-sm mr-1'}>-0.00</View>
<ArrowRight className={'text-gray-400'} size={14}/>
</View>
)}/>
<Cell title={'配送费'} extra={'¥0.00'}/>
<Cell extra={(
<View className={'flex items-end gap-2'}>
<Text></Text>
<Text className={'text-red-500 text-sm'}>0.0</Text>
<Text className={'ml-2'}></Text>
<Text className={'text-gray-700 font-bold'}>{goods.price}</Text>
</View>
)}/>
</CellGroup>
<CellGroup>
<Cell title={'订单备注'} extra={(
<Input placeholder={'选填,请先和商家协商一致'} style={{padding: '0'}}/>
)}/>
</CellGroup>
<ActionSheet
visible={isVisible}
options={payments}