- 图标优化、视频缩略图

This commit is contained in:
Pine
2026-05-13 01:19:41 +08:00
parent a5b96eed6e
commit d9b0aa27e5
5 changed files with 67 additions and 22 deletions
+2
View File
@@ -1,7 +1,9 @@
// API 基地址:Tauri 生产环境使用绝对路径,浏览器环境使用相对路径
// 导出供 SSE、媒体文件等非 fetch 场景使用
const BASE = window.location.protocol === 'http:' || window.location.protocol === 'https:'
? '' // 浏览器环境 — 同源请求
: 'http://localhost:10801'; // Tauri 生产环境 (tauri://)
export const API_BASE = BASE;
async function request(url, options = {}) {
const res = await fetch(`${BASE}${url}`, {