- 端口修复
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
// API 基地址:Tauri 生产环境使用绝对路径,浏览器环境使用相对路径
|
||||
const BASE = window.location.protocol === 'http:' || window.location.protocol === 'https:'
|
||||
? '' // 浏览器环境 — 同源请求
|
||||
: 'http://localhost:8000'; // Tauri 生产环境 (tauri://)
|
||||
: 'http://localhost:10801'; // Tauri 生产环境 (tauri://)
|
||||
|
||||
async function request(url, options = {}) {
|
||||
const res = await fetch(`${BASE}${url}`, {
|
||||
|
||||
Reference in New Issue
Block a user