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 ( 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>