Files
thebet365/docs/player-mobile-performance.md
Mars 312c3c5816 feat(player): 注册账号、登录双模式与移动端性能优化
注册必填 7-32 位账号,手机号区号/本地号分存;登录默认账号模式并支持切换手机号登录;Player i18n 拆包与赛事接口优化。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 10:56:51 +08:00

41 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 玩家端手机浏览器性能验收
本文档用于在真机上建立基线并验收性能优化(弱网、滚动、内存)。
## 环境
- 设备iOS Safari + Android Chrome至少各一台中低端机型
- 网络Chrome DevTools → Network → Fast 3G或 Safari 网络链路调节器)
- 构建:`pnpm --filter @thebet365/player build``pnpm --filter @thebet365/player preview`
## 关键指标
| 指标 | 工具 | 目标(优化后) |
|------|------|----------------|
| LCP | Lighthouse Mobile | 弱网 &lt; 3s |
| `/api/player/matches` 体积 | Network 面板 | 列表(无 markets显著小于串关 `scope=parlay` |
| `/api/player/home` | Network | 单次 `listPublished`,无重复全量查询 |
| 主 JS chunk | `dist/assets/*.js` | 首屏仅当前语言 i18n chunk |
| 滚动长任务 | Performance 录制 | 投注页滚动时少见 &gt; 50ms 块 |
## 必测路径
1. 冷启动首页(未登录 / 已登录)
2. 投注 → 展开多个联赛 → 纵向滚动
3. 投注 → 串关 Tab应请求 `?scope=parlay`,且与赛事 Tab 共享缓存)
4. 赛事详情 → 展开波胆 → 多次点选
5. 弱网下首页 / 投注页下拉刷新
## 构建体积快照(本地)
```bash
pnpm --filter @thebet365/player build
# 查看 dist/assets 下 index、i18n-*、vue-vendor 等 chunk 大小
```
## API 契约变更
- `GET /player/matches`:默认返回**无 markets** 的赛事摘要
- `GET /player/matches?scope=parlay`:仅串关玩法 markets且过滤无盘口赛事
- `GET /player/bets?matchId=`:按赛事筛选注单(详情页使用)