let p1 = getjson(url, {}).then(function(res) {
return res;
});
let p2 = getjson(url, {
'entname': '',
'page': 1,
'pageSize': 10
}).then(function(res) {
return res;
});
Promise.all([p1, p2]).then((p1res) => {
console.log('p1::' + JSON.stringify(p1res[0].responseData));
console.log('p12::' + JSON.stringify(p1res[1].responseData));
});
Promise解决某个条件需要多个异步结果的问题
最新推荐文章于 2023-12-29 17:15:56 发布