refactor(server): 移除鉴权并归档遗留路由至 legacy/

- 删除 auth.py 与 deps.py,各路由去除 get_current_user 依赖
- collection.py 更名为 materials.py,冻结链路(ozon/publish/shops/categories)移入 legacy/
- 扩展默认生图服务端口并入 8800 并自动迁移旧配置,水印默认文案改为 Panda Store
- 新增 docs/v2.1/backend-structure.md 后端结构盘点文档
This commit is contained in:
R524809
2026-08-28 15:09:22 +08:00
parent 2835914fd8
commit dc6d38c128
44 changed files with 1556 additions and 389 deletions
@@ -141,7 +141,7 @@ const App: React.FC = () => {
const [settings, setSettings] = useState<BackendSettings>({
baseUrl: 'http://127.0.0.1:3300',
token: '',
watermark: { enabled: false, type: 'image', text: 'xiongmaoyx', opacity: 30 },
watermark: { enabled: false, type: 'image', text: 'Panda Store', opacity: 30 },
reportEnabled: true,
reportBaseUrl: 'http://127.0.0.1:8800',
studioBaseUrl: 'http://localhost:8900',
+7 -5
View File
@@ -23,27 +23,29 @@ export interface BackendSettings {
const KEY = 'suite_backend_settings';
export const DEFAULT_BASE_URL = 'http://127.0.0.1:3300';
export const DEFAULT_BASE_URL = 'http://127.0.0.1:8800';
export const DEFAULT_REPORT_BASE_URL = 'http://127.0.0.1:8800';
export const DEFAULT_STUDIO_BASE_URL = 'http://localhost:8900';
const DEFAULT: BackendSettings = {
baseUrl: DEFAULT_BASE_URL,
token: '',
watermark: { enabled: false, type: 'image', text: 'xiongmaoyx', opacity: 30 },
watermark: { enabled: false, type: 'image', text: 'Panda Store', opacity: 30 },
reportEnabled: true,
reportBaseUrl: DEFAULT_REPORT_BASE_URL,
studioBaseUrl: DEFAULT_STUDIO_BASE_URL,
};
/** 历史默认地址 → 当前默认地址(换端口后自动迁移用户已保存的设置) */
/** 历史默认地址 → 当前默认地址(换端口后自动迁移用户已保存的设置)
* v2.1 并入 OSK 后生图服务端与上报同源(8800),ISS 的 3300 存档自动迁移。 */
const MIGRATE: Record<string, string> = {
'http://127.0.0.1:3300': DEFAULT_BASE_URL,
'http://localhost:3300': DEFAULT_BASE_URL,
'http://127.0.0.1:8810': DEFAULT_BASE_URL,
'http://127.0.0.1:7000': DEFAULT_BASE_URL,
'http://127.0.0.1:7200': DEFAULT_BASE_URL,
'http://localhost:7000': DEFAULT_BASE_URL,
'http://127.0.0.1:7200': DEFAULT_BASE_URL,
'http://localhost:7200': DEFAULT_BASE_URL,
'http://localhost:3300': DEFAULT_BASE_URL,
};
export async function loadSettings(): Promise<BackendSettings> {