优化
This commit is contained in:
1 parent
3338adae5a
commit
4a54c9fc3f
2 files changed
+9
-9
No files matched your search
@@ -9,7 +9,7 @@ const ajax = axios.create({
|
||||
});
|
||||
|
||||
ajax.interceptors.request.use((config) => {
|
||||
config.baseURL = remoteIp.value;
|
||||
config.baseURL = baseUrl();
|
||||
return config;
|
||||
});
|
||||
|
||||
@@ -21,5 +21,5 @@ export const setRemoteIp = (ip) => {
|
||||
};
|
||||
|
||||
export const baseUrl = () => {
|
||||
return remoteIp.value;
|
||||
return remoteIp.value || location.origin;
|
||||
};
|
||||
Reference in new issue
Block a user