hailin
8a4508fe0d
feat(pre-planting): Mobile App 预种购买页面完整实现
...
[2026-02-17] 预种计划购买页面 (pre_planting_purchase_page.dart)
完整功能:
- 并行加载数据(余额 + 配置 + 资格 + 持仓)
- 余额卡片:显示绿积分可用余额,支持刷新
- 合并进度卡片:显示当前 N/5 份进度条 + 已合成树数
- 省市选择:首次购买使用 city_pickers 选择,续购自动锁定复用
- 份数选择器:+/- 按钮 + 输入框,自动校验余额和资格限制
- 价格明细:单价 3171 USDT、最大可购买数、本次总价
- 购买确认弹窗:含合并预告(购买后将自动合成提示)
- 开关关闭禁用态:显示不可购买原因
- 错误重试、加载中状态完备
UI 风格与现有认种页面 (planting_quantity_page) 完全一致:
- 渐变背景 (#FFF7E6 → #EAE0C8)
- 金色主色调 (#D4AF37)
- 棕色文字 (#5D4037)
- 卡片容器带阴影
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 05:38:44 -08:00
hailin
1f9129d220
feat(pre-planting): Mobile App 预种计划路由注册 + 占位页面
...
[2026-02-17] 新增预种计划的 GoRouter 路由和占位页面:
1. route_paths.dart / route_names.dart(各 +5 行)
- /pre-planting/purchase 购买页
- /pre-planting/position 持仓页
- /pre-planting/merge/:mergeNo 合并详情页
2. app_router.dart(+28 行)
- 3 个 GoRoute 注册
3. 占位页面(3 个新文件)
- pre_planting_purchase_page.dart
- pre_planting_position_page.dart
- pre_planting_merge_detail_page.dart
后续将逐步填充完整 UI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 05:33:26 -08:00
hailin
27751731e8
feat(pre-planting): Mobile App 预种计划 Service 层
...
[2026-02-17] 新增预种计划的 Flutter 端 API 服务层:
1. pre_planting_service.dart(新增)
- PrePlantingService:预种 API 调用(配置/资格/持仓/订单/合并/签约)
- 数据模型:PrePlantingPosition、PrePlantingOrder、PrePlantingMerge 等
- 与现有 PlantingService 完全独立
2. api_endpoints.dart(+10 行)
- 添加 /pre-planting/* 端点常量
3. injection_container.dart(+9 行)
- 注册 prePlantingServiceProvider
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 05:31:39 -08:00
hailin
5bacd21840
feat(mobile-app): 为3个主导航页面添加下拉刷新功能
...
- TradingPage (兑换): 添加 RefreshIndicator,刷新时重新加载钱包和收益数据
- RankingPage (龙虎榜): 添加 RefreshIndicator,刷新时 invalidate leaderboardStatusProvider
- 列表视图和待开启状态视图均支持下拉刷新
- MiningPage (监控): 使用 LayoutBuilder + IntrinsicHeight 模式实现
- 刷新时并行加载用户数据、授权数据和钱包状态
注:ProfilePage 已有完整的下拉刷新实现,无需修改
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 21:50:43 -08:00
hailin
1c621c32ec
feat(mobile-app): 暂时隐藏自助申请授权页面的"省团队"选项
...
- 在 _buildAuthorizationTypes() 方法中过滤掉 AuthorizationType.provinceTeam
- 现在"自助申请授权"页面只显示"社区"和"市团队"两个选项
- 原代码以注释形式保留,方便未来需要时快速恢复
- 相关枚举和后端逻辑保持不变,仅前端UI隐藏
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 17:46:02 -08:00
hailin
207b522754
feat(customer-service): 客服联系方式从硬编码改为后台可配置
...
将 mobile-app "联系客服" 弹窗的微信/QQ联系方式从硬编码改为
admin-web 后台动态配置,支持任意数量的联系方式管理。
## Backend (admin-service)
- 新增 Prisma 模型: ContactType 枚举(WECHAT/QQ) + CustomerServiceContact
- 新增迁移 SQL: 建表 + 2条索引 + 4条种子数据(保留现有硬编码联系方式)
- 新增双 Controller (参考 app-asset.controller.ts 模式):
- AdminCustomerServiceContactController (admin/customer-service-contacts)
GET 列表 / POST 新增 / PUT 更新 / DELETE 删除
- PublicCustomerServiceContactController (customer-service-contacts)
GET 仅返回 isEnabled=true,按 sortOrder 排序
- 注意: 公开 Controller 用 @Controller('customer-service-contacts')
避免与全局前缀 api/v1 双重叠加
## Kong 网关
- 新增路由 admin-customer-service-contacts-public
路径 /api/v1/customer-service-contacts → admin-service:3010
- Admin 端点由已有 admin-api 路由 (/api/v1/admin) 覆盖
## Admin-web
- endpoints.ts: 新增 CUSTOMER_SERVICE_CONTACTS 端点组
- customerServiceContactService.ts: CRUD 服务 (list/create/update/delete)
- settings/page.tsx: 新增"客服联系方式管理"区块
表格展示(排序/类型/标签/联系方式/启停/操作) + 内联新增/编辑表单
- settings.module.scss: contactTable / contactForm / contactFormFields 样式
## Flutter Mobile-app
- storage_keys.dart: 新增 cachedCustomerServiceContacts 缓存 key
- customer_service_contact_service.dart: API + 缓存服务
(内存5分钟TTL + SharedPreferences持久化 + 后台静默刷新)
- injection_container.dart: 注册 customerServiceContactServiceProvider
- profile_page.dart: _showCustomerServiceDialog() 从硬编码改为
动态 API 加载,contacts 为空时显示"暂无客服联系方式"占位符
## 文件清单 (4 新建 + 9 修改)
新建:
- backend/.../migrations/20260205100000_add_customer_service_contacts/migration.sql
- backend/.../controllers/customer-service-contact.controller.ts
- frontend/admin-web/src/services/customerServiceContactService.ts
- frontend/mobile-app/lib/core/services/customer_service_contact_service.dart
修改:
- backend/.../prisma/schema.prisma
- backend/.../src/app.module.ts
- backend/api-gateway/kong.yml
- frontend/admin-web/src/infrastructure/api/endpoints.ts
- frontend/admin-web/src/app/(dashboard)/settings/page.tsx
- frontend/admin-web/src/app/(dashboard)/settings/settings.module.scss
- frontend/mobile-app/lib/core/storage/storage_keys.dart
- frontend/mobile-app/lib/core/di/injection_container.dart
- frontend/mobile-app/lib/features/profile/presentation/pages/profile_page.dart
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 05:00:25 -08:00
hailin
34ba209e44
fix(app-assets): 修复公开API路径双重前缀 + Kong网关路由缺失
...
问题:移动端配置的开屏图/引导图无效
根因:
1. PublicAppAssetController 和 PublicSystemConfigController 的
@Controller('api/v1/xxx') 与 NestJS 全局前缀 api/v1 叠加,
导致实际端点为 api/v1/api/v1/xxx(双重前缀)
2. Kong 网关缺少 /api/v1/app-assets 和 /api/v1/system-config 路由
3. Flutter 端使用 /admin-service/api/v1/xxx 路径,不匹配任何 Kong 路由
修复:
- 后端:Controller 路径去掉 api/v1 前缀,由全局前缀统一添加
- Kong:新增 admin-app-assets-public 和 admin-system-config-public 路由
- Flutter:API 路径改为 /app-assets 和 /system-config/display/settings
受影响文件:
- backend/api-gateway/kong.yml (新增2条路由)
- backend/.../app-asset.controller.ts (Controller路径修正)
- backend/.../system-config.controller.ts (Controller路径修正)
- frontend/.../app_asset_service.dart (API路径修正)
- frontend/.../system_config_service.dart (API路径修正)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 04:36:53 -08:00
hailin
f13814e577
fix(mobile-app): 排名详情页隐藏敏感统计字段
...
火柴人排名详情页 (UserProfilePage) 暂时隐藏以下显示元素(代码保留,注释隐藏):
- 统计卡片:引荐数、同伴数、本人认种数(仅保留"同伴认种")
- 基本信息卡片:用户ID (accountSequence)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 17:41:11 -08:00
hailin
d075853a7f
feat(app-assets): 应用图片管理 — 开屏图/引导图可从 admin-web 配置
...
新增从 admin-web 后台管理开屏图(2张)和引导图(5张+标题/副标题)的完整功能链路。
移动端优先使用后台配置的远程图片,无配置或加载失败时自动回退到本地 asset。
### Backend (admin-service)
- Prisma schema 新增 AppAssetType 枚举 + AppAsset 模型 (type/sortOrder 唯一约束)
- 新增 AdminAppAssetController: 图片上传(multipart)、列表查询、元数据更新、删除
- 新增 PublicAppAssetController: 公开查询接口供移动端消费 (仅返回 isEnabled=true)
- 新增数据库 migration: 20260204100000_add_app_assets
### Admin-web
- endpoints.ts 新增 APP_ASSETS 端点组
- 新增 appAssetService.ts: list/upload/update/delete 方法
- Settings 页新增"应用图片管理"区块: 开屏图 2 卡槽 + 引导图 5 卡槽
- 每个卡槽支持: 图片上传预览、启用/禁用开关、删除、引导图额外支持标题和副标题编辑
### Mobile-app (Flutter)
- 新增 AppAssetService: 3 级缓存策略 (内存 5min TTL → SharedPreferences → 后台静默刷新)
- splash_page.dart: 支持远程开屏图 (CachedNetworkImage),fallback 到本地 asset
- guide_page.dart: 支持远程引导图+标题/副标题覆盖,fallback 到本地 asset
- 替换 2 张开屏图为新版 (1280x1826/1834, ~245KB)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 11:20:26 -08:00
hailin
d9f9ae5122
chore(mobile-app): 更新开屏静态图片
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 10:42:53 -08:00
hailin
dd1531fbb8
fix(mobile-app): 移除pubspec.yaml中已删除的splash_frames目录
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 10:36:01 -08:00
hailin
57239e81dd
chore(mobile-app): 优化开屏资源和UI文案
...
- 删除36张帧动画图片减小包体积
- 静态开屏图片从3张改为2张
- 将"权益激活"改为"权益已激活"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 10:29:37 -08:00
hailin
dab4b0674d
fix(mobile-app): 修复引荐列表展开无法显示更多数据的问题
...
- 使用实际总数作为limit参数请求API
- 添加调试日志便于排查
- 优化:已加载全部数据时直接展开不重复请求
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 09:13:07 -08:00
hailin
8eb5b410cc
feat(mobile-app): 引荐列表支持展开/收拢功能
...
- 初始只显示前10条引荐记录
- 超过10人时显示"..."按钮可点击展开全部
- 展开后显示"收起"按钮可点击收拢
- 加载更多时显示loading指示器
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 08:59:03 -08:00
hailin
4ee355a7cd
fix(mobile-app): 开屏图片改为保持原比例不拉伸
...
使用 BoxFit.contain 替代 BoxFit.cover,
图片保持原比例显示,不足部分用黑边填充。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 08:51:26 -08:00
hailin
96695575d5
feat(mobile-app): 启用兑换页面的划转功能
...
移除划转按钮的临时禁用标志,恢复正常功能。
用户点击划转按钮后将跳转到划转页面。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 08:48:45 -08:00
hailin
414fe95d04
feat(mobile-app): 开屏页改为随机静态图片模式
...
- 禁用帧动画,改为显示随机静态图片(3张中随机选1张)
- 显示3秒后自动跳转,保留跳过按钮
- 帧动画代码保留备用,可通过 _useStaticImage 开关切换
- 新增 splash_static 目录存放静态图片
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 08:19:25 -08:00
hailin
fabfbb73fe
fix(mobile-app): 修复开机动画卡住问题
...
问题原因:
1. TelemetryConfig.syncFromRemote() URL拼接错误,导致请求无效路径
2. 遥测配置同步使用await阻塞,即使失败也要等待超时
修复内容:
1. 修正URL拼接:apiBaseUrl已包含/api/v1,不再重复添加
2. 将超时时间从10秒缩短为5秒
3. 将遥测配置同步改为非阻塞,不再await等待
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 08:08:21 -08:00
hailin
7a4a207bed
feat(mobile-app): 增强合同PDF下载可靠性和用户体验
...
- PDF下载增加10次自动重试机制,使用指数退避策略
- 超时时间延长至300秒,适应大文件和慢网络
- 新增下载进度显示(百分比圆环)
- 失败后显示重试按钮,区分任务加载错误和PDF下载错误
- ApiClient.get方法新增cancelToken和onReceiveProgress参数支持
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 07:12:21 -08:00
hailin
f7b2267583
feat(mobile-app): 临时禁用划转功能
...
划转功能暂时维护中,点击按钮会显示提示信息。
恢复时将 isTransferDisabled 改为 false 即可。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 02:56:26 -08:00
hailin
990f218051
fix(mobile-app): 修复认种订单解析和状态检查问题
...
1. 修复 getMyOrders 解析:兼容后端直接返回数组格式
2. 添加 MINING_ENABLED 订单状态枚举和解析
3. 在 ADOPTION_WIZARD 完成检查中包含 miningEnabled 状态
问题原因:
- 后端返回订单列表格式是直接数组 [...],前端期望的是 {items: [...]}
- 后端返回的 MINING_ENABLED 状态未在前端枚举中定义
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 02:49:31 -08:00
hailin
96a84cc281
fix(mobile-app): 修复认种向导完成后无法返回待办页面的问题
...
问题:认种向导完成后使用 context.go() 跳转到合同签署页面,
替换了整个导航栈,导致合同签署完成后无法返回待办页面继续处理其他待办。
修复:改用 context.push() 跳转到合同签署页面,保留导航栈,
合同签署完成后可以正确返回待办页面。
同时添加了详细的调试日志,便于排查问题。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 02:43:23 -08:00
hailin
1a617e02f8
fix(mobile-app): 将授权申请页面的'伞下'改为'下'
2026-01-09 02:23:20 -08:00
hailin
d1a52e74a0
fix(mobile-app): 修复认种向导待办操作无法正确标记完成的问题
...
问题:用户完成认种并签署合同后,ADOPTION_WIZARD待办操作没有被标记为完成,
导致用户被卡在待办操作页面无法进入App。
原因:原来的检查逻辑只检查是否有"待签合同",当用户已签署合同后,
pendingTasks为空,返回false,导致待办操作无法完成。
修复方案:
- 改为检查用户是否有已支付的认种订单(PAID/FUND_ALLOCATED状态)
- 通过比较订单创建时间和待办操作创建时间来判断
- 订单在待办操作之后创建 → 已完成
- 订单在待办操作之前但相差不超过24小时 → 也认为已完成(兼容延迟)
- 保留待签合同的备用检查逻辑
影响范围:仅影响ADOPTION_WIZARD待办操作的完成检测
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 02:03:22 -08:00
hailin
4f55d86050
feat(mobile-app): 更新客服联系方式
...
- 客服微信1: liulianhuanghou1
- 客服微信2: liulianhuanghou2
- 客服QQ1: 1502109619
- 客服QQ2: 2171447109
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 03:10:50 -08:00
hailin
1b237778ee
feat(mobile-app): 添加联系客服功能
...
在个人中心设置菜单中添加"联系客服"入口,点击后显示弹窗,
用户可以查看客服的QQ号和微信号,并支持一键复制到剪贴板。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 23:56:59 -08:00
hailin
5419b15bf1
fix(mobile-app): 已结算数据改为从流水统计API获取
...
- 从 wallet-service 的 getLedgerStatistics() 获取 REWARD_SETTLED 类型的总金额
- 与流水明细中的结算记录统计来自同一数据源,确保数据一致性
- 添加调试日志对比 summary 和流水统计的数据
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 19:38:37 -08:00
hailin
81ad8adf93
fix(mobile-app): 用户资料页术语修改
...
- 直推 → 引荐
- 伞下 → 同伴
- 个人认种 → 本人认种
- 团队认种 → 同伴认种
- 推荐人 → 引荐人
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 19:11:36 -08:00
hailin
2a31e1ba6d
Revert "feat(mobile-app): 用户资料页添加"同伴认种"标题和快捷标签"
...
This reverts commit d274444ca9 .
2026-01-05 19:06:43 -08:00
hailin
d274444ca9
feat(mobile-app): 用户资料页添加"同伴认种"标题和快捷标签
...
- 在统计卡片上方添加"同伴认种"标题(紫色)
- 在统计卡片下方添加"引荐"、"同伴"、"本人"快捷标签
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 18:35:21 -08:00
hailin
e6da0cbb05
fix(mobile-app): 修复 Token 刷新并发竞态导致的意外过期问题
...
- 添加 Token 刷新锁,确保多个 401 请求只触发一次刷新
- 添加过期通知去重,避免重复弹出登录过期提示
- 增强 deviceId 校验,缺失时记录日志
- 添加详细调试日志便于排查问题
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 07:20:31 -08:00
hailin
bdc6ba524f
fix(authorization): 火柴人排名改为按区域过滤
...
修改排名逻辑,只显示获得相同省/市公司授权的用户排名。
- 后端 getStickmanRanking 改用 findRankingsByMonthAndRegion
- 简化实时创建评估逻辑,只为当前区域创建
- 更新前端注释说明
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 05:56:30 -08:00
hailin
2136b7a144
feat(mobile-app): 添加待办操作轮询机制
...
解决老版本 App 升级后不重启导致无法激活待办事项的问题。
- 新增 PendingActionPollingService 定时轮询服务(每4秒检查)
- App启动时无待办则启动轮询,有待办则直接进入待办页面
- 轮询检测到待办后自动停止并跳转,防止重入问题
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 05:36:18 -08:00
hailin
99b2b10ba0
fix(mobile-app): always fetch deposit address from server in deposit_service
...
Remove local storage cache priority to avoid returning wrong address
after account switching. Always fetch from server API to ensure the
address belongs to the currently logged-in user.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 10:17:41 -08:00
hailin
04545c86a5
fix(mobile-app): fetch wallet address from server API instead of local storage
...
The wallet address displayed in long-press mode was incorrectly showing
another user's address from local storage cache. Now fetches the correct
address from the /me API endpoint for the currently logged-in user.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 10:00:33 -08:00
hailin
cb35f21661
feat(mobile-app): improve empty state display for offline settlement deduction
...
When there are no settlement records to deduct, show a more informative message:
- If user has balance from deposits/transfers: explain it's not from earnings
- If user has no balance: explain there are no settlement records
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 08:18:27 -08:00
hailin
251fee4f1e
feat(wallet-service): add offline settlement deduction feature
...
Add new functionality for admins to automatically deduct all settled
earnings when creating special deductions with amount=0, marking
each record to prevent duplicate deductions.
- Add OfflineSettlementDeduction model to track deducted records
- Add API endpoints for querying unprocessed settlements and executing batch deduction
- Add mode selection UI in admin-web pending-actions
- Add offline settlement card display in mobile-app special deduction page
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 06:56:39 -08:00
hailin
0d14cc2197
fix(mobile-app): correct leaderboard status API path
...
The API base URL already includes /api/v1, so the path should be
/leaderboard/status instead of /leaderboard-service/api/v1/leaderboard/status
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 03:45:55 -08:00
hailin
dacefa2b51
feat(leaderboard): add toggle control for mobile-app ranking page
...
- Add public /leaderboard/status endpoint (no auth required)
- Add LeaderboardService in mobile-app to fetch board status
- Update RankingPage to show "待开启" when board is disabled
- Connect admin-web leaderboard page to real API
- Board toggle now takes effect immediately
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 03:35:57 -08:00
hailin
190bf8257b
feat(mobile-app): hide transaction hash in ledger detail page
...
Hidden txHash display in both transfer details and withdrawal details
as it's not necessary for end users.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 00:51:10 -08:00
hailin
f0f44aeb39
feat(mobile-app): show all nodes in team tree with horizontal scroll
...
Remove the ellipsis logic that hides nodes when there are too many.
Now all nodes are displayed and users can scroll horizontally to see them.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 23:52:44 -08:00
hailin
439dcb95ac
feat(mobile-app): rename "社区" to "部门" in profile page and add SPECIAL_DEDUCTION display name
...
- Change all "社区" labels to "部门" in profile page (所属部门, 上级部门, 下级部门, 部门权益考核, 部门贡献奖励)
- Add SPECIAL_DEDUCTION entry type display name as "面对面结算" in ledger
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 23:44:16 -08:00
hailin
5ad21ee097
fix(mobile-app): adjust signature image ratio to match PDF field
...
The signature image was 600x200 (3:1 ratio) but the PDF signature
field is 92x51 (1.8:1 ratio). This caused the signature to be scaled
down to only 60% of the field height, making it appear too small.
Changed signature image dimensions to 460x255 (~1.8:1) to better
match the PDF field proportions and maximize signature size.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 23:22:16 -08:00
hailin
17b9c09381
feat(ledger): add detailed ledger entry views with source tracking
...
实现账本流水详情功能,支持点击查看各类型流水的详细信息。
## reward-service 后端
### 数据库
- 新增 `source_account_sequence` 字段到 `reward_ledger_entries` 表
- 添加索引 `idx_source_account_seq` 提升查询性能
- 字段可空,兼容历史数据
### 领域层
- `RewardSource` 值对象新增 `sourceAccountSequence` 属性
- `RewardCalculationService` 传递 `sourceAccountSequence`
### 应用层
- 新增 `getSettlementHistory` 方法查询结算历史
- 新增 `SettlementRecordRepository` 仓储实现
### API层
- 新增 `GET /settlements/history` 接口
- 新增 `SettlementHistoryQueryDTO` 和 `SettlementHistoryDTO`
## mobile-app 前端
### 服务层
- `RewardService` 新增结算历史相关模型和方法:
- `SettlementHistoryItem` 结算记录模型
- `SettlementRewardEntry` 关联奖励条目模型
- `getSettlementHistory()` 获取结算历史
- `WalletService` 新增:
- `LedgerEntry.payloadJson` 字段及辅助方法
- `counterpartyAccountSequence` 获取转账对手方ID
- `counterpartyUserId` 获取转账对手方用户ID
- `transferFee` 获取转账手续费
### 账本详情页
- 结算流水详情:显示结算金额、币种、涉及奖励明细(含来源用户)
- 提现流水详情:显示提现订单信息、状态、手续费等
- 转账流水详情:显示转入来源/转出目标用户信息
### 交互优化
- REWARD_SETTLED、WITHDRAWAL、TRANSFER_IN、TRANSFER_OUT 类型可点击
- 使用底部弹窗展示详情,支持滚动查看长列表
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 20:09:17 -08:00
hailin
e08959263a
fix(mobile-app): 修复待办操作完成后无法正确返回的问题
...
问题:
- 合同签署成功后使用 context.go('/profile') 直接跳转
- 导致从待办操作或待签合同列表 push 进来时收不到返回值
- 认种向导完成后同样使用 go 跳转,不会返回
修复:
1. contract_signing_page.dart
- 签署成功后检查 canPop() 判断是否可以返回
- 如果可以 pop(从待办操作/待签列表进入),返回 pop(true)
- 否则(从认种流程/KYC流程进入),跳转 go('/profile')
2. pending_actions_page.dart
- ADOPTION_WIZARD 添加后置检查(通过待签合同判断认种是否完成)
- 在 _checkIfAlreadyCompleted 中添加 ADOPTION_WIZARD 检查逻辑
兼容性:
- 不影响正常的认种流程(使用 go 进入合同签署)
- 不影响 KYC 流程(使用 go 进入合同签署)
- 待签合同列表页面正常工作
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 18:21:26 -08:00
hailin
dcd6f2ce18
fix: 修复特殊扣减API路径和批量创建用户ID解析问题
...
1. mobile-app: 修复特殊扣减API路径重复问题
- 将 /api/v1/wallets/special-deduction/execute 改为 /wallets/special-deduction/execute
- 因为 ApiClient baseURL 已包含 /api/v1 前缀
2. admin-web: 批量创建待办操作支持中文逗号分隔
- 正则表达式从 /[\n,]/ 改为 /[\n,,]/
- 同时支持换行、英文逗号、中文逗号作为分隔符
3. identity-service: 添加用户查找调试日志
- 在 findUserByIdOrSequence 方法中添加日志
- 便于排查用户ID查找失败的问题
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 17:54:27 -08:00
hailin
d5fee8d8c6
feat(trading): enable one-click settlement button
...
开放兑换页面的"一键结算"功能:
- 有可结算收益时:显示"一键结算",按钮可点击(金色)
- 无可结算收益时:显示"暂无可结算收益",按钮禁用(半透明)
- 结算中:显示加载动画,防止重复点击
- 使用 rewardService.settleToBalance() API 执行结算
- 结算成功后自动刷新页面数据
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 07:38:57 -08:00
hailin
dfdd8ed65a
feat(pending-actions): add special deduction feature for admin-created user actions
...
实现特殊扣减功能,允许管理员为用户创建扣减待办操作,由用户在移动端确认执行。
## 后端 (wallet-service)
### 领域层
- 新增 `SPECIAL_DEDUCTION` 到 LedgerEntryType 枚举
用于记录特殊扣减的账本流水类型
### 应用层
- 新增 `executeSpecialDeduction` 方法
- 验证用户钱包存在性
- 检查余额是否充足
- 乐观锁控制并发
- 扣减余额并记录账本流水
- 返回操作结果和新余额
### API层
- 新增内部API: POST /api/v1/wallets/special-deduction/execute
供移动端调用执行特殊扣减操作
## 前端 (admin-web)
### 类型定义
- 新增 `SPECIAL_DEDUCTION` 到 ACTION_CODES
- 新增 `SpecialDeductionParams` 接口定义扣减参数
- amount: 扣减金额
- reason: 扣减原因
### 页面
- 更新待办操作管理页面
- 当选择 SPECIAL_DEDUCTION 时显示扣减金额和原因输入框
- 验证扣减金额必须大于0
- 验证扣减原因不能为空
### 样式
- 新增特殊扣减表单区域样式
## 前端 (mobile-app)
### 服务层
- 新增 `executeSpecialDeduction` 方法到 WalletService
- 新增 `SpecialDeductionResult` 结果类
- 新增 `specialDeduction` 到 PendingActionCode 枚举
### 页面
- 新增 `SpecialDeductionPage` 特殊扣减确认页面
- 显示扣减金额和管理员备注
- 显示当前余额和扣减后余额
- 余额不足时禁用确认按钮
- 温馨提示说明操作性质
- 更新 `PendingActionsPage`
- 处理 SPECIAL_DEDUCTION 类型的待办操作
- 从 actionParams 解析 amount 和 reason
- 导航到特殊扣减确认页面
## 工作流程
1. 管理员在 admin-web 创建 SPECIAL_DEDUCTION 待办操作
- 选择目标用户
- 输入扣减金额
- 输入扣减原因
2. 用户在 mobile-app 待办操作列表看到该操作
3. 用户点击后进入特殊扣减确认页面
- 查看扣减详情
- 确认余额充足
- 点击确认执行扣减
4. 后端执行扣减并记录账本流水
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 07:04:46 -08:00
hailin
a609600cd8
feat(fiat-withdrawal): add complete fiat withdrawal system
...
实现完整的法币提现功能,支持银行卡、支付宝、微信三种收款方式。
此功能与现有的区块链划转功能完全独立,互不影响。
## 后端 (wallet-service)
### 数据库
- 新增 `fiat_withdrawal_orders` 表存储法币提现订单
- 与现有 `withdrawal_orders` 表(区块链划转)完全分离
- 添加完整索引支持高效查询
### 领域层
- 新增 `FiatWithdrawalStatus` 枚举(与 WithdrawalStatus 独立)
- 流程: PENDING -> FROZEN -> REVIEWING -> APPROVED -> PAYING -> COMPLETED
- 或 REJECTED / FAILED / CANCELLED
- 新增 `PaymentMethod` 枚举: BANK_CARD / ALIPAY / WECHAT
- 新增 `FiatWithdrawalOrder` 聚合根
- 新增 `IFiatWithdrawalOrderRepository` 仓储接口
- 新增 `FIAT_WITHDRAWAL` 账本流水类型
### 应用层
- 新增 `FiatWithdrawalApplicationService` 处理业务逻辑
- 发送短信验证码
- 申请法币提现(冻结余额)
- 提交审核
- 审核通过/驳回
- 开始打款
- 完成打款
### API层
- 新增 `FiatWithdrawalController` 提供用户端API
- POST /wallet/fiat-withdrawal/send-sms - 发送验证码
- POST /wallet/fiat-withdrawal - 申请提现
- GET /wallet/fiat-withdrawal - 获取提现记录
- 新增内部API供管理端调用
- GET /api/v1/wallets/fiat-withdrawals - 查询订单
- POST /api/v1/wallets/fiat-withdrawals/:orderNo/review - 审核
- POST /api/v1/wallets/fiat-withdrawals/:orderNo/start-payment - 开始打款
- POST /api/v1/wallets/fiat-withdrawals/:orderNo/complete-payment - 完成打款
## 前端 (admin-web)
- 新增法币提现审核管理页面 `/withdrawals`
- 支持按状态分 Tab 查看订单
- 支持审核通过/驳回
- 支持打款操作
- 支持查看订单详情
## 前端 (mobile-app)
- 新增 `WithdrawFiatPage` 法币提现页面
- 支持选择银行卡/支付宝/微信
- 输入收款账户信息
- 新增 `WithdrawFiatConfirmPage` 确认页面
- 短信验证码验证
- 密码验证
- 在 `WalletService` 中添加法币提现相关方法和模型
## 重要说明
此功能与现有的区块链划转功能 (withdraw_usdt_page.dart) 完全独立:
- 独立的数据库表
- 独立的聚合根
- 独立的状态枚举
- 独立的API端点
- 独立的前端页面
原有的区块链划转功能保持不变,不受任何影响。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 06:39:11 -08:00
hailin
d614d18e97
Revert "feat(withdrawal): implement fiat withdrawal with bank/alipay/wechat"
...
This reverts commit 288d894746 .
2026-01-03 05:44:43 -08:00
hailin
288d894746
feat(withdrawal): implement fiat withdrawal with bank/alipay/wechat
...
Add complete fiat withdrawal feature that allows users to withdraw
green credits (绿积分) to their bank card, Alipay, or WeChat account
with 1:1 CNY conversion. Key changes:
Backend (wallet-service):
- Update Prisma schema with fiat withdrawal fields (paymentMethod,
bankName, bankCardNo, cardHolderName, alipay*, wechat*, review fields)
- Rewrite withdrawal status enum for fiat flow: PENDING → FROZEN →
REVIEWING → APPROVED → PAYING → COMPLETED (or REJECTED/FAILED)
- Add PaymentMethod enum: BANK_CARD, ALIPAY, WECHAT
- Update WithdrawalOrderAggregate with new fiat withdrawal methods
- Add review/payment workflow methods in WalletApplicationService
- Add internal API endpoints for admin withdrawal management
- Remove blockchain withdrawal event handler (no longer needed)
Frontend (admin-web):
- Add withdrawal review management page at /withdrawals
- Add tabs for reviewing/approved/paying order states
- Add withdrawal service and React Query hooks
- Add types for withdrawal orders and payment methods
- Add sidebar menu item for withdrawal review
Frontend (mobile-app):
- Add withdrawFiat() method to WalletService
- Add PaymentMethod enum with BANK_CARD/ALIPAY/WECHAT
- Create new WithdrawFiatPage for fiat withdrawal input
- Create WithdrawFiatConfirmPage with SMS + password verification
- Add routes for /withdraw/fiat and /withdraw/fiat/confirm
- Keep existing withdraw/usdt (划转) pages unchanged
Note: The existing withdraw_usdt_page.dart is for point-to-point
transfer (划转), which is a different feature from fiat withdrawal.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 05:28:05 -08:00
hailin
036696878f
feat(settlement): implement settle-to-balance with detailed source tracking
...
Add complete settlement-to-balance feature that transfers settleable
earnings directly to wallet USDT balance (no currency swap). Key changes:
Backend (wallet-service):
- Add SettleToBalanceCommand for settlement operations
- Add settleToBalance method to WalletAccountAggregate
- Add settleToBalance application service with ledger recording
- Add internal API endpoint POST /api/v1/wallets/settle-to-balance
Backend (reward-service):
- Add settleToBalance client method for wallet-service communication
- Add settleRewardsToBalance application service method
- Add user-facing API endpoint POST /rewards/settle-to-balance
- Build detailed settlement memo with source user tracking per reward
Frontend (mobile-app):
- Add SettleToBalanceResult model class
- Add settleToBalance() method to RewardService
- Update pending_actions_page to handle SETTLE_REWARDS action
- Add completion detection via settleableUsdt balance check
Settlement memo now includes detailed breakdown by right type with
source user accountSequence for each reward entry, e.g.:
结算 1000.00 绿积分到钱包余额
涉及 5 笔奖励
- SHARE_RIGHT: 500.00 绿积分
来自 D2512120001: 288.00 绿积分
来自 D2512120002: 212.00 绿积分
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 04:29:38 -08:00
hailin
13dd42d2be
fix(mobile-app): fix pending action completion detection
...
- Change FORCE_KYC check from isCompleted to level1.verified
(FORCE_KYC only requires real-name verification, not all KYC levels)
- Add post-navigation re-check for FORCE_KYC and BIND_PHONE actions
(handles cases where user completes action but page doesn't return true)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 21:09:35 -08:00
hailin
c5c4e1667e
fix(mobile-app): fix layout constraint error in pending actions page
...
Wrap ElevatedButton in SizedBox(width: 72) to prevent
BoxConstraints infinite width error in Row layout.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 21:02:15 -08:00
hailin
f5f0ff2822
fix(mobile-app): correctly parse nested API response for pending actions
...
The API returns a nested structure {success, data: {code, data: [...]}}
but the service was only checking for {actions: [...]} format.
Now correctly extracts the actions list from data.data.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 20:57:17 -08:00
hailin
f7913cd04e
chore: temporarily disable KYC and contract check logs
...
Comment out debugPrint statements in pending actions and contract
check services to reduce log noise during development.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 20:51:13 -08:00
hailin
47a7e4a4da
feat(pending-actions): enhance multi-select creation and add pre-check
...
Admin Web:
- Redesign create modal to support multi-select action types
- Add drag-and-drop ordering for execution sequence
- Auto-calculate priority based on order (first = highest)
- Add @dnd-kit dependencies for sortable functionality
Flutter Mobile App:
- Add pre-check logic before executing pending actions
- Auto-complete FORCE_KYC if KYC already verified
- Auto-complete BIND_PHONE if phone already bound
- Skip unnecessary user interactions for completed tasks
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 20:23:15 -08:00
hailin
ff038f31f9
fix(pending-actions): fix API response handling and add Kong route
...
- Fix pending_action_service.dart to access response.data instead of response
- Add Kong route for /api/v1/admin/pending-actions to identity-service
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:33:58 -08:00
hailin
28e0396a65
feat(pending-actions): add user pending actions system
...
Add a fully optional pending actions system that allows admins to configure
specific tasks that users must complete after login.
Backend (identity-service):
- Add UserPendingAction model to Prisma schema
- Add migration for user_pending_actions table
- Add PendingActionService with full CRUD operations
- Add user-facing API (GET list, POST complete)
- Add admin API (CRUD, batch create)
Admin Web:
- Add pending actions management page
- Support single/batch create, edit, cancel, delete
- View action details including completion time
- Filter by userId, actionCode, status
Flutter Mobile App:
- Add PendingActionService and PendingActionCheckService
- Add PendingActionsPage for forced task execution
- Integrate into splash_page login flow
- Users must complete all pending tasks in priority order
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:22:51 -08:00
hailin
8173e1f973
feat: "同僚"改为"同伴" + KYC从三要素改为二要素
...
mobile-app:
- profile_page.dart: 将所有"同僚"改为"同伴"
identity-service:
- 层级1实名认证从三要素(姓名+身份证+手机号)改为二要素(姓名+身份证号)
- 使用阿里云 Id2MetaStandardVerify API
- 二要素验证直接调用真实API,不使用mock
- 保留三要素验证方法(verifyIdCardThreeFactor)备用
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 04:20:42 -08:00
hailin
1908544698
fix(mobile-app): 修复 ProfilePage 在 initState 中修改 provider 导致的错误
...
将 _loadUnreadNotificationCount() 调用包装在 addPostFrameCallback 中,
延迟到 widget tree 构建完成后执行,避免 Riverpod 报错:
"Tried to modify a provider while the widget tree was building"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:57:37 -08:00
hailin
b3142387f7
chore(mobile-app): 减少频繁轮询产生的调试日志
...
- 移除合同检查服务的频繁日志输出
- 移除维护状态检查的正常状态日志
- 只在检测到异常状态(维护中、待签署合同)时输出日志
- 减少服务器日志压力
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:54:16 -08:00
hailin
8a839b5e14
chore(mobile-app): 减少频繁日志输出
...
移除以下频繁执行操作的日志,只保留错误和关键状态日志:
- MaintenanceProvider: 移除正常状态日志,只保留检测到维护的日志
- ContractCheckService: 移除常规检查日志,只保留检测到异常的日志
- ContractSigningService: 移除KYC检查、获取任务列表等常规日志
- HomeShellPage: 移除合同检查定时器日志和路由栈打印
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:31:45 -08:00
hailin
68237d9905
chore(mobile-app): 调整维护状态轮询间隔为30-60秒
...
减少服务器压力:
- 将轮询间隔从 3-6 秒调整为 30-60 秒
- 10,000 用户时每秒约 222 次请求(之前约 2,222 次)
- 用户最多 60 秒内发现维护状态变化
- 启动时和从后台恢复时仍立即检查
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:23:20 -08:00
hailin
7e8113805d
feat(mobile-app): 在主页添加随机3-6秒轮询检查维护状态
...
- 用户登录后在 HomeShellPage 每 3-6 秒(随机)检查一次维护状态
- 随机间隔可避免所有用户同时请求,减少服务器压力
- 后端发起维护后,用户最多 6 秒内会看到维护弹窗
- App 进入后台时暂停检查,恢复前台时立即检查并重启定时器
- 启动时、从后台恢复时也会立即检查一次
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:21:21 -08:00
hailin
c328d8b59b
feat(mobile-app,admin): 添加系统维护功能和通知徽章功能
...
系统维护功能:
- 后端: 添加系统维护配置实体、仓库和控制器
- 后端: 添加维护模式拦截器,返回503状态码
- admin-web: 添加系统维护管理页面,支持创建/编辑/开关维护配置
- mobile-app: 添加维护状态检查服务和阻断弹窗
- mobile-app: 在启动页、向导页集成维护检查
- mobile-app: 支持App从后台恢复时自动检查维护状态
通知徽章功能:
- 添加通知徽章Provider,监听登录状态自动刷新
- 底部导航栏"我的"标签显示未读通知红点
- 进入通知页面自动刷新徽章状态
- 切换账号、退出登录自动清除徽章
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 23:26:01 -08:00
hailin
9c7dc6f511
feat(mobile-app): 非强制更新时下载完成后让用户选择是否安装
...
- 强制更新:下载完成后自动安装
- 非强制更新:下载完成后显示"稍后安装"和"立即安装"按钮
- 更新提示对话框中"稍后"改为"暂时不更新"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 20:20:47 -08:00
hailin
a54a01bba0
fix(mobile-app): 修改秘密点击解锁逻辑,点击19次后需等待2秒
...
- 连续点击19次后启动2秒定时器
- 2秒内再次点击会取消并重新计时
- 确保用户停止点击后才显示"我的同僚"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 11:26:22 -08:00
hailin
b20ec10c75
refactor(mobile-app): 修改"我的"页面文案
...
- "团队种植树" → "同僚种植树"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 11:23:45 -08:00
hailin
f20ed32f5f
refactor(mobile-app): 简化删除账号确认对话框文案
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 11:22:28 -08:00
hailin
1694f37e91
fix(mobile-app): 修复多账号切换后账号列表只显示一个的问题
...
- phone_login_page: 登录成功后添加账号到多账号列表
- import_mnemonic_page: 恢复账号后添加到多账号列表
- sms_verify_page: 短信验证登录后添加账号到多账号列表
问题原因:多个登录入口没有调用 addAccount() 将账号添加到列表
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 11:12:50 -08:00
hailin
a8261e110a
fix(mobile-app): 退出登录时停止遥测上传
...
- TelemetryService 添加 pauseForLogout() 方法
- 退出登录时先停止定期上传再清空队列
- 避免退出后继续上传导致等待
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 10:40:28 -08:00
hailin
3d68d1f6f6
fix(mobile-app): 简化退出登录提示文案
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 10:35:50 -08:00
hailin
4e4d9f43f6
fix(mobile-app): 修复退出登录报错问题
...
- TelemetryStorage.clearUserData() 添加初始化检查
- 移除 logoutCurrentAccount() 中多余的保存数据逻辑
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 10:34:50 -08:00
hailin
2a929fc082
fix(mobile-app): 修复头像更新未同步到账号列表的问题
...
- AccountService 添加 MultiAccountService 依赖
- updateLocalAvatarSvg() 更新后同步到账号列表
- updateProfile() 更新昵称/头像后同步到账号列表
- uploadAvatar() 上传头像后同步到账号列表
- 新增 _syncProfileToAccountList() 统一处理同步逻辑
- 调整 injection_container 依赖注入顺序
确保切换账号时显示正确的头像和昵称
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 10:25:19 -08:00
hailin
8eecc4c55f
fix(mobile-app): 修复账号切换的严重bug和数据隔离问题
...
问题修复:
1. 键列表不一致 - 统一定义 _accountSecureKeys 和 _accountLocalKeys
2. 缺少 phoneNumber/isPasswordSet/biometricEnabled - 补充到键列表
3. 切换前未清除旧数据 - 新增 _clearCurrentAccountData 方法
4. 缓存数据未按账号隔离 - LocalStorage 数据也按账号保存/恢复
5. 遥测队列未隔离 - 切换时清除遥测事件队列
新增功能:
- _validateAccountData: 切换前验证目标账号数据完整性
- _clearCurrentAccountData: 切换前清除当前存储空间
优化:
- switchToAccount: 完整的切换流程(验证→保存→清除→恢复)
- saveCurrentAccountData: 同时保存 SecureStorage 和 LocalStorage
- _restoreAccountData: 同时恢复 SecureStorage 和 LocalStorage
- deleteAccount: 同时删除 SecureStorage 和 LocalStorage 专用键
- logoutCurrentAccount: 使用统一键列表,确保一致性
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 10:01:11 -08:00
hailin
4de96dac9d
fix(mobile-app): 完善退出登录时的数据清理逻辑
...
遵循大厂最佳实践,确保退出登录后下次登录是干净的环境:
SecureStorage 新增清除项:
- inviterReferralCode (临时邀请码)
- biometricEnabled (生物识别设置)
LocalStorage 新增清除项:
- lastSyncTime (最后同步时间)
- cachedRankingData (排行榜缓存)
- cachedMiningStatus (矿机状态缓存)
遥测数据:
- 清除用户相关的事件队列
重构:
- MultiAccountService 增加 LocalStorage 和 TelemetryStorage 依赖
- 更新依赖注入容器
- TelemetryStorage 新增 clearUserData 方法
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 09:55:17 -08:00
hailin
c84516b222
refactor(mobile-app): 修改"我的"页面文案
...
- "个人种植树" → "本人种植树"
- 引荐列表中 "个人/团队" → "本人/同僚"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 09:38:59 -08:00
hailin
f143be9925
refactor(mobile-app): 修改"我的团队"文案为"我的同僚"
...
- "我的团队" → "我的同僚"
- "暂无团队成员" → "暂无同僚"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 09:34:55 -08:00
hailin
2b5b80d299
refactor(mobile-app): 修改"我的"页面文案
...
- "直推人数" → "引荐"
- "个人种植数" → "个人种植树"
- "团队种植数" → "团队种植树"
- "直推列表" → "引荐列表"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 09:33:25 -08:00
hailin
b20be7213c
feat(mobile-app): 隐藏"我的团队"功能,需秘密点击解锁
...
- 默认隐藏"我的团队"树形组件
- 在"团队种植数"区域连续点击19次后显示
- 点击间隔超过1秒自动重置计数器
- 退出页面后状态自动重置
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 09:29:20 -08:00
hailin
1cc53bd533
feat(mobile-app): 优化流水明细筛选选项
...
- 将"奖励转可结算"改为"分享收益",更准确描述分享权益
- 新增"权益收入"筛选项(SYSTEM_ALLOCATION),用于筛选:
- 社区权益
- 市/省团队权益
- 市/省区域权益
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 08:17:15 -08:00
hailin
7add51f5a3
fix(contract-signing): 添加 userRealName 字段到 Flutter ContractSigningTask
...
修复签名参照显示功能:将后端返回的 userRealName 字段添加到
Flutter 客户端的 ContractSigningTask 模型中,用于在签名
面板显示用户姓名供参照。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 06:47:08 -08:00
hailin
954f170bd4
feat(contract-signing): 增强签名功能
...
前端改进:
- 签名页面添加红色醒目提示"请使用正楷书写您的真实姓名"
- 签名前显示用户真实姓名供参照
- 实现全屏横向签名面板(自动切换横屏/竖屏)
- 记录签名轨迹数据(每个点的坐标和时间戳、笔画顺序)
后端改进:
- 扩展SignContractParams接口支持signatureTrace字段
- 控制器记录签名轨迹日志(笔画数、总时长)
- 签名轨迹数据以JSON格式存储,作为法律凭证
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 06:42:15 -08:00
hailin
3f3309e62f
debug: 添加流水明细 allocationType 调试日志
...
- 后端 wallet-service: getMyLedger 打印 payloadJson 和 allocationType
- 前端 wallet_service: 打印原始和解析后的流水数据
- 前端 ledger_detail_page: 打印加载的流水数据详情
用于排查权益类型(社区、省市团队/区域)不显示的问题
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 04:35:46 -08:00
hailin
21a523518e
feat(mobile-app): 最小提取金额从100改为5绿积分
2025-12-26 04:02:26 -08:00
hailin
78d7e0e637
feat(mobile-app): 流水明细支持显示权益类型和详情
...
- 后端 wallet-service: getMyLedger API 返回 allocationType 字段
- 前端流水明细: 显示权益类型名称(分享权益、省/市区域权益等)
- 新增权益详情弹窗,点击权益记录可查看详细信息
- 兑换页面: "RMB/CNY提现" 改为 "提现"
- 我的团队: "暂无下级成员" 改为 "暂无团队成员"
- 自助申请授权: 隐藏团队链占用区域提示
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 03:57:35 -08:00
hailin
aae4f1e360
fix(mobile-app): 遍历路由栈检测当前页面,修复push导航检测问题
...
之前只检查 currentConfiguration.uri.path,对于 push 导航的页面无法正确检测。
现在遍历整个 matches 路由栈,只要栈中有合同/KYC页面就跳过弹窗。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 00:14:24 -08:00
hailin
73f2b85ddf
fix(mobile-app): 首次检查也加入路由判断,避免在KYC页面弹窗
...
_checkContractsAndKyc() 方法之前没有调用 _shouldSkipContractCheck(),
导致用户在合同/KYC页面时首次检查仍会弹窗。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 00:09:39 -08:00
hailin
b40cd40eae
fix(mobile-app): 使用 appRouterProvider 获取全局路由状态
...
改用 ref.read(appRouterProvider) 替代 GoRouter.of(context),
确保能正确获取到当前的全局路由路径。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 00:06:17 -08:00
hailin
ce75e68d5e
fix(mobile-app): 修复合同签署页面定时检查仍弹窗的问题
...
使用 GoRouter.of(context).routerDelegate.currentConfiguration 获取全局路由状态,
而不是 GoRouterState.of(context),因为后者只能获取 ShellRoute 内部的路由状态,
当用户在顶级路由(如 /contract-signing/:orderNo)时无法正确检测。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 23:38:55 -08:00
hailin
148e197ea1
fix(mobile-app): 升级弹窗显示时跳过合同/KYC后台检查
...
- UpdateService 添加 isShowingUpdateDialog 状态
- home_shell_page 在升级、合同签署、KYC页面均跳过后台弹窗
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 22:12:12 -08:00
hailin
5ee12be00f
fix(mobile-app): 用户在合同/KYC页面时跳过后台弹窗检查
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 22:08:35 -08:00
hailin
838fbce914
chore(mobile-app): 缩短合同检查定时器间隔至5-20秒
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 21:59:30 -08:00
hailin
6237a49153
feat(mobile-app): 账本明细-认种支付交易支持查看和下载合同
...
- 认种支付流水项添加点击事件和右侧箭头指示器
- 新增交易详情底部弹窗,显示交易金额、时间、订单号等信息
- 添加"查看合同"按钮,使用 flutter_pdfview 展示 PDF
- 添加"下载合同"按钮,通过 share_plus 分享/保存文件
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 21:54:10 -08:00
hailin
b63aa0737c
feat(mobile-app): 添加后台定时检测未签署合同和KYC需求
...
- 添加 60-180 秒随机间隔的后台定时器
- 检测已KYC但未签署合同的用户,强制跳转签署页面
- 检测已付款但未完成KYC的用户,强制跳转实名认证页面
- 使用 PopScope 替代已弃用的 WillPopScope
- 防止重复弹窗的状态管理
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 21:23:22 -08:00
hailin
f62a96f3f1
feat(planting): 已付款未KYC用户强制进入实名认证流程
...
后端 (planting-service):
- 添加 /contract-signing/kyc-requirement 接口检查用户是否需要KYC
- 检查已付款订单但无合同签署任务的情况
前端 (mobile-app):
- ContractCheckService 新增 checkAll() 综合检查方法
- HomeShellPage 综合检查待签署合同和KYC需求
- 需要KYC时弹出强制认证弹窗,不可关闭
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 21:14:53 -08:00
hailin
7a1e789f4d
fix(contract): 合同签署页面和模板优化
...
1. 合同模板:身份证号和联系方式显示完整信息,不再使用星号掩码
2. 签署页面:checkbox 默认不选中,用户阅读到底部后才可点击确认
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 09:31:39 -08:00
hailin
fd04de8696
fix(mobile-app): 增加合同签署页面重试时间
...
KYC 成功后后端通过 Kafka 异步创建合同任务,可能需要较长时间。
将重试从 5 次/500ms 改为 15 次/2s,总等待时间最多 30 秒。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 07:33:04 -08:00
hailin
6b72831cd9
feat(mobile-app): KYC成功后自动跳转合同签署页面
...
从认种流程进入KYC时传递orderNo参数:
- 认种页面 -> KYC Entry -> KYC ID 传递 orderNo
- KYC成功后如果有orderNo则跳转合同签署
- 直接进入KYC(无orderNo)则正常返回
修改文件:
- app_router.dart: KYC路由支持orderNo参数
- kyc_entry_page.dart: 接收并传递orderNo
- kyc_id_page.dart: 成功后判断是否跳转合同签署
- planting_location_page.dart: 跳转KYC时传递orderNo
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 07:07:43 -08:00