update
This commit is contained in:
@@ -2,7 +2,10 @@ import axios from "axios"
|
|||||||
import { router } from "./router"
|
import { router } from "./router"
|
||||||
|
|
||||||
const http = axios.create({
|
const http = axios.create({
|
||||||
baseURL: "https://webapi.xuyue.cc/api",
|
baseURL:
|
||||||
|
import.meta.env.MODE === "development"
|
||||||
|
? "http://localhost:8000/api"
|
||||||
|
: "https://webapi.xuyue.cc/api",
|
||||||
xsrfCookieName: "xsrfCookieName",
|
xsrfCookieName: "xsrfCookieName",
|
||||||
xsrfHeaderName: "X-CSRFTOKEN",
|
xsrfHeaderName: "X-CSRFTOKEN",
|
||||||
withCredentials: true,
|
withCredentials: true,
|
||||||
|
|||||||
7
src/env.d.ts
vendored
7
src/env.d.ts
vendored
@@ -0,0 +1,7 @@
|
|||||||
|
interface ImportMetaEnv {
|
||||||
|
readonly MODE: "production" | "development" | "none"
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImportMeta {
|
||||||
|
readonly env: ImportMetaEnv
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user