This commit is contained in:
Xwite
2024-10-12 18:24:08 +08:00
parent 59e75b3007
commit b95deeb607
3 changed files with 19 additions and 13 deletions
+3 -1
View File
@@ -1,11 +1,13 @@
import axios from "axios";
/** @type {string} localStorage保存自定义阅读http服务接口的键值 */
export const baseURL_localStorage_key = "remoteUrl"
const SECOND = 1000;
const ajax = axios.create({
baseURL:
import.meta.env.VITE_API ||
localStorage.getItem("remoteUrl") ||
localStorage.getItem(baseURL_localStorage_key) ||
location.origin,
timeout: 120 * SECOND,
});