feat(home): 添加常见问题动态加载功能并优化查找页面样式

- 集成 CMS API 动态加载常见问题列表数据
- 实现常见问题列表点击跳转详情页功能
- 调整查找页面侧边栏宽度从 160rpx 到 120rpx
- 优化导航箭头图标尺寸和边框样式
- 修改距离显示格式从"距离xxx"到直接显示距离值
- 更新滚动容器高度计算并移除固定总数显示
- 将距离单位从
This commit is contained in:
2026-03-04 11:17:06 +08:00
parent 1d199c8441
commit 61397b1711
3 changed files with 57 additions and 29 deletions

View File

@@ -48,7 +48,7 @@ const formatDistance = (meter: number | undefined) => {
const m = Math.max(0, Math.round(meter as number))
if (m < 1000) return `${m}`
const km = m / 1000
return `${km.toFixed(km >= 10 ? 0 : 1)}公里`
return `${km.toFixed(km >= 10 ? 0 : 1)}km`
}
const Find = () => {
@@ -181,7 +181,7 @@ const Find = () => {
</View>
<PullToRefresh onRefresh={() => loadStores(true)} headHeight={60}>
<View style={{ height: 'calc(100vh)', overflowY: 'auto' }} id='store-scroll'>
<View style={{ height: 'calc(100vh) - 160px', overflowY: 'auto' }} id='store-scroll'>
{viewList.length === 0 && !loading ? (
<View className='emptyWrap'>
<Empty description='暂无网点' style={{ backgroundColor: 'transparent' }} />
@@ -240,7 +240,7 @@ const Find = () => {
<View className='siteSide' onClick={() => onNavigate(item)}>
<View className='navArrow' />
<Text className='distanceText'>
{distanceText ? `距离${distanceText}` : '查看导航'}
{distanceText ? `${distanceText}` : '查看导航'}
</Text>
</View>
</View>
@@ -249,11 +249,6 @@ const Find = () => {
})}
</InfiniteLoading>
{total > 0 && (
<View className='emptyWrap' style={{ paddingTop: '10rpx' }}>
<Text className='emptyText'> {total} </Text>
</View>
)}
</View>
)}
</View>