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
+4 -1
View File
@@ -19,6 +19,7 @@ import ToastContainer from "./components/toast/ToastContainer";
import { toast } from "./components/toast/toastStore";
import { flushPendingGenerationRecords } from "./api/generationRecordClient";
import { keyServerClient } from "./api/keyServerClient";
import { preloadPublicConfig, getLogoUrl } from "./api/publicConfigClient";
import { setUserMaxConcurrency } from "./api/generationConcurrency";
import {
SERVER_SESSION_EXPIRED_EVENT,
@@ -242,6 +243,8 @@ function App() {
let cancelled = false;
const loadSession = async () => {
// 预加载公网配置(OSS base / logo URL),与 session 加载并行,不阻断启动。
void preloadPublicConfig();
try {
const nextSession = await keyServerClient.getCurrentSession();
if (cancelled) return;
@@ -414,7 +417,7 @@ function App() {
<CloseOutlined />
</button>
<span className="ecommerce-auth-modal__logo" aria-hidden="true">
<img src="https://stringtest.oss-cn-hangzhou.aliyuncs.com/logo.png" alt="" />
<img src={getLogoUrl()} alt="" />
</span>
<h2 id="ecommerce-auth-title">{authMode === "login" ? "欢迎回来" : "创建账号"}</h2>
<p className="ecommerce-auth-modal__subtitle">{authMode === "login" ? "登录后继续你的 AI 创作之旅" : "注册即可免费体验全部功能"}</p>