From e0aeafe06273494b61a60b515b0aa77f3fc79431 Mon Sep 17 00:00:00 2001 From: lyf <2514544224@qq.com> Date: Wed, 1 Jul 2026 16:02:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4H5=E4=B8=9A=E5=8A=A1=E9=97=AD?= =?UTF-8?q?=E7=8E=AF=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/copy-h5-nav-assets.cjs | 16 ++ src/components/audio/AudioPlayer.vue | 5 +- .../adapters/backendExplainDataAdapter.ts | 24 ++- .../backendExplainContentProvider.ts | 5 +- src/pages/exhibit/detail.vue | 43 ++--- src/pages/hall/detail.vue | 38 ++-- src/pages/index/index.vue | 26 +-- src/pages/route/detail.vue | 179 +++++++++++++++++- src/repositories/GuideRepository.ts | 36 +++- .../PublishedExhibitAudioRepository.ts | 1 + src/usecases/explainUseCase.ts | 8 +- src/usecases/guideUseCase.ts | 89 +++++++++ src/utils/placeholders.ts | 2 + src/utils/publicUrl.ts | 5 +- src/view-models/explainViewModels.ts | 14 +- static/exhibit-placeholder.jpg | Bin 0 -> 928 bytes static/hall-placeholder.jpg | Bin 0 -> 1467 bytes static/icons/halls/animal.jpg | Bin 0 -> 928 bytes static/icons/halls/biology.jpg | Bin 0 -> 928 bytes static/icons/halls/dinosaur.jpg | Bin 0 -> 1441 bytes static/icons/halls/earth.jpg | Bin 0 -> 1467 bytes static/icons/halls/ecology.jpg | Bin 0 -> 1090 bytes static/icons/halls/evolution.jpg | Bin 0 -> 1129 bytes static/icons/halls/homeland.jpg | Bin 0 -> 1165 bytes static/icons/halls/human.jpg | Bin 0 -> 1576 bytes static/icons/halls/universe.jpg | Bin 0 -> 1317 bytes 26 files changed, 396 insertions(+), 95 deletions(-) create mode 100644 src/utils/placeholders.ts create mode 100644 static/exhibit-placeholder.jpg create mode 100644 static/hall-placeholder.jpg create mode 100644 static/icons/halls/animal.jpg create mode 100644 static/icons/halls/biology.jpg create mode 100644 static/icons/halls/dinosaur.jpg create mode 100644 static/icons/halls/earth.jpg create mode 100644 static/icons/halls/ecology.jpg create mode 100644 static/icons/halls/evolution.jpg create mode 100644 static/icons/halls/homeland.jpg create mode 100644 static/icons/halls/human.jpg create mode 100644 static/icons/halls/universe.jpg diff --git a/scripts/copy-h5-nav-assets.cjs b/scripts/copy-h5-nav-assets.cjs index f4349a0..245f95e 100644 --- a/scripts/copy-h5-nav-assets.cjs +++ b/scripts/copy-h5-nav-assets.cjs @@ -41,10 +41,26 @@ const copyStaticSubtree = (subtree) => { console.log(`Copied ${subtree} assets to ${path.relative(projectRoot, targetDir)}`) } +const copyStaticFile = (fileName) => { + const sourceFile = path.join(projectRoot, 'static', fileName) + const targetFile = path.join(h5Root, 'static', fileName) + + if (!fs.existsSync(sourceFile)) { + throw new Error(`Static file not found: ${sourceFile}`) + } + + fs.mkdirSync(path.dirname(targetFile), { recursive: true }) + fs.copyFileSync(sourceFile, targetFile) + console.log(`Copied ${fileName} to ${path.relative(projectRoot, targetFile)}`) +} + copyStaticSubtree('nav-assets') copyStaticSubtree('guide-data') +copyStaticSubtree('icons') copyStaticSubtree('sgs-map-sdk') copyStaticSubtree('three') +copyStaticFile('exhibit-placeholder.jpg') +copyStaticFile('hall-placeholder.jpg') if (fs.existsSync(faviconSource)) { fs.copyFileSync(faviconSource, faviconTarget) diff --git a/src/components/audio/AudioPlayer.vue b/src/components/audio/AudioPlayer.vue index 1f43f6a..013987b 100644 --- a/src/components/audio/AudioPlayer.vue +++ b/src/components/audio/AudioPlayer.vue @@ -11,7 +11,7 @@ @@ -56,6 +56,9 @@