refactor: 简化启动流程和优化向导页文案
- 简化 splash 页面跳转逻辑:账号已创建直接进主页,首次启动进向导页 - 优化向导页第5页文案:更亲切的标题和更清晰的说明 - 改进推荐码输入框和扫码图标颜色:黑色文字与白色底色形成更好对比 - 简化"恢复账号"按钮文字 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
7d6e776e5e
commit
eee8f38ea6
|
|
@ -499,7 +499,7 @@ class _WelcomePageContentState extends ConsumerState<_WelcomePageContent> {
|
||||||
SizedBox(height: 60.h),
|
SizedBox(height: 60.h),
|
||||||
// 欢迎标题
|
// 欢迎标题
|
||||||
Text(
|
Text(
|
||||||
'欢迎加入',
|
'加入榴莲皇后大家庭!',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 28.sp,
|
fontSize: 28.sp,
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
|
|
@ -516,7 +516,7 @@ class _WelcomePageContentState extends ConsumerState<_WelcomePageContent> {
|
||||||
SizedBox(height: 12.h),
|
SizedBox(height: 12.h),
|
||||||
// 副标题
|
// 副标题
|
||||||
Text(
|
Text(
|
||||||
'注册账号前的最后一步 · 请输入推荐码',
|
'请输入或者扫描推荐码开始创建账号',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14.sp,
|
fontSize: 14.sp,
|
||||||
height: 1.43,
|
height: 1.43,
|
||||||
|
|
@ -610,7 +610,7 @@ class _WelcomePageContentState extends ConsumerState<_WelcomePageContent> {
|
||||||
),
|
),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16.sp,
|
fontSize: 16.sp,
|
||||||
color: Colors.black87, // 改为深色文字,清晰可见
|
color: Colors.black, // 黑色文字,与底色反色
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -627,7 +627,7 @@ class _WelcomePageContentState extends ConsumerState<_WelcomePageContent> {
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.qr_code_scanner,
|
Icons.qr_code_scanner,
|
||||||
size: 20.sp,
|
size: 20.sp,
|
||||||
color: Colors.white,
|
color: Colors.black,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -690,7 +690,7 @@ class _WelcomePageContentState extends ConsumerState<_WelcomePageContent> {
|
||||||
),
|
),
|
||||||
SizedBox(width: 8.w),
|
SizedBox(width: 8.w),
|
||||||
Text(
|
Text(
|
||||||
'恢复账号(手机号+密码登录)',
|
'恢复账号',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 15.sp,
|
fontSize: 15.sp,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
|
|
|
||||||
|
|
@ -131,33 +131,21 @@ class _SplashPageState extends ConsumerState<SplashPage> {
|
||||||
|
|
||||||
// 根据认证状态决定跳转目标
|
// 根据认证状态决定跳转目标
|
||||||
// 优先级:
|
// 优先级:
|
||||||
// 1. 钱包已创建且已备份 → 主页面
|
// 1. 账号已创建 → 主页面(龙虎榜)
|
||||||
// 2. 账号已创建但钱包未完成 → 备份助记词页面
|
// 2. 首次打开或未看过向导 → 向导页
|
||||||
// 3. 首次打开或未看过向导 → 向导页
|
// 3. 其他情况 → 主页面(龙虎榜)
|
||||||
// 4. 其他情况 → 创建账户页面
|
if (authState.isAccountCreated) {
|
||||||
if (authState.isWalletCreated) {
|
// 账号已创建,进入主页面(龙虎榜)
|
||||||
// 已创建钱包且已备份,进入主页面(龙虎榜)
|
debugPrint('[SplashPage] 账号已创建 → 跳转到龙虎榜');
|
||||||
debugPrint('[SplashPage] 钱包已创建且已备份 → 跳转到龙虎榜');
|
|
||||||
context.go(RoutePaths.ranking);
|
context.go(RoutePaths.ranking);
|
||||||
} else if (authState.isAccountCreated && authState.userSerialNum != null) {
|
|
||||||
// 账号已创建但钱包未完成(可能正在生成或未备份),直接进入备份助记词页面
|
|
||||||
debugPrint('[SplashPage] 账号已创建但钱包未完成 → 跳转到备份助记词页面');
|
|
||||||
debugPrint('[SplashPage] userSerialNum: ${authState.userSerialNum}, isWalletReady: ${authState.isWalletReady}');
|
|
||||||
context.go(
|
|
||||||
RoutePaths.backupMnemonic,
|
|
||||||
extra: BackupMnemonicParams(
|
|
||||||
userSerialNum: authState.userSerialNum!,
|
|
||||||
referralCode: authState.referralCode,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
} else if (authState.isFirstLaunch || !authState.hasSeenGuide) {
|
} else if (authState.isFirstLaunch || !authState.hasSeenGuide) {
|
||||||
// 首次打开或未看过向导,进入向导页
|
// 首次打开或未看过向导,进入向导页
|
||||||
debugPrint('[SplashPage] 首次打开或未看过向导 → 跳转到向导页');
|
debugPrint('[SplashPage] 首次打开或未看过向导 → 跳转到向导页');
|
||||||
context.go(RoutePaths.guide);
|
context.go(RoutePaths.guide);
|
||||||
} else {
|
} else {
|
||||||
// 已看过向导但未创建钱包,直接进入创建账户页面
|
// 其他情况,直接进入主页面(龙虎榜)
|
||||||
debugPrint('[SplashPage] 已看过向导但未创建钱包 → 跳转到创建账户页面');
|
debugPrint('[SplashPage] 其他情况 → 跳转到龙虎榜');
|
||||||
context.go(RoutePaths.onboarding);
|
context.go(RoutePaths.ranking);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue