feat(h5): records 页迁入 server 改用 SGBridge(同源相对 API,保留 multipart 上传)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
guke
2026-06-29 13:14:18 +08:00
parent 122766c911
commit 84ae950ea7
5 changed files with 1788 additions and 0 deletions
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

+11
View File
@@ -19,3 +19,14 @@ def test_h5_html_no_cache_via_dir_url(client) -> None:
resp = client.get("/h5/mine/")
assert resp.status_code == 200
assert resp.headers.get("cache-control") == "no-cache"
def test_h5_records_served_and_migrated(client) -> None:
resp = client.get("/h5/records/index.html")
assert resp.status_code == 200
assert resp.headers.get("cache-control") == "no-cache"
body = resp.text
assert "SGBridge" in body # 已切到新桥
assert "NativeBridge" not in body # 旧桥名清零
assert "getApiBase" not in body # 同源:绝对地址拼接已移除
assert "../shared/bridge.js" in body