# .env.development | # .env.development | ||||
# base api | # base api | ||||
VITE_APP_BASE_URL = 'http://10.52.0.172:10389/csms/' | |||||
VITE_APP_BASE_URL = 'http://10.20.10.206:81/' |
# .env.production | # .env.production | ||||
# base api | # base api | ||||
VITE_APP_BASE_URL = 'http://10.52.0.172:10389/csms/' | |||||
VITE_APP_BASE_URL = 'http://10.20.10.206:81/' |
headers: { | headers: { | ||||
"X-Requested-With": "XMLHttpRequest", | "X-Requested-With": "XMLHttpRequest", | ||||
'Access-Control-Allow-Origin': '*', | 'Access-Control-Allow-Origin': '*', | ||||
'Access-Control-Allow-Headers': '*' | |||||
'Access-Control-Allow-Headers': 'X-Requested-With,Content-Type', | |||||
'Access-Control-Allow-Methods': "PUT,POST,GET,DELETE,OPTIONS" | |||||
}, | }, | ||||
// `params` 是即将与请求一起发送的 URL 参数 | // `params` 是即将与请求一起发送的 URL 参数 | ||||
// 必须是一个无格式对象(plain object)或 URLSearchParams 对象 | // 必须是一个无格式对象(plain object)或 URLSearchParams 对象 |
}: any = getCurrentInstance(); | }: any = getCurrentInstance(); | ||||
proxy.$request.get('api/user', {}, { | proxy.$request.get('api/user', {}, { | ||||
baseURL: 'http://localhost:8080' | |||||
}).then((res: {}) => { | }).then((res: {}) => { | ||||
console.log(res); | console.log(res); | ||||
}).catch((err: {}) => { | }).catch((err: {}) => { |