修复讲解详情接口并展示展厅统计
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user