1.在获取数到的数据中添加三个属性
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.deliveryList数组是所要传递的数组
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)