将贡献值页面的"贡献值失效倒计时"从硬编码静态文字改为基于用户 首次挖矿时间的真实730天倒计时。纯新增方式实现,不影响现有功能。 后端 (mining-service): - get-mining-account.query.ts: MiningAccountDto 新增 firstMiningDate 字段,在 Promise.all 中并行查询用户最早的 miningRecord,利用 @@unique([accountSequence, miningMinute]) 索引高效查询 前端实体/模型: - share_account.dart: 新增 DateTime? firstMiningDate(可空,向后兼容) - share_account_model.dart: fromJson/toJson 解析和序列化 firstMiningDate 前端 UI (contribution_page.dart): - watch shareAccountProvider 获取首次挖矿时间 - 计算已过天数和剩余天数(730 - 已过天数) - 进度条显示实际已用时间占比 - 显示具体失效日期和剩余天数 - 无挖矿记录 → 显示"暂无挖矿记录" - 已过期 → 显示"贡献值已失效" - 剩余 ≤30 天 → 进度条和文字变红色警告 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| android | ||
| assets | ||
| ios | ||
| lib | ||
| scripts | ||
| test | ||
| .gitignore | ||
| .metadata | ||
| DEVELOPMENT_GUIDE.md | ||
| README.md | ||
| analysis_options.yaml | ||
| pubspec.yaml | ||
README.md
mining_app
A new Flutter project.
Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.