@jiangood/open-admin 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ import axios from "axios";
|
|
|
9
9
|
import qs from 'qs';
|
|
10
10
|
|
|
11
11
|
const axiosInstance = axios.create({
|
|
12
|
-
baseURL: import.meta.env.
|
|
12
|
+
baseURL: import.meta.env.VITE_SERVER_SERVLET_CONTEXT_PATH,
|
|
13
13
|
withCredentials: true,
|
|
14
14
|
headers: {'Content-Type': 'application/json'},
|
|
15
15
|
paramsSerializer: (params) => qs.stringify(params, {indices: false})
|
|
@@ -65,7 +65,7 @@ export class UrlUtils {
|
|
|
65
65
|
* 为路径添加 SERVLET_CONTEXT 前缀
|
|
66
66
|
*/
|
|
67
67
|
static contextPath(path: string): string {
|
|
68
|
-
const base = import.meta.env.
|
|
68
|
+
const base = import.meta.env.VITE_SERVER_SERVLET_CONTEXT_PATH;
|
|
69
69
|
return base + path;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -10,7 +10,7 @@ interface RequestOptions extends AxiosRequestConfig {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
const axiosInstance = axios.create({
|
|
13
|
-
baseURL: import.meta.env.
|
|
13
|
+
baseURL: import.meta.env.VITE_SERVER_SERVLET_CONTEXT_PATH,
|
|
14
14
|
withCredentials: true,
|
|
15
15
|
headers: { 'Content-Type': 'application/json' },
|
|
16
16
|
paramsSerializer: (params: Record<string, unknown>) => qs.stringify(params, {indices: false})
|