feat: 新增诊断报告全流程功能,适配登录后报告跳转逻辑

实现了入门测/出门测报告的完整链路:
1. 新增UserInfo模型的出门测报告标记字段与相关接口
2. 新增全局报告路由拦截器,自动在登录后/应用回前台时检查报告状态
3. 新增报告相关API、页面与路由配置,包含欢迎页、H5壳子、AI计算页
4. 适配登录成功后的报告跳转逻辑,更新用户状态管理方法
This commit is contained in:
崔宝新
2026-09-09 16:49:51 +08:00
parent c0c673e2d2
commit 5e4cfe9ac6
13 changed files with 1441 additions and 18 deletions
+5
View File
@@ -55,6 +55,7 @@ class UserInfo {
this.avatar = '',
this.phone = '',
this.isShowReport = false,
this.isShowAfterReport = false,
});
final int userId;
@@ -64,6 +65,9 @@ class UserInfo {
final String phone;
final bool isShowReport;
/// 登录响应里的出门测试报告标记(对齐 Vue api/login/type.ts 的 UserInfo)
final bool isShowAfterReport;
factory UserInfo.fromJson(Map<String, dynamic> json) {
return UserInfo(
// userId 可能是字符串(后端统一风格),不能直接 as num
@@ -73,6 +77,7 @@ class UserInfo {
avatar: json['avatar'] as String? ?? '',
phone: json['phone'] as String? ?? '',
isShowReport: json['isShowReport'] as bool? ?? false,
isShowAfterReport: json['isShowAfterReport'] as bool? ?? false,
);
}
}