fix: orderlist empty status
This commit is contained in:
@@ -242,6 +242,8 @@ const OrderList = () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const flatList = list.flat()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={styles.container}>
|
<View className={styles.container}>
|
||||||
<ScrollView
|
<ScrollView
|
||||||
@@ -254,7 +256,7 @@ const OrderList = () => {
|
|||||||
className={styles.list}
|
className={styles.list}
|
||||||
>
|
>
|
||||||
{/* <View className={styles.bg} /> */}
|
{/* <View className={styles.bg} /> */}
|
||||||
{list.flat().map((item) => {
|
{flatList.map((item) => {
|
||||||
const unPay =
|
const unPay =
|
||||||
item.order_status === OrderStatus.PENDING &&
|
item.order_status === OrderStatus.PENDING &&
|
||||||
item.cancel_type === CancelType.NONE;
|
item.cancel_type === CancelType.NONE;
|
||||||
@@ -386,10 +388,10 @@ const OrderList = () => {
|
|||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
{list.length > 0 && end && (
|
{flatList.length > 0 && end && (
|
||||||
<View className={styles.endTips}>已经到底了~</View>
|
<View className={styles.endTips}>已经到底了~</View>
|
||||||
)}
|
)}
|
||||||
{list.length === 0 && (
|
{flatList.length === 0 && (
|
||||||
<View className={styles.emptyNotice}>
|
<View className={styles.emptyNotice}>
|
||||||
<Image src={emptyContent} />
|
<Image src={emptyContent} />
|
||||||
<Text className={styles.emptyTip}>暂时没有订单</Text>
|
<Text className={styles.emptyTip}>暂时没有订单</Text>
|
||||||
|
|||||||
Reference in New Issue
Block a user