fix(common-tools): 资料下载改挂站点 /static/ 静态位

/materials/ 是不在发布白名单里的新目录,deploy_app_web.py 只上传
index.html+assets+/static/ 清单 ⇒ 上线即 404。改走既有 /static/(nginx 已配),
发布清单在 ops 仓 deploy_app_web.py 同步登记 4 个文件。
This commit is contained in:
2026-10-23 23:38:03 +08:00
parent a68e6d9252
commit e36d363c57
3 changed files with 10 additions and 8 deletions
@@ -2,8 +2,8 @@
* 定价利润换算页 · 常用链接与资料下载
*
* 链接清单源自桌面版 shufu_calc_app.py 的 PAGE_LINKS / 资料页(2026-10-23 实测可达),
* 下载文件随前端 public/materials/ 一并部署(源自「数富资料下载_独立版_v1.0.0」;
* 目录名避开 .gitignore 的 downloads/ 规则)。
* 下载文件源自「数富资料下载_独立版_v1.0.0」,源文件在 public/materials/,
* 发布时由 scripts/deploy_app_web.py 的 EXPECTED_STATIC 白名单上传到站点 /static/。
*/
export type CommonLink = {
@@ -37,5 +37,7 @@ export const PRICING_DOWNLOADS: ReadonlyArray<DownloadItem> = [
]
export function downloadHref(file: string): string {
return `/materials/${encodeURI(file)}`
// 走既有 /static/ 静态位(nginx 已配,deploy_app_web.py 的 EXPECTED_STATIC 白名单同步登记);
// /materials/ 这类新目录不在发布清单里,上线即 404。
return `/static/${encodeURI(file)}`
}