跨域处理

This commit is contained in:
2023-07-12 11:10:01 +08:00
parent 8450f0add1
commit 8f131614f2
4 changed files with 29 additions and 1 deletions

View File

@@ -0,0 +1,7 @@
import axios from "./axios";
export default{
index:(params={})=>{
return axios.get('/tenement/pc/api/home',params)
}
}

View File

@@ -5,7 +5,8 @@ import router from '../router/index'
// let protocol = window.location.protocol; //协议
// let host = window.location.host; //主机
// axios.defaults.baseURL = protocol + "//" + host;
axios.defaults.baseURL = 'https://app.gter.net'
// axios.defaults.baseURL = 'https://app.gter.net'
axios.defaults.baseURL = '/index'
// axios.defaults.emulateJSON = true
// axios.defaults.withCredentials = true