@@ -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) || '讲'
|
||||||
|
|||||||
BIN
static/explain/hall-previews/biology.webp
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
static/explain/hall-previews/dinosaur.webp
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
static/explain/hall-previews/earth.webp
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
static/explain/hall-previews/ecology.webp
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
static/explain/hall-previews/evolution.webp
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
static/explain/hall-previews/homeland.webp
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
static/explain/hall-previews/human.webp
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
static/explain/hall-previews/universe.webp
Normal file
|
After Width: | Height: | Size: 3.8 KiB |