|
@@ -15,13 +15,13 @@ console.log(URL,'===========URL')
|
|
|
//获取当前url
|
|
|
if(URL.indexOf('/')==0 && URL.length==1){
|
|
|
URL= window.location.protocol + "//"+window.location.host+URL
|
|
|
-
|
|
|
}
|
|
|
- const service = axios.create({
|
|
|
- baseURL: URL, // url = base url + request url
|
|
|
- withCredentials: true, // send cookies when cross-domain requests
|
|
|
- timeout: 60000 ,// request timeout
|
|
|
- })
|
|
|
+
|
|
|
+const service = axios.create({
|
|
|
+ baseURL: URL, // url = base url + request url
|
|
|
+ withCredentials: true, // send cookies when cross-domain requests
|
|
|
+ timeout: 60000 ,// request timeout
|
|
|
+})
|
|
|
// request interceptor
|
|
|
service.interceptors.request.use(
|
|
|
config => {
|