Files
shanghai-residences/src/main.tsx
T
zhongyidianandClaude Opus 4.7 49ecabbf3a fix: 修复开发/测试包模拟进度被易班同步覆盖的问题
进度模拟面板写入 puzzleStore 后,App 启动时易班同步会将其覆盖;
现在在同步完成后按 sessionStorage 中保存的模式重放模拟进度,
确保测试包的"到达某故居/全流程完成"调试入口生效。

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

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 10:19:36 +08:00

41 lines
1.1 KiB
TypeScript

import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App'
if (import.meta.env.VITE_DEBUG_ENTRY === 'true' && typeof window !== 'undefined') {
import('@/debug/progressionDebug').then(({ setupProgressionDebug }) => {
setupProgressionDebug()
})
}
// 在开发模式的移动端启用 vConsole(需先安装 vconsole 依赖)
if (import.meta.env.DEV && typeof window !== 'undefined') {
const ua = window.navigator.userAgent.toLowerCase()
const isMobile = /iphone|ipad|ipod|android|mobile/.test(ua)
if (isMobile) {
// 动态加载,避免生产环境打包 & 未安装时报错
import('vconsole')
.then((mod) => {
const VConsole = (mod as any).default || (mod as any)
new VConsole()
})
.catch(() => {
// vconsole 未安装或加载失败时静默忽略
})
}
}
const rootElement = document.getElementById('root')
if (!rootElement) {
throw new Error('Root element not found')
}
createRoot(rootElement).render(
<StrictMode>
<App />
</StrictMode>
)