import { View, Text, ScrollView } from '@tarojs/components' import { useLoad } from '@tarojs/taro' import { useState } from 'react' import { BrandNav, SiteFooter } from '../../components/Chrome' import { DestinationsSection } from '../../components/DestinationsSection' import { fetchDestinations, type Destination } from '../../services/api' import './index.scss' export default function DestinationsPage() { const [list, setList] = useState([]) const [err, setErr] = useState('') const [loading, setLoading] = useState(true) useLoad(() => { fetchDestinations() .then((d) => { setList(d); setLoading(false) }) .catch((e) => { setErr(e.message || '加载失败'); setLoading(false) }) }) return ( 🧭 EXPLORE 探索 发现下一座适合你的城市 {loading ? 加载中… : null} {err ? {err} : null} {!loading && !err ? : null} ) }