chore: 提交调试文档与模拟器改动

This commit is contained in:
2026-04-01 13:12:39 +08:00
parent 3ef841ecc7
commit 175a16001e
14 changed files with 1695 additions and 315 deletions

View File

@@ -11,12 +11,36 @@ npm run mock-gps-sim
启动后:
- 新版工作台: `http://127.0.0.1:17865/`
- 旧版面板: `http://127.0.0.1:17865/v1/`
- 小程序定位模拟地址: `ws://127.0.0.1:17865/mock-gps`
- 小程序心率模拟地址: `ws://127.0.0.1:17865/mock-hr`
- 小程序调试日志地址: `ws://127.0.0.1:17865/debug-log`
- 资源代理: `http://127.0.0.1:17865/proxy?url=<remote-url>`
## 多通道联调
模拟器现在支持一个最小的多通道隔离方案:
- GPS 模拟消息带 `channelId`
- 心率模拟消息带 `channelId`
- 调试日志消息带 `channelId`
- 小程序端按同一个模拟通道号过滤三条链
默认通道号:
```text
default
```
如果需要多人并行联调,可以在模拟器工作台里把“模拟通道号”改成例如:
```text
runner-a
runner-b
group-01
```
然后在小程序调试面板里把“模拟通道号”也配成同一个值。
## 当前能力
- 直接载入 `game.json`
@@ -47,6 +71,7 @@ ws://127.0.0.1:17865/debug-log
{
"type": "debug-log",
"timestamp": 1712345678901,
"channelId": "runner-a",
"scope": "gps-logo",
"level": "info",
"message": "wx.getImageInfo success",
@@ -89,12 +114,6 @@ ws://127.0.0.1:17865/debug-log
http://127.0.0.1:17865/
```
如果需要旧版稳定界面,打开:
```text
http://127.0.0.1:17865/v1/
```
在“新网关桥接”区域可以直接配置:
- 是否启用桥接