forked from gxwebsoft/mp-10550
新增:余额支付、微信支付、下单确认功能
This commit is contained in:
@@ -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}/>
|
||||
)
|
||||
}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user