|
@@ -5,16 +5,15 @@ import { getToken } from '@/utils/auth'
|
|
|
|
|
|
//获取当前url
|
|
|
|
|
|
-//var aa = window.GLOBAL.SERVICE_URL
|
|
|
-var aa = process.env.VUE_APP_BASE_API
|
|
|
-console.log(aa,'===========aa')
|
|
|
+var URL = process.env.VUE_APP_BASE_API
|
|
|
+console.log(URL,'===========URL')
|
|
|
//获取当前url
|
|
|
-if(aa.indexOf('/')==0 && aa.length==1){
|
|
|
- aa= window.location.protocol + "//"+window.location.host+aa
|
|
|
- console.log(aa,'===========aa22')
|
|
|
+if(URL.indexOf('/')==0 && URL.length==1){
|
|
|
+ URL= window.location.protocol + "//"+window.location.host+URL
|
|
|
+ console.log(URL,'===========URL')
|
|
|
}
|
|
|
const service = axios.create({
|
|
|
- baseURL: aa, // url = base url + request url
|
|
|
+ baseURL: URL, // url = base url + request url
|
|
|
withCredentials: true, // send cookies when cross-domain requests
|
|
|
timeout: 60000 ,// request timeout
|
|
|
})
|