function changeArrNum(arr:any,num:number){ let newCardList:any = []; for (var i = 0; i < arr.length; i += num) { newCardList.push(arr.slice(i, i + num)); } return newCardList; } changeArrNum(res.data.peiyangminmingxi,5)