|
|
@@ -1,15 +1,14 @@
|
|
|
import axios from "axios";
|
|
|
|
|
|
-// const BASEURL = 'http://47.111.23.171:8081'
|
|
|
-// const BASEURL = 'http://localhost:8082'
|
|
|
-// const BASEURL = 'http://8.130.126.86:8080'
|
|
|
-const BASEURL = 'https://air-nju.seec.seecoder.cn/'
|
|
|
+// !!!本地开发不要直接修改baseURL,请看 .env.example中的配置说明!!!
|
|
|
+const BASEURL = import.meta.env.VITE_BASE_URL;
|
|
|
|
|
|
const axiosInstance = axios.create({
|
|
|
baseURL: BASEURL,
|
|
|
headers: {
|
|
|
'Content-Type': 'application/json',
|
|
|
},
|
|
|
+ timeout: 10000,
|
|
|
})
|
|
|
//请求拦截器
|
|
|
axiosInstance.interceptors.request.use(
|