chore: location host
This commit is contained in:
+11
-2
@@ -1,8 +1,17 @@
|
||||
import axios from "axios";
|
||||
import axios from 'axios';
|
||||
import router from '../router/index';
|
||||
import { message } from 'ant-design-vue';
|
||||
|
||||
axios.defaults.baseURL = "http://localhost:8000/api";
|
||||
const host = window.location.hostname
|
||||
|
||||
switch (host) {
|
||||
case 'www.zocrm.cloud':
|
||||
axios.defaults.baseURL = 'https://www.zocrm.cloud/api'
|
||||
break;
|
||||
default:
|
||||
axios.defaults.baseURL = 'http://127.0.0.1:8000/api'
|
||||
break;
|
||||
}
|
||||
|
||||
const request = axios.create({
|
||||
timeout: 5000,
|
||||
|
||||
Reference in New Issue
Block a user