lion 1 year ago
parent 4a3da4137b
commit be9171d907

@ -12,8 +12,15 @@ import {
let loading ;
// create an axios instance
console.log(window.location.origin)
let baseUrl = ''
if(window.location.origin.indexOf('localhost')>-1){
baseUrl = process.env.VUE_APP_BASE_API
}else{
baseUrl = window.location.origin + '/'
}
const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
baseURL: baseUrl, // url = base url + request url
// withCredentials: true, // send cookies when cross-domain requests
timeout: 5000, // request timeout
isLoading:true

Loading…
Cancel
Save