let arr = [];
let obj = {};
for (let i in res.data) {
//原始对象数据
//{'id': 1, 'goods_num': 20, 'price': '10'}
obj['goods_id'] = res.data[i].goods_id;
obj['num'] = res.data[i].num
let myJsonString = JSON.stringify(obj);
arr.push(obj);
}