修复讲解详情接口并展示展厅统计

This commit is contained in:
lyf
2026-07-02 17:22:11 +08:00
parent 9b1f855515
commit ccd37bcd81
8 changed files with 127 additions and 38 deletions

View File

@@ -47,7 +47,7 @@
<view class="floor-badge">
<text class="floor-badge-text">{{ hall.floorLabel || '楼层待补充' }}</text>
</view>
<text class="hall-meta-text">{{ hall.explainCount > 0 ? `${hall.explainCount} 条讲解` : '暂无讲解' }}</text>
<text class="hall-meta-text">{{ hallMetaText(hall) }}</text>
</view>
</view>
@@ -130,6 +130,8 @@ export interface ExplainHallSelectItem {
floorLabel?: string
image?: string
explainCount: number
businessUnitCount?: number
guideStopCount?: number
searchText: string
}
@@ -227,6 +229,12 @@ const hallIconUrl = (hall: ExplainHallSelectItem) => {
const hallIconText = (name: string) => name.trim().slice(0, 1) || '讲'
const hallMetaText = (hall: ExplainHallSelectItem) => (
typeof hall.businessUnitCount === 'number' || typeof hall.guideStopCount === 'number'
? `${hall.businessUnitCount || 0} 个业务单元 · ${hall.guideStopCount || 0} 个讲解点`
: hall.explainCount > 0 ? `${hall.explainCount} 个展项` : '展厅'
)
const handleHallClick = (hallId: string) => {
emit('hallClick', hallId)
}