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

This commit is contained in:
2025-07-28 11:17:41 +08:00
parent 469e020df5
commit 1fdec4b807
14 changed files with 145 additions and 37 deletions

View File

@@ -1,6 +1,6 @@
import {useState} from "react"; // 添加 useCallback 引入
import Taro, {useDidShow} from '@tarojs/taro'
import {NavBar, Space} from '@nutui/nutui-react-taro'
import {NavBar, Space, Empty, Button, ConfigProvider} from '@nutui/nutui-react-taro'
import {Search} from '@nutui/icons-react-taro'
import OrderList from "./components/OrderList";
import {ShopOrder} from "@/api/shop/shopOrder/model";
@@ -38,8 +38,6 @@ function Order() {
<NavBar
fixed={true}
style={{marginTop: `${statusBarHeight}px`, backgroundColor: 'transparent'}}
onBackClick={() => {
}}
left={
<>
<div className={'flex justify-between items-center w-full'}>
@@ -56,9 +54,33 @@ function Order() {
</>
}
>
<span></span>
<span></span>
</NavBar>
<OrderList data={list}/>
{/*暂无订单*/}
{list.length == 0 && (
<ConfigProvider>
<div className={'h-full flex flex-col justify-center items-center'} style={{
height: 'calc(100vh - 150px)',
}}>
<Empty
style={{
backgroundColor: 'transparent'
}}
description="您还没有订单哦"
/>
<Space>
<Button type="success" fill="dashed"
onClick={() => Taro.switchTab({url: '/pages/index/index'})}></Button>
</Space>
</div>
</ConfigProvider>
)}
{/*订单列表*/}
{
list.length > 0 && (
<OrderList data={list}/>
)
}
</>
);
}