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