1) 优化代码
This commit is contained in:
parent
04cc0eaa15
commit
553ab3ac48
|
@ -14,7 +14,6 @@ if (process.env.NODE_ENV == "production") {
|
|||
}
|
||||
// export let HOST = host;
|
||||
// export let API_URL = api_url;
|
||||
|
||||
// export const baseurl = window.baseurl
|
||||
|
||||
const upload = (method, url, params, responseType) => {
|
||||
|
@ -48,8 +47,9 @@ const upload = (method, url, params, responseType) => {
|
|||
}
|
||||
})
|
||||
.catch();
|
||||
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -103,6 +103,8 @@ const derive = (method, url, params, responseType) => {
|
|||
})
|
||||
.catch();
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -161,6 +163,8 @@ const getData = (method, url, params, responseType) => {
|
|||
.catch();
|
||||
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -241,6 +245,8 @@ const req = (method, url, params, responseType) => {
|
|||
.catch();
|
||||
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue