rwadurian/frontend/mining-app/lib/presentation/pages
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
..
asset feat(trading): 资产页面实时价格 WebSocket 推送 2026-01-18 21:18:34 -08:00
auth fix(mining-app): unify color scheme and fix scroll issues 2026-01-12 12:41:41 -08:00
c2c feat(mining-app): add professional kline chart with technical indicators 2026-01-16 08:51:00 -08:00
contribution feat: split share pool into A (100亿) and B (200万) accounts 2026-01-15 05:55:52 -08:00
profile fix(contribution): 认种记录总贡献值显示用户实际有效算力 2026-01-17 08:29:14 -08:00
splash fix(mining-app): remove unnecessary token refresh on app startup 2026-01-13 20:28:07 -08:00
trading feat(mining-app): 兑换页面价格改为只读,使用实时价格 2026-01-18 20:56:59 -08:00