feat(personal): 持久化开发者模式状态并优化登录后数据加载

- 新增 kv-store 持久化开发者模式开关,避免每次冷启动丢失
- 登录成功后立即拉取用户资料,减少首页空数据闪烁
- 修复体重卡片在未登录时重复请求的问题
- 移除 ActivityHeatMap 与 userSlice 中的调试日志
- useAuthGuard 增加 token 调试输出(临时)
This commit is contained in:
richarjiang
2025-09-15 16:24:38 +08:00
parent 2357596665
commit 281149201b
7 changed files with 40 additions and 11 deletions

View File

@@ -12,7 +12,7 @@ import { PRIVACY_POLICY_URL, USER_AGREEMENT_URL } from '@/constants/Agree';
import { Colors } from '@/constants/Colors';
import { useAppDispatch } from '@/hooks/redux';
import { useColorScheme } from '@/hooks/useColorScheme';
import { login } from '@/store/userSlice';
import { fetchMyProfile, login } from '@/store/userSlice';
import Toast from 'react-native-toast-message';
export default function LoginScreen() {
@@ -113,6 +113,9 @@ export default function LoginScreen() {
}
await dispatch(login({ appleIdentityToken: identityToken })).unwrap();
// 拉取用户信息
await dispatch(fetchMyProfile())
Toast.show({
text1: '登录成功',
type: 'success',