hailin
2706eef54f
feat(mining-app): 兑换页"总积分股"改为"剩余积分股",分配记录积分股精度提升至13位
...
1. 兑换页面(trading_page):
- 市场数据卡片标签从"总积分股"改为"剩余积分股"
- 值的计算从直接显示 totalShares(100.02亿)改为
totalShares - totalMined(总量 - 全网已分配量),
使用 Decimal 精确运算避免浮点误差
2. 分配记录页面(mining_records_page):
- 每条分配记录的积分股显示从 formatAmount(4位小数)
改为 formatDecimal(value, 13),展示完整13位小数精度
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 09:04:07 -08:00
hailin
7c781c7d62
feat(notifications): 2.0系统通知弹窗功能(后端+管理端+APP端)
...
复制1.0通知系统架构到2.0系统,实现完整的通知推送功能:
后端 (mining-admin-service):
- Prisma Schema: 添加 Notification/NotificationRead/NotificationUserTarget 表
- NotificationService: 完整 CRUD + 移动端通知查询/已读标记
- AdminNotificationController: 管理端通知 CRUD API
- MobileNotificationController: 移动端通知列表/未读数/标记已读 API
管理端 (mining-admin-web):
- 通知管理页面: 列表/筛选/新建/编辑/删除 Dialog
- 支持类型/优先级/目标用户/强制弹窗/发布时间等完整配置
- 侧边栏添加"通知管理"入口
APP端 (mining-app):
- NotificationService: 通知API服务(经Kong网关路由)
- NotificationBadgeProvider: 30秒轮询未读数量+生命周期监听
- ForceReadNotificationDialog: 强制阅读弹窗(橙色主题,逐条查看+确认)
- NotificationInboxPage: 通知收件箱(支持dark/light主题)
- MainShell: 添加强制弹窗检查(启动+前台恢复,60秒冷却)
- ProfilePage: 用户头部添加通知图标+未读角标
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 08:35:16 -08:00
hailin
5fad40cec1
fix(mining-app): 修复记录页面时间显示为UTC而非北京时间的问题
...
所有记录页面的 DateFormat().format() 缺少 .toLocal() 调用,
导致后端返回的 UTC 时间直接显示,与北京时间相差8小时。
修复范围(5个页面,10处):
- mining_records_page: record.createdAt
- batch_mining_records_page: record.createdAt
- contribution_records_page: record.effectiveDate, record.expireDate
- planting_records_page: summary.firstPlantingAt, summary.lastPlantingAt,
record.adoptionDate, record.createdAt
- trading_records_page: order.createdAt, trade.createdAt
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 06:12:16 -08:00
hailin
fe9a30df85
feat(mining-app): 接入 capabilitiesProvider 实现 UI 层能力适配
...
Phase 5 补充:在 mining-app Flutter 前端关键页面接入 capability 检查,
被禁用的功能按钮置灰并显示 SnackBar 提示,后端 403 拦截作为兜底。
修改的页面及对应能力:
- send_shares_page: P2P_SEND → "确认发送"按钮
- receive_shares_page: P2P_RECEIVE → 顶部限制提示横幅
- c2c_market_page: C2C → "发布"按钮 + "接单"弹窗入口
- c2c_publish_page: C2C → "发布买入/卖出"按钮
- trading_page: TRADING → "确认交易"按钮
- edit_profile_page: PROFILE_EDIT → "保存"操作
- team_page: VIEW_TEAM → 页面数据加载前检查
设计原则:
- 不阻断页面浏览,只阻断操作
- fail-open: 能力获取失败时默认全部开启
- 禁用时点击按钮弹出 SnackBar 提示"您的XX功能已被限制"
- 沿用现有 disabled 按钮样式(.withOpacity(0.4))
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 01:36:24 -08:00
hailin
a1aba14ccf
feat(trade-password): 实现卖出交易的支付密码验证功能
...
## 后端改动
### auth-service
- user.aggregate.ts: 添加支付密码相关方法 (setTradePassword, verifyTradePassword, hasTradePassword)
- trade-password.service.ts: 新建支付密码业务逻辑服务
- trade-password.controller.ts: 新建支付密码 REST API (status/set/change/verify)
- user.repository.ts: 添加 tradePasswordHash 字段的持久化
- schema.prisma: 添加 trade_password_hash 字段
- migration 0003: 添加支付密码字段迁移
### trading-service
- audit-ledger.service.ts: 新建审计分类账服务 (Append-Only设计,仅INSERT)
- schema.prisma: 添加 AuditLedger 模型和 AuditActionType 枚举
- migration 0008: 添加审计分类账表迁移
## 前端改动 (mining-app)
### 新增页面/组件
- trade_password_page.dart: 支付密码设置/修改页面 (6位数字)
- trade_password_dialog.dart: 交易时的支付密码验证弹窗
### 功能集成
- trading_page.dart: 卖出时检查支付密码
- 未设置: 提示用户跳转设置页面
- 已设置: 弹出验证弹窗,验证通过后才能卖出
- profile_page.dart: 账户设置增加"支付密码"入口
- user_providers.dart: 添加支付密码相关 Provider
- auth_remote_datasource.dart: 添加支付密码 API 调用
- api_endpoints.dart: 添加支付密码 API 端点
- routes.dart/app_router.dart: 添加支付密码页面路由
## 安全设计
- 支付密码独立于登录密码 (6位纯数字)
- 审计分类账采用链式哈希保证完整性
- 所有敏感操作记录不可变审计日志
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 18:12:39 -08:00
hailin
dcc46c37b6
fix(mining-app): 价格有效数字从6位调整为7位,最后2位每分钟可见变化
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 20:12:15 -08:00
hailin
f5d25afab8
fix(mining-app): 价格显示有效数字从3位增加到6位
...
每分钟销毁引起的价格变化约 4.66e-12(第7位有效数字),
原来只显示3位有效数字 0.0{5}979 无法观察到变化。
改为6位后 0.0{5}979941,最后一位每1-2分钟变化一次,
用户可在兑换页面实时观察到销毁带来的价格上涨。
影响范围:formatPrice、K线图Y轴/十字线、交易记录、挖矿记录
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 20:09:32 -08:00
hailin
c24f383501
fix(trading): K线Y轴动态缩放 + 价格显示格式统一 + 首日涨幅修复
...
- K线图Y轴改为只基于可见K线计算范围,实现动态缩放(类似TradingView)
- 价格显示统一使用 0.0{n}xxx 格式替代科学计数法,覆盖全局 formatPrice、
K线图、交易记录页、挖矿记录页
- 修复"较上线首日"百分比始终显示 +0.00% 的问题:getFirstSnapshot 过滤
price=0 的早期快照
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 18:36:26 -08:00
hailin
76d566d145
feat: 集成 mining-app 升级和遥测功能,扩展 mobile-upgrade 支持多应用
...
## mining-app (Flutter)
- 新增 updater 模块: 版本检查、APK下载(断点续传+SHA256校验)、安装
- 新增 telemetry 模块: 事件上报、会话追踪、心跳检测(DAU统计)
- 集成原生 MethodChannel 实现 APK 安装
- 在关于页面添加"检查更新"功能入口
## mining-admin-service (NestJS)
- 新增版本管理 API (/api/v2/versions)
- 实现 DDD 架构: Entity, Value Objects, Repository
- 支持 APK/IPA 解析 (需安装 adbkit-apkreader, jszip, plist)
- 支持文件上传和静态文件服务
## mobile-upgrade (Next.js)
- 扩展支持多后端: 榴莲 App (admin-service) + 股行 App (mining-admin-service)
- 添加应用选择器 UI
- 配置独立的 API 端点
## 修复
- 移除未使用的 _apiBaseUrl 字段 (Flutter)
- 替换废弃的 WillPopScope 为 PopScope (Flutter)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 20:03:26 -08:00
hailin
b6d723333c
fix(mining-app): 修复 BatchMiningRecordsPage 类名冲突
...
将页面类重命名为 BatchMiningRecordsListPage 以避免与实体类冲突
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 01:42:46 -08:00
hailin
d5dc248a16
feat(mining-app): 添加补发记录功能
...
- 添加批量补发记录 API endpoint
- 创建 BatchMiningRecord 实体和模型
- 添加批量补发记录 provider 和页面
- 在"我的"页面动态显示补发记录入口(仅当用户有记录时显示)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 01:35:53 -08:00
hailin
7a5faad665
feat(mining-app): UI调整 - 隐藏部分功能和文案修改
...
- 兑换页面:将"挖矿账户"改为"分配账户"
- 我的页面:隐藏"账户设置"栏目(2.0版本暂不需要)
- 贡献值页面:隐藏"今日预估收益"栏目
- 贡献值明细页:同伴上贡献值不显示用户ID
- 参与记录页:将"算力"改为"贡献值"
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 18:00:40 -08:00
hailin
7ff7157115
refactor(ui): 隐藏"我的"页面中的"同伴与收益"栏
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 04:44:16 -08:00
hailin
728497afc1
refactor(ui): 将"个人"替换为"本人"
...
- team_tree_widget.dart: 节点详情弹窗中"个人参与"改为"本人参与"
- team_page.dart: 统计卡片中"个人参与"改为"本人参与"
- contribution_page.dart: 贡献值统计中"个人贡献值"改为"本人贡献值","个人参与产生的贡献值"改为"本人参与产生的贡献值"
- contribution_records_page.dart: 筛选标签"个人"改为"本人",来源类型标签"个人参与"改为"本人参与"
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 04:28:10 -08:00
hailin
9c705d7478
fix(ui): 将UI界面上所有"团队"替换为"同伴"
...
- team_tree_widget: 团队参与 → 同伴参与
- contribution_records_page: 团队下/上贡献值 → 同伴下/上贡献值
- about_page: 团队收益 → 同伴收益
- help_center_page: 团队收益/计算 → 同伴收益/计算
- contribution_page: 团队下/上贡献值 → 同伴下/上贡献值
- team_page: 我的团队 → 我的同伴, 团队参与 → 同伴参与
- profile_page: 团队与收益 → 同伴与收益, 我的团队 → 我的同伴
- contribution_record: 团队奖励/额外奖励 → 同伴奖励/额外奖励
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 04:24:54 -08:00
hailin
8728fdce4c
feat(trading): 成交明细显示完整卖出信息(销毁倍数、有效积分股、手续费等)
...
- 后端Trade表新增originalQuantity字段存储原始卖出数量
- quantity字段改为存储有效积分股(含销毁倍数)
- API返回完整明细:销毁倍数、有效积分股、交易总额、进入积分股池
- 前端成交明细页面显示完整卖出信息,类似确认卖出弹窗样式
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 04:07:52 -08:00
hailin
7da98c248b
feat(trading): 交易记录页面添加成交明细Tab,显示手续费
...
后端:
- trading-service 添加 GET /trading/trades API 获取成交记录
- 成交记录包含: 交易总额、手续费(10%)、实际收到金额
前端:
- 新增 TradeRecord 实体和 TradesPageModel
- 交易记录页面添加 Tab: "订单记录" 和 "成交明细"
- 成交明细显示: 价格、数量、交易总额、手续费、实际收到
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 03:15:25 -08:00
hailin
0fddd3164a
fix(trading): 交易记录金额单位从USDT改为积分值
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 02:18:40 -08:00
hailin
b00de68b01
refactor(profile): 重新实现深色模式,保留原有浅色模式配色
...
问题:之前的深色模式实现使用了 colorScheme,导致浅色模式的原有配色也被改变
修复方案:
- 定义浅色/深色两套色彩常量,浅色模式使用原有设计色值
- 添加基于 Theme.brightness 的颜色辅助函数动态返回对应颜色
- 浅色模式:保持原有 #1F2937/#6B7280/#9CA3AF/#F3F4F6/白色配色
- 深色模式:使用 #E5E7EB/#9CA3AF/#6B7280/#111827/#1F2937 配色
- 所有 widget 方法更新为使用动态颜色函数
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 18:44:31 -08:00
hailin
7fb77bcc7e
refactor(frontend): 暂时隐藏"我的"页面中的"团队与收益"栏目
...
- 注释掉 _buildTeamEarningsSection 调用
- 保留代码方便后续恢复
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 06:19:54 -08:00
hailin
f7cfb4ef8c
refactor(frontend): 优化参与记录和贡献值页面的文案显示
...
参与记录页面(planting_records_page.dart):
- 将状态 "已开始挖矿" 改为 "已开始"
- 将 "xx棵" 改为 "xx个"
- 将 "单棵算力" 改为 "单个算力"
贡献值页面(contribution_page.dart):
- 将贡献值明细中的 "本人种植" 改为 "本人"
- 移除 "已解锁上级" 和 "已解锁下级" 后的 "级" 字后缀
实体类(planting_record.dart):
- 同步更新状态显示文案 "已开始挖矿" → "已开始"
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 06:17:19 -08:00
hailin
8619b0bf26
feat(frontend): add dark mode support and fix mining records overflow
...
- Add darkTheme configuration in main.dart with themeModeProvider
- Refactor profile_page.dart to use Theme.of(context).colorScheme for dynamic theming
- Fix mining_records_page.dart layout overflow by using Expanded/Flexible widgets
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 05:06:28 -08:00
hailin
5ea8d8fea5
docs(frontend): update about page description
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 04:47:05 -08:00
hailin
1c9bb1aa60
refactor(frontend): rename '团队上级/下级' to '团队上/下贡献值'
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 04:45:15 -08:00
hailin
747e8bfee1
refactor(frontend): replace all '直推' with '引荐'
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 04:43:31 -08:00
hailin
1efe39c6bd
refactor(frontend): replace all '认种' with '参与'
...
- Update terminology across all pages and entities
- Change '认种' to '参与' in user-facing text
- Update comments and documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 04:39:15 -08:00
hailin
e48bf3e81f
refactor(frontend): replace all '榴莲' references with '股行'
...
- Update app name and branding across all pages
- Remove references to '榴莲树' in contribution and adoption contexts
- Update user-facing text in login, register, splash pages
- Update FAQ content in help center and about pages
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 04:33:47 -08:00
hailin
e8f3c34723
fix(contribution): 认种记录总贡献值显示用户实际有效算力
...
后端:
- get-planting-ledger.query.ts: 添加effectiveContribution字段
- 从contributionAccount获取用户实际的个人算力(personalContribution)
前端:
- planting_record.dart: PlantingSummary添加effectiveContribution字段
- planting_record_model.dart: 解析effectiveContribution字段
- planting_records_page.dart: 总贡献值显示effectiveContribution而非totalAmount
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 08:29:14 -08:00
hailin
d5f3f3b868
feat(frontend): 实现我的页面其他设置4项功能
...
- 消息通知: 添加开关控制,状态持久化到SharedPreferences
- 深色模式: 添加开关控制,状态持久化到SharedPreferences
- 帮助中心: 新建页面,包含常见问题FAQ和联系方式
- 关于我们: 新建页面,包含应用简介、功能特点、联系方式和法律条款
新增文件:
- settings_providers.dart: 设置状态管理
- help_center_page.dart: 帮助中心页面
- about_page.dart: 关于我们页面
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 01:08:21 -08:00
hailin
1aaf32cbb3
refactor(frontend): 认种记录汇总中总金额改为总贡献值
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 00:33:57 -08:00
hailin
d424f2a18e
refactor: rename '算力占比' to '贡献值占比' in mining records
...
- Update label in Flutter mining records page
- Update table header in admin web mining records list
- Update memo strings in mining-wallet-service
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 00:33:02 -08:00
hailin
725fb80f80
refactor(frontend): 删除我的页面中的支付密码功能
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 00:28:30 -08:00
hailin
1f0bd15946
feat(mining-app): add trading records page and remove withdrawal records
...
- Add TradingRecordsPage to display trade order history with status
- Connect trading records to profile page "交易记录" button
- Remove unused "提现记录" button from profile page
- Add route and navigation for trading records
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 09:22:15 -08:00
hailin
4ec6c9f48b
feat(contribution/mining-app): add team tree API using contribution-service 2.0
...
Add team info and direct referrals endpoints to contribution-service,
using SyncedReferral data synced via CDC. Update mining-app to use the
new v2 contribution API instead of legacy referral-service.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 09:17:18 -08:00
hailin
3d6b6ae405
feat(mining-app): connect my team page from profile
...
Link the "我的团队" menu item in profile page to the team tree page,
completing the integration of the team tree feature.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 09:03:06 -08:00
hailin
64ccb8162a
fix(admin): correct distributed shares calculation to use 2M pool
...
The dashboard was incorrectly using 5 billion as the distribution pool
default when calculating already distributed shares. The actual mining
distribution pool is 2 million shares, not 100 billion.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 08:59:46 -08:00
hailin
3096297198
feat(mining-app): 资产页面优化及个人资料编辑功能
...
- 删除资产页面的"提现"按钮,将"划转"改为"C2C"
- 删除积分值卡片上的"可提现"标签
- 简化资产页面和兑换页面的标题栏,移除左右图标
- 统一资产页面背景色与兑换页面一致
- 新增个人资料编辑页面,支持头像颜色选择和昵称修改
- 头像和昵称支持本地存储
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 07:58:16 -08:00
hailin
183b2bef59
style(mining-app): hide accountSequence and rename phone to ID on profile page
...
- Remove accountSequence (ID: xxxx) display from profile page
- Rename "手机:" label to "ID:" for phone number display
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 03:39:18 -08:00
hailin
1f15daa6c5
fix(planting-records): filter only MINING_ENABLED records and fix UI overflow
...
- Backend: Add status filter to getPlantingLedger and getPlantingSummary
- Frontend: Change Row to Wrap for info items to prevent width overflow
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 00:12:07 -08:00
hailin
dee9c511e5
feat(mining-admin): add total contribution to dashboard stats
...
- Add networkTotalContribution field to dashboard API response
- Display total hashrate alongside effective hashrate in stats cards
- Update price overview to show both effective and total contribution
- Change grid from 3 to 4 columns in price overview
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 23:32:29 -08:00
hailin
546c0060da
feat(mining-app): add mining records and planting records pages
...
- Add mining records page showing distribution history with share amounts
- Add planting records page with adoption summary and detailed records
- Remove 推广奖励 and 收益明细 from profile page
- Add planting-ledger API endpoint and data models
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 23:23:31 -08:00
hailin
b81ae634a6
fix(mining-app): hardcode team bonus tiers display to 15
...
- Profile page: 团队上级 shows '15' instead of actual unlockedBonusTiers
- Contribution page: 已解锁上级 shows '15级' instead of actual value
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 20:28:02 -08:00
hailin
0cccc0e2cd
refactor(mining-app): rename VIP等级 to 团队上级 and 直推人数 to 引荐人数
...
- Changed "VIP等级" label to "团队上级" in profile stats row
- Changed display value from vipLevel (V3 format) to unlockedBonusTiers (raw number)
- Changed "直推人数" label to "引荐人数" for consistency
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 20:07:52 -08:00
hailin
adeeadb495
fix(mining-app): update profile page - hide items and rename label
...
- Rename "团队层级" to "团队下级" in stats row
- Hide "实名认证" option from account settings
- Hide "我的邀请码" card section entirely
- Remove unused _buildInvitationCard and _buildActionButton methods
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 19:47:14 -08:00
hailin
02cc79d67a
fix(mining-app): reduce bottom padding on navigation pages
...
Reduce bottom SizedBox from 100 to 24 on all four main navigation
pages (contribution, trading, asset, profile) to eliminate excessive
whitespace when scrolling to bottom.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 19:17:59 -08:00
hailin
6bcb4af028
feat(mining-app): integrate real APIs for Asset and Profile pages
...
- Asset page now uses trading-service /asset/my endpoint
- Profile page integrates auth-service /user/profile and contribution-service
- Add new entities: AssetDisplay, PriceInfo, MarketOverview, TradingAccount
- Add corresponding models with JSON parsing
- Create asset_providers and profile_providers for state management
- Update trading_providers with real API integration
- Extend UserState and UserInfo with additional profile fields
- Remove obsolete buy_shares and sell_shares use cases
- Fix compilation errors in get_current_price and trading_page
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 08:22:40 -08:00
hailin
94d8075970
fix(mining-app): unify color scheme and fix scroll issues
...
- Update login/register pages to use orange color scheme (#FF6B00)
matching the navigation pages design
- Fix SafeArea bottom: false on all navigation pages since MainShell
handles bottom safe area via bottomNavigationBar
- Add AlwaysScrollableScrollPhysics to asset page for consistent scroll
- Increase bottom padding to 100px on all navigation pages to clear
the navigation bar
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 12:41:41 -08:00
hailin
5727192719
feat(mining-app): 重新设计四个主要导航页面UI
...
- 贡献值页面: 新增贡献值卡片、算力排行榜、收益统计等模块
- 兑换页面: 添加K线图、市场数据、买卖面板等交易界面
- 资产页面: 实现总资产卡片、快捷操作、资产列表、收益统计
- 我的页面: 添加用户头部信息、邀请码、账户设置、记录入口等
- 更新底部导航为: 贡献值、兑换、资产、我的
- 登录/注册后跳转到贡献值页面
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 07:56:23 -08:00
hailin
26dce24e75
feat(mining-app): 添加找回密码和修改密码功能
...
- 添加 /password/reset 和 /password/change API 端点
- 在 auth_remote_datasource 中实现 resetPassword 和 changePassword 方法
- 在 user_providers 中添加状态管理方法
- 创建找回密码页面 (forgot_password_page.dart)
- 创建修改密码页面 (change_password_page.dart)
- 添加路由配置
- 在登录页面添加"忘记密码"链接
- 在个人资料页面添加"修改密码"入口
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 07:36:56 -08:00
hailin
a17f408653
feat(mining-ecosystem): 添加挖矿生态系统完整微服务与前端
...
## 概述
为榴莲生态2.0添加完整的挖矿系统,包含3个后端微服务、1个管理后台和1个用户端App。
---
## 后端微服务
### 1. mining-service (挖矿服务) - Port 3021
**核心功能:**
- 积分股每日分配(基于算力快照)
- 每分钟定时销毁(进入黑洞)
- 价格计算:价格 = 积分股池 ÷ (100.02亿 - 黑洞 - 流通池)
- 全局状态管理(黑洞量、流通池、价格)
**关键文件:**
- src/application/services/mining-distribution.service.ts - 挖矿分配核心逻辑
- src/application/schedulers/mining.scheduler.ts - 定时任务调度
- src/domain/services/mining-calculator.service.ts - 分配计算
- src/infrastructure/persistence/repositories/black-hole.repository.ts - 黑洞管理
### 2. trading-service (交易服务) - Port 3022
**核心功能:**
- 积分股买卖撮合
- K线数据生成
- 手续费处理(10%买入/卖出)
- 流通池管理
- 卖出倍数计算:倍数 = (100亿 - 销毁量) ÷ (200万 - 流通池量)
**关键文件:**
- src/domain/services/matching-engine.service.ts - 撮合引擎
- src/application/services/order.service.ts - 订单处理
- src/application/services/transfer.service.ts - 划转服务
- src/domain/aggregates/order.aggregate.ts - 订单聚合根
### 3. mining-admin-service (挖矿管理服务) - Port 3023
**核心功能:**
- 系统配置管理(分配参数、手续费率等)
- 老用户数据初始化
- 系统监控仪表盘
- 审计日志
**关键文件:**
- src/application/services/config.service.ts - 配置管理
- src/application/services/initialization.service.ts - 数据初始化
- src/application/services/dashboard.service.ts - 仪表盘数据
---
## 前端应用
### 1. mining-admin-web (管理后台) - Next.js 14
**技术栈:**
- Next.js 14 + React 18
- TailwindCSS + Radix UI
- React Query + Zustand
- ECharts 图表
**功能模块:**
- 登录认证
- 仪表盘(实时数据、价格走势)
- 用户查询(算力详情、挖矿记录、交易订单)
- 系统配置管理
- 数据初始化任务
- 审计日志查看
### 2. mining-app (用户端App) - Flutter 3.x
**技术栈:**
- Flutter 3.x + Dart
- Riverpod 状态管理
- GoRouter 路由
- Clean Architecture (3层)
**功能模块:**
- 首页资产总览
- 实时收益显示(每秒更新)
- 贡献值展示(个人/团队)
- 积分股买卖交易
- K线图与价格显示
- 个人中心
---
## 架构文档
- docs/mining-ecosystem-architecture.md - 系统架构总览
- 服务职责与端口分配
- 数据流向图
- Kafka Topics 定义
- 跨服务关联(account_sequence)
- 配置参数说明
- 开发顺序建议
---
## .gitignore 更新
- 添加 Flutter/Dart 构建文件忽略
- 添加 iOS/Android 构建产物忽略
- 添加 Next.js 构建目录忽略
- 添加 TypeScript 缓存文件忽略
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 17:45:46 -08:00