新增:余额支付、微信支付、下单确认功能

This commit is contained in:
2025-07-26 12:33:45 +08:00
parent 7d255a2d3c
commit 469e020df5
13 changed files with 664 additions and 72 deletions

View File

@@ -27,7 +27,7 @@ const Address = () => {
})
}
const onDefault = async (item) => {
const onDefault = async (item: ShopUserAddress) => {
if (address) {
await updateShopUserAddress({
...address,
@@ -54,6 +54,22 @@ const Address = () => {
reload();
}
const selectAddress = async (item: ShopUserAddress) => {
if (address) {
await updateShopUserAddress({
...address,
isDefault: false
})
}
await updateShopUserAddress({
id: item.id,
isDefault: true
})
setTimeout(() => {
Taro.navigateBack()
},500)
}
useDidShow(() => {
reload()
});
@@ -97,7 +113,7 @@ const Address = () => {
</CellGroup>
{list.map((item, _) => (
<Cell.Group>
<Cell className={'flex flex-col gap-1'}>
<Cell className={'flex flex-col gap-1'} onClick={() => selectAddress(item)}>
<View>
<View className={'font-medium text-sm'}>{item.name} {item.phone}</View>
</View>