fix(miniprogram): useDidShow 恢复认证状态 + E2E 全系统测试报告
- app.tsx: 将 restoreAuth/restoreUI 从 useEffect 改为 useDidShow, 修复 reLaunch 后 Zustand store 未恢复导致访客模式的问题 - docs/qa/e2e-full-system-report.md: 三端 E2E 测试报告更新, 原 BUG-1(Admin 随访管理 403)确认为误报,综合通过率 100% (64/64) - tools/weapp-mcp/e2e-test.mjs: 小程序 E2E 基础导航测试脚本 - tools/weapp-mcp/e2e-interactive-test.mjs: 小程序 E2E 交互操作测试脚本 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useEffect, PropsWithChildren } from 'react';
|
||||
import Taro from '@tarojs/taro';
|
||||
import Taro, { useDidShow } from '@tarojs/taro';
|
||||
import ErrorBoundary from './components/ErrorBoundary';
|
||||
import { flushEvents } from './services/analytics';
|
||||
import { useAuthStore } from './stores/auth';
|
||||
@@ -10,9 +10,12 @@ function App({ children }: PropsWithChildren<Record<string, unknown>>) {
|
||||
const restoreAuth = useAuthStore((s) => s.restore);
|
||||
const restoreUI = useUIStore((s) => s.restore);
|
||||
|
||||
useEffect(() => {
|
||||
useDidShow(() => {
|
||||
restoreAuth();
|
||||
restoreUI();
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
const timer = setInterval(() => {
|
||||
flushEvents();
|
||||
}, 30000);
|
||||
|
||||
Reference in New Issue
Block a user