gcx/frontend
hailin 184a7d16db feat: 三端集成 App升级 + 内部推送 + FCM外部推送框架 (genex-mobile/admin-app/mobile)
从 rwadurian/frontend/mobile-app 移植升级系统和通知系统到 Genex 三个 Flutter 客户端,
适配目标项目轻量架构(ValueNotifier 替代 Riverpod,Dio HTTP 客户端,移除 screenutil)。

## 新增核心模块 (每个 app 13 个 Dart 文件)

### 升级系统 (core/updater/)
- UpdateService: 统一升级服务单例,支持 Google Play + 自建服务器双渠道
- VersionChecker: 版本检测器,调用 GET /api/app/version/check
- DownloadManager: APK 下载管理,支持断点续传 + SHA256 校验
- ApkInstaller: APK 安装器 (Platform Channel)
- AppMarketDetector: 应用市场来源检测
- SelfHostedUpdater: 自建服务器渠道更新对话框 (i18n 化)
- GooglePlayUpdater: Google Play 应用内更新

### 通知系统 (core/services/ + core/providers/)
- NotificationService: 通知 + 公告 API 服务
  - GET /notifications, /notifications/unread-count
  - PUT /notifications/:id/read
  - GET /announcements, /announcements/unread-count
  - PUT /announcements/:id/read, /announcements/read-all
- NotificationBadgeManager: 未读徽章管理器
  - ValueNotifier<int> 驱动 UI
  - 30秒定时自动刷新 + 前后台切换刷新 (WidgetsBindingObserver)

### FCM 推送框架 (core/push/)
- PushService: Firebase 推送服务框架
  - Firebase 代码注释保护,无配置文件时静默跳过
  - 设备 token 注册 POST /device-tokens
  - 待 Firebase 配置文件就绪后取消注释即可启用

### HTTP 客户端 (core/network/)
- ApiClient: Dio 封装单例,baseUrl = https://api.gogenex.cn

## Android 原生配置 (每个 app)
- AndroidManifest.xml: 添加 REQUEST_INSTALL_PACKAGES 权限 + FileProvider
- res/xml/file_paths.xml: FileProvider 路径配置
- MainActivity.kt: APK 安装器 + 应用市场检测 MethodChannel

## UI 层改造 (每个 app)
- main.dart: 异步启动,初始化 UpdateService/PushService/NotificationBadgeManager
- MainShell: 消息 Tab 徽章改为 ValueListenableBuilder 动态未读数,进入后 3 秒检查更新
- SettingsPage: StatefulWidget 化,动态版本号 (PackageInfo),点击版本号手动检查更新
- MessagePage: 移除 mock 数据,接入 NotificationService API,4 Tab 分类 + 下拉刷新 + 标记已读

## i18n 新增 (~35 keys/语言)
- update.*: 25 个升级相关 keys
- notification.*: 9 个通知相关 keys
- genex-mobile: 4 语言 (zh_CN/zh_TW/en/ja) 分文件
- admin-app: 3 语言 (zh_CN/en_US/ja_JP) 内联单文件
- mobile: 4 语言 (zh_CN/zh_TW/en/ja) 分文件

## 三端差异化配置
| App | MethodChannel 前缀 | applicationId |
|-----|-------------------|---------------|
| genex-mobile | cn.gogenex.consumer | cn.gogenex.consumer |
| admin-app | cn.gogenex.issuer | cn.gogenex.issuer |
| mobile | cn.gogenex.mobile | cn.gogenex.mobile |

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 07:02:14 -08:00
..
admin-app feat: 三端集成 App升级 + 内部推送 + FCM外部推送框架 (genex-mobile/admin-app/mobile) 2026-02-13 07:02:14 -08:00
admin-web feat: 全部前端项目完成国际化(i18n),支持中/英/日三语言 2026-02-12 03:45:37 -08:00
genex-mobile feat: 三端集成 App升级 + 内部推送 + FCM外部推送框架 (genex-mobile/admin-app/mobile) 2026-02-13 07:02:14 -08:00
miniapp/src feat: 小程序功能移植,新增12页面+160 i18n keys,覆盖率提升至~70% 2026-02-12 04:16:33 -08:00
mobile feat: 三端集成 App升级 + 内部推送 + FCM外部推送框架 (genex-mobile/admin-app/mobile) 2026-02-13 07:02:14 -08:00
.gitignore feat: Add Flutter build configuration for admin-app and mobile 2026-02-11 06:22:13 -08:00
build.bat feat: Add Flutter build configuration for admin-app and mobile 2026-02-11 06:22:13 -08:00
build.sh feat: Add Flutter build configuration for admin-app and mobile 2026-02-11 06:22:13 -08:00