import {get} from "../../utils/oss";
//方式1:使用let...of
async getList() {
this.invoicesTypeArr = [];
for (let item of arrayList) {
let image_path;
if (item?.image_path) {
image_path = await get(item?.image_path);
}
this.invoicesTypeArr.push({
bill_type: item.bill_type,
image_path: image_path
});
}
}
//方式2:使用Promise.all
async getList2() {
let newList = await Promise.all(
arrayList.map(async item => {
if (item?.image_path) {
item.image_path = item?.image_path;
}
return item;
})
);
}
08-05
1831

12-17
7049

07-01
1609

08-05
2380

06-03
3380
