将多个对象合并成一个数组的方法
console.log(res); console.log(res.data.activities);//这是多个对象 var activityList = []; const activityData = res.data.activities; for (const key in activityData) { if (activityData[key]) { activityList = activityList.concat(activityData[key]); } } console.log(activityList);//合并后的数组