替换讲解展厅列表预览图
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
lyf
2026-07-09 16:48:53 +08:00
parent 2c4028433f
commit 05c37db414
9 changed files with 16 additions and 16 deletions

View File

@@ -32,10 +32,10 @@
@tap="handleHallClick(hall.id)" @tap="handleHallClick(hall.id)"
> >
<image <image
v-if="hallIconUrl(hall)" v-if="hallPreviewUrl(hall)"
class="hall-thumb" class="hall-thumb"
:src="hallIconUrl(hall)" :src="hallPreviewUrl(hall)"
mode="aspectFit" mode="aspectFill"
/> />
<view v-else class="hall-thumb placeholder"> <view v-else class="hall-thumb placeholder">
<text class="hall-thumb-text">{{ hallIconText(hall.name) }}</text> <text class="hall-thumb-text">{{ hallIconText(hall.name) }}</text>
@@ -201,19 +201,19 @@ const emit = defineEmits<{
back: [] back: []
}>() }>()
const HALL_ICON_BASE = '/static/icons/halls' const HALL_PREVIEW_BASE = '/static/explain/hall-previews'
const failedUnitPreviewIds = ref(new Set<string>()) const failedUnitPreviewIds = ref(new Set<string>())
const hallIconMap: Record<string, string> = { const hallPreviewMap: Record<string, string> = {
宇宙厅: `${HALL_ICON_BASE}/universe.jpg`, 宇宙厅: `${HALL_PREVIEW_BASE}/universe.webp`,
地球厅: `${HALL_ICON_BASE}/earth.jpg`, 地球厅: `${HALL_PREVIEW_BASE}/earth.webp`,
演化厅: `${HALL_ICON_BASE}/evolution.jpg`, 演化厅: `${HALL_PREVIEW_BASE}/evolution.webp`,
恐龙厅: `${HALL_ICON_BASE}/dinosaur.jpg`, 恐龙厅: `${HALL_PREVIEW_BASE}/dinosaur.webp`,
人类厅: `${HALL_ICON_BASE}/human.jpg`, 人类厅: `${HALL_PREVIEW_BASE}/human.webp`,
动物厅: `${HALL_ICON_BASE}/animal.jpg`, 动物厅: `${HALL_PREVIEW_BASE}/biology.webp`,
生物厅: `${HALL_ICON_BASE}/biology.jpg`, 生物厅: `${HALL_PREVIEW_BASE}/biology.webp`,
生态厅: `${HALL_ICON_BASE}/ecology.jpg`, 生态厅: `${HALL_PREVIEW_BASE}/ecology.webp`,
家园厅: `${HALL_ICON_BASE}/homeland.jpg` 家园厅: `${HALL_PREVIEW_BASE}/homeland.webp`
} }
const filteredHalls = computed(() => props.halls) const filteredHalls = computed(() => props.halls)
@@ -243,8 +243,8 @@ const emptyDescription = computed(() => {
return '暂无可选择的展厅讲解。' return '暂无可选择的展厅讲解。'
}) })
const hallIconUrl = (hall: ExplainHallSelectItem) => { const hallPreviewUrl = (hall: ExplainHallSelectItem) => {
return hall.image || hallIconMap[hall.name.trim()] || '' return hallPreviewMap[hall.name.trim()] || hall.image || ''
} }
const hallIconText = (name: string) => name.trim().slice(0, 1) || '讲' const hallIconText = (name: string) => name.trim().slice(0, 1) || '讲'

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB