rwadurian/frontend/mining-app
hailin 192e2551bf feat(trading): 资产页面实时价格 WebSocket 推送
## 后端变更
- 添加 @nestjs/websockets, @nestjs/platform-socket.io, socket.io 依赖
- 新增 PriceGateway (price.gateway.ts): WebSocket 网关,namespace /price
- 新增 PriceBroadcastScheduler: 每秒广播价格更新到所有连接的客户端
- 更新 ApiModule 和 ApplicationModule 注册新模块

## Kong API Gateway
- 添加 WebSocket 路由: /ws/price -> trading-service:3022/price
- 支持 ws/wss 协议

## 前端变更
- 添加 socket_io_client 依赖
- 新增 PriceWebSocketService: 带自动断线重连机制的 WebSocket 服务
  - 指数退避重连策略 (1s -> 30s)
  - 最大重连次数 10 次
  - 连接状态流监听
- 资产页面集成 WebSocket:
  - initState 时连接,dispose 时断开
  - 实时更新价格和销毁倍数
  - 保持原有的每秒积分股增长计算

## 调试日志
- 前后端都添加了详细的调试日志方便排查问题
- 日志前缀: [PriceWS], [AssetPage], [PriceGateway], [PriceBroadcastScheduler]

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 21:18:34 -08:00
..
android chore(app): rename app to 股行 2026-01-16 23:50:23 -08:00
assets fix(mining-app): 添加assets/images目录 2026-01-11 08:12:29 -08:00
ios chore(app): rename app to 股行 2026-01-16 23:50:23 -08:00
lib feat(trading): 资产页面实时价格 WebSocket 推送 2026-01-18 21:18:34 -08:00
test feat(mining-app): 添加Android/iOS平台配置和编译支持 2026-01-11 08:06:53 -08:00
.gitignore feat(mining-app): 添加Android/iOS平台配置和编译支持 2026-01-11 08:06:53 -08:00
.metadata feat(mining-app): 添加Android/iOS平台配置和编译支持 2026-01-11 08:06:53 -08:00
DEVELOPMENT_GUIDE.md refactor(mining-app): rename 绿积分 to 积分值 across all pages 2026-01-14 19:57:17 -08:00
README.md feat(mining-app): 添加Android/iOS平台配置和编译支持 2026-01-11 08:06:53 -08:00
analysis_options.yaml feat(mining-ecosystem): 添加挖矿生态系统完整微服务与前端 2026-01-10 17:45:46 -08:00
pubspec.yaml feat(trading): 资产页面实时价格 WebSocket 推送 2026-01-18 21:18:34 -08:00

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.