Files
ISISeg/工程分析/实现方案-2026-05-18-19-46-56.md

23 lines
768 B
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.
# 实现方案
开始时间2026-05-18-19-46-56
## 修改内容
1. 后端 `/api/samples`
- 返回 `url` 时追加 `?v=<mtime_ns>`
- 增加 `version` 字段,便于前端或调试确认样例版本。
2. 前端 `loadSample`
-`/api/samples` 读取版本化 URL。
- 再追加 `t=<Date.now()>`,确保本次点击不会复用旧浏览器缓存。
- `fetch` 使用 `{ cache: "reload" }`
3. 测试与验证
- Chrome DevTools Protocol 自动点击“加载样例”并截图。
- 检查视频元素 `readyState``videoWidth``videoHeight`
## 说明
这次不是布局问题,也不是后端接口问题;根因更偏向浏览器缓存旧样例资源。版本化 URL 是面向 Web 端静态媒体更新的稳妥处理。