fix: orderlist empty status

This commit is contained in:
2025-09-21 09:54:23 +08:00
parent 3915a8cd46
commit 3583878301

View File

@@ -242,6 +242,8 @@ const OrderList = () => {
});
}
const flatList = list.flat()
return (
<View className={styles.container}>
<ScrollView
@@ -254,7 +256,7 @@ const OrderList = () => {
className={styles.list}
>
{/* <View className={styles.bg} /> */}
{list.flat().map((item) => {
{flatList.map((item) => {
const unPay =
item.order_status === OrderStatus.PENDING &&
item.cancel_type === CancelType.NONE;
@@ -386,10 +388,10 @@ const OrderList = () => {
</View>
);
})}
{list.length > 0 && end && (
{flatList.length > 0 && end && (
<View className={styles.endTips}></View>
)}
{list.length === 0 && (
{flatList.length === 0 && (
<View className={styles.emptyNotice}>
<Image src={emptyContent} />
<Text className={styles.emptyTip}></Text>