fix: update environment configuration for debugging and logging, enhance SQLite FTS5 table management, and improve API base URL handling

This commit is contained in:
wizardchen
2026-04-11 05:48:53 +08:00
committed by lyingbug
parent 8a4d58726e
commit 9a2b54536d
35 changed files with 1486 additions and 341 deletions
+5
View File
@@ -0,0 +1,5 @@
export function getApiBaseUrl(): string {
// Use same-origin requests by default.
// In local Vite dev, `vite.config.ts` proxies `/api` to the Go backend.
return '';
}
+2 -1
View File
@@ -2,11 +2,12 @@
import axios from "axios";
import { generateRandomString } from "./index";
import i18n from '@/i18n'
import { getApiBaseUrl } from './api-base';
const t = (key: string) => i18n.global.t(key)
// API基础URL
const BASE_URL = import.meta.env.VITE_IS_DOCKER ? "" : "http://localhost:8080";
const BASE_URL = getApiBaseUrl();
// 创建Axios实例