将async写在公共js里面进行使用,这种写法常见吗?

发布于 7 年前作者 ojiang7489 次浏览最后编辑 7 年前来自 ask

async function doPostRequest(url, data, options) {

await MyLogin();

var result = await MyPostRequest(url, data, options);

return result;

}

0 回复
暂无回复