//重新组装数据
/*
{
title: '单轴螺杆模组',
showItem: false,
images: 'images/categoryitem01.png',
item: [{
images: 'images/item01list01.png',
page: '1'
},
{
images: 'images/item01list02.png',
page: '2'
}]
}
*/
let _powerlist = [];
let obj = res.data.allList;
let category_arr = res.data.categoryList;
let objkeys = Object.keys(obj);
let tmpobj = {};
for(var i=0; i<objkeys.length; i++){
console.log(objkeys[i]);
for(var j=0; j<obj[objkeys[i]].length; j++){
obj[objkeys[i]][j].picUrl = api.imagepath+obj[objkeys[i]][j].picUrl;
}
tmpobj = {
title: category_arr[i].name,
showItem: false,
images: api.imagepath + category_arr[i].picUrl,
item: obj[objkeys[i]]
};
_powerlist.push(tmpobj);
tmpobj = {};
}
console.log('//** --nobita-- **//');
console.log('pages/catalog/catalog:');
console.log(_powerlist);
console.log('//** --nobita-- **//');
07-21
1454
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)