将async写在公共js里面进行使用,这种写法常见吗?
async function doPostRequest(url, data, options) {
await MyLogin();
var result = await MyPostRequest(url, data, options);
return result;
}
async function doPostRequest(url, data, options) {
await MyLogin();
var result = await MyPostRequest(url, data, options);
return result;
}