async getData() {
await this.Arr.forEach(async val => {
let obj = {};
let itemBody = {key:val}
let data = await post(this.dataUrl, itemBody, this.header);
console.log(data);
if (data.result) {
obj[val] = data.result.res;
closeAry.push(obj);
}
});
this.closeAry = closeAry;
let setKey = this.getStorageKey()
wx.setStorageSync(setKey.toString(), closeAry)
}
The Arr array corresponds to 15 interfaces. Synchronize was supposed to execute each ajax, but it was too slow. How to make the concurrent request data and the order of the returned results in closeAry correspond to the order of Arr?