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

+22 -6
View File
@@ -1,6 +1,7 @@
import { useEffect, useMemo, useRef, useState } from 'react'
import { ExhibitFlipOverlay, FlipActionButton, Image } from '@/components'
import { ExhibitFlipOverlay, FlipActionButton, Image, SceneHint } from '@/components'
import { cn, getBackgroundImage, getPublicPath, getStaticImage } from '@/lib/utils'
import { filterInput } from '@/lib/utils/sensitiveWords'
import { useNavigate, useParams } from 'react-router-dom'
import { saveZhanglepingStore, useZhanglepingStore } from '@/store/zhanglepingStore'
import {
@@ -37,6 +38,7 @@ const ZhanglepingDraw1 = () => {
const [createdArtworkSrc, setCreatedArtworkSrc] = useState('')
const [showCreatedOverlay, setShowCreatedOverlay] = useState(false)
const [showCompletionDialogue, setShowCompletionDialogue] = useState(false)
const [submitErrorHintKey, setSubmitErrorHintKey] = useState(0)
const captionInputRef = useRef<HTMLInputElement>(null)
const compositionRef = useRef<HTMLDivElement>(null)
@@ -84,15 +86,23 @@ const ZhanglepingDraw1 = () => {
}
if (isSubmitting || !compositionRef.current) return
const filteredCaptionText = filterInput(captionText.trim())
if (Array.from(filteredCaptionText).length > 15) {
setCaptionText(Array.from(filteredCaptionText).slice(0, 15).join(''))
setSubmitErrorHintKey((key) => key + 1)
return
}
setIsSubmitting(true)
try {
const dataUrl = await buildCompositeDataUrl(compositionRef.current)
setDrawArtwork(dataUrl, captionText.trim())
setDrawArtwork(dataUrl, filteredCaptionText)
saveZhanglepingStore()
setCreatedArtworkSrc(dataUrl)
setShowCreatedOverlay(true)
} catch (error) {
console.error('Failed to submit draw artwork', error)
setSubmitErrorHintKey((key) => key + 1)
} finally {
setIsSubmitting(false)
}
@@ -174,7 +184,7 @@ const ZhanglepingDraw1 = () => {
<div>①为三毛换装</div>
<div>②搭配1个新时代场景</div>
<div>③融入1-3个新时代元素</div>
<div>④配1句简短正能量文字</div>
<div>④配1句简短正能量文字(不超过15个字)</div>
</div>
</div>
</div>
@@ -210,13 +220,15 @@ const ZhanglepingDraw1 = () => {
name="textInput"
maxLength={15}
value={captionText}
onChange={(e) => setCaptionText(Array.from(e.target.value).slice(0, 15).join(''))}
onChange={(e) =>
setCaptionText(Array.from(filterInput(e.target.value)).slice(0, 15).join(''))
}
className={cn(
'w-200 h-24 bg-transparent',
'w-260 h-24 bg-transparent',
'text-4xl! text-[#8B6914] leading-none placeholder:text-3xl!'
)}
autoComplete="off"
placeholder="提交之前,请给你创作的我配一句简短的正能量文字吧!"
placeholder="提交之前,请给你创作的我配一句简短的正能量文字吧!(不超过15个字)"
/>
</div>
</div>
@@ -239,6 +251,10 @@ const ZhanglepingDraw1 = () => {
/>
</div>
<SceneHint when={submitErrorHintKey > 0} triggerKey={submitErrorHintKey} durationMs={3200}>
作品生成失败,请稍后再试
</SceneHint>
{createdArtworkSrc && (
<ExhibitFlipOverlay
src={createdArtworkSrc}