refactor: OSS base URL 与 logo URL 改由 API 下发 (AGENTS.md 合规)

This commit is contained in:
2026-06-17 17:47:51 +08:00
parent 2759afa176
commit d9604b99dc
4 changed files with 76 additions and 4 deletions
+5 -2
View File
@@ -1,7 +1,10 @@
const OSS_PUBLIC_BASE_URL = "https://stringtest.oss-cn-hangzhou.aliyuncs.com";
// OSS 公网 base URL 由 API 下发(AGENTS.md 规则 1/5),
// 见 src/api/publicConfigClient.ts。ossAssets 在模块加载时同步取缓存值,
// App 启动时 preloadPublicConfig() 已预加载;未加载时 getOssPublicBaseUrl() 返回 fallback。
import { getOssPublicBaseUrl } from "../api/publicConfigClient";
function oss(path: string): string {
return `${OSS_PUBLIC_BASE_URL}/${path.replace(/^\/+/, "")}`;
return `${getOssPublicBaseUrl()}/${path.replace(/^\/+/, "")}`;
}
function muban(path: string): string {