fix: 修复开发/测试包模拟进度被易班同步覆盖的问题

进度模拟面板写入 puzzleStore 后,App 启动时易班同步会将其覆盖;
现在在同步完成后按 sessionStorage 中保存的模式重放模拟进度,
确保测试包的"到达某故居/全流程完成"调试入口生效。

同时纳入近期未提交的页面、组件、资源与环境变量改动。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
zhongyidianandClaude Opus 4.7 committed 2026-05-23 10:19:36 +08:00
1 parent 6d40e19346
commit 49ecabbf3a
155 files changed
+1956 -724

No files matched your search

+48 -17
View File
@@ -46,7 +46,6 @@ const NieerReflection = () => {
openScene,
enterUnlock,
handleShare,
finishBadgeVideo,
close,
} = useDialogReducer(markReflectionCursorVisited, setReflectionWork)
@@ -63,25 +62,42 @@ const NieerReflection = () => {
)
const [endingVisible, setEndingVisible] = useState(false)
const [pendingBadgeVideoSrc, setPendingBadgeVideoSrc] = useState<string>()
const [playingBadgeVideoSrc, setPlayingBadgeVideoSrc] = useState<string>()
const [pendingEndingVisible, setPendingEndingVisible] = useState(false)
const prevDialogModeRef = useRef(dialogState.mode)
useEffect(() => {
if (
prevDialogModeRef.current === 'result' &&
dialogState.mode === 'idle' &&
allPlacesCompleted
) {
triggerPuzzleAnimation(14)
setEndingVisible(true)
if (prevDialogModeRef.current === 'result' && dialogState.mode === 'idle') {
if (pendingBadgeVideoSrc) {
setPlayingBadgeVideoSrc(pendingBadgeVideoSrc)
setPendingBadgeVideoSrc(undefined)
}
if (allPlacesCompleted) {
triggerPuzzleAnimation(14)
if (pendingBadgeVideoSrc) {
setPendingEndingVisible(true)
} else {
setEndingVisible(true)
}
}
}
prevDialogModeRef.current = dialogState.mode
}, [dialogState.mode, allPlacesCompleted, triggerPuzzleAnimation])
}, [dialogState.mode, allPlacesCompleted, pendingBadgeVideoSrc, triggerPuzzleAnimation])
const handleResultShare = (sceneId: number, payload?: Record<string, unknown>) => {
handleShare({
payload,
unlockVideoSrc: getUnlockVideoSrcForScene(sceneId, visitedReflectionCursors),
})
const unlockVideoSrc = getUnlockVideoSrcForScene(sceneId, visitedReflectionCursors)
setPendingBadgeVideoSrc(unlockVideoSrc)
handleShare({ payload })
}
const finishBadgeVideo = () => {
setPlayingBadgeVideoSrc(undefined)
if (pendingEndingVisible) {
setPendingEndingVisible(false)
setEndingVisible(true)
}
}
if (!moduleName) return null
@@ -108,7 +124,7 @@ const NieerReflection = () => {
<Image
className="absolute right-6 top-5 z-30"
src={getStaticImage('components/返回')}
src={getStaticImage('components/离开')}
button
onClick={() => navigate(`/${moduleName}/${starName}/home`)}
/>
@@ -295,18 +311,33 @@ const NieerReflection = () => {
state={dialogState}
onEnterUnlock={enterUnlock}
onShare={handleResultShare}
onFinishBadgeVideo={finishBadgeVideo}
onClose={close}
/>
{playingBadgeVideoSrc && (
<div className="fixed inset-0 z-10000 w-full h-full bg-black">
<Video
key={playingBadgeVideoSrc}
src={playingBadgeVideoSrc}
autoPlay
playsInline
showSkipButton
skipText="跳过"
onEnded={finishBadgeVideo}
onSkip={finishBadgeVideo}
onError={finishBadgeVideo}
/>
</div>
)}
<StudyGuideModal
visible={showGuideModal}
onContinue={markReflectionGuideSeen}
audioSrc={getPublicPath('audio/nieer/mp3_nieer_28.mp3')}
firstLineIndent="2em"
>
{`同学你好,欢迎来到”跨越时空·体悟”学习模块!
请登陆”时空回溯・亲历时代”体验仓,下一站:1936年,上海。
{`同学你好,欢迎来到“跨越时空·体悟”学习模块!
请登陆“时空回溯・亲历时代”体验仓,下一站:1936年,上海。
请带上你的旅行包,穿越时空解锁6个国歌故事,集齐精神徽章,绘制属于你的国歌精神图谱吧~
别忘了右下角的旅行箱哦,它会记录你每段旅行的成果!时空门已开,请出发吧!`}
</StudyGuideModal>