1. Add three attributes to the counted data
this.api.orderListStatus ({
order_id:id}).then(res=>{
this.datalist = res.order_detail
this.goods_info = res.order_detail.goods_detail
res.order_detail.goods_detail.map(item=>{
item['comment']=''
item['imgList']=[]
item['remnant'] =0
})
}).catch(err=>{
})
2. The deliveryList array is the array to be delivered
let cn =[]
this.goods_info.map(item=>
let obj={
}
obj['id']=item.id
obj['comment']=item.comment
obj['imgList']= item.imgList
cn.push(obj)
})
this.deliveryList=JSON.stringify(cn)