formatCardData = (listData = []) => {
let itemsData = [];
let cardCustomerData = [];
for (let i = 0; i < listData.length; i++) {
const data = listData[i];
itemsData = data.items;
cardCustomerData = [...cardCustomerData, ...itemsData];
}
return cardCustomerData;
}
调用
this.formatCardData(res.data.result)
网友评论