1) 优化代码

This commit is contained in:
zhangds 2022-04-19 17:46:23 +08:00
parent 04cc0eaa15
commit 553ab3ac48
1 changed files with 8 additions and 2 deletions

View File

@ -14,7 +14,6 @@ if (process.env.NODE_ENV == "production") {
} }
// export let HOST = host; // export let HOST = host;
// export let API_URL = api_url; // export let API_URL = api_url;
// export const baseurl = window.baseurl // export const baseurl = window.baseurl
const upload = (method, url, params, responseType) => { const upload = (method, url, params, responseType) => {
@ -48,8 +47,9 @@ const upload = (method, url, params, responseType) => {
} }
}) })
.catch(); .catch();
break; break;
default:
return;
} }
} }
}); });
@ -103,6 +103,8 @@ const derive = (method, url, params, responseType) => {
}) })
.catch(); .catch();
break; break;
default:
return;
} }
} }
}); });
@ -161,6 +163,8 @@ const getData = (method, url, params, responseType) => {
.catch(); .catch();
break; break;
default:
return;
} }
} }
}); });
@ -241,6 +245,8 @@ const req = (method, url, params, responseType) => {
.catch(); .catch();
break; break;
default:
return;
} }
} }
}); });