| | |
| | | const [pricingCard, setPricingCard] = useState<any>(null); |
| | | const [startSite, setStartSite] = useState<any>(null); |
| | | const [endSite, setEndSite] = useState<any>(null); |
| | | const [hasLoadedStorage, setHasLoadedStorage] = useState(false); |
| | | |
| | | useEffect(() => { |
| | | const card = Taro.getStorageSync('xpPricingCard'); |
| | |
| | | if (card) setPricingCard(card); |
| | | if (start) setStartSite(start); |
| | | if (end) setEndSite(end); |
| | | setHasLoadedStorage(true); |
| | | }, []); |
| | | |
| | | /** |
| | |
| | | }) |
| | | } |
| | | |
| | | if (!pricingCard) return null; |
| | | // if (!hasLoadedStorage) return null; |
| | | |
| | | if (!pricingCard) { |
| | | return ( |
| | | <View className='expense-detail-page'> |
| | | <View className='no-data-box'> |
| | | <Image |
| | | className='no-data-image' |
| | | src='https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/no-data-city.png' |
| | | /> |
| | | <Text>暂无费用明细</Text> |
| | | </View> |
| | | </View> |
| | | ); |
| | | } |
| | | |
| | | return ( |
| | | <View className='expense-detail-page'> |