|
|
|
@ -46,13 +46,13 @@ Scene({ |
|
|
|
imageList.push({url: result.data.orderImageList[index]}) |
|
|
|
} |
|
|
|
} |
|
|
|
var grossList = [] |
|
|
|
if(result.data.onsideGrossWeightImageList && result.data.onsideGrossWeightImageList.length){ |
|
|
|
for (let index = 0; index < result.data.onsideGrossWeightImageList.length; index++) { |
|
|
|
grossList.push({url: result.data.onsideGrossWeightImageList[index]}) |
|
|
|
} |
|
|
|
} |
|
|
|
this.setData({ form: result.data, admin: app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0, height, imageList, grossList }) |
|
|
|
// var grossList = []
|
|
|
|
// if(result.data.onsideGrossWeightImageList && result.data.onsideGrossWeightImageList.length){
|
|
|
|
// for (let index = 0; index < result.data.onsideGrossWeightImageList.length; index++) {
|
|
|
|
// grossList.push({url: result.data.onsideGrossWeightImageList[index]})
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
this.setData({ form: result.data, admin: app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0, height, imageList }) |
|
|
|
}).catch(err => { |
|
|
|
wx.hideLoading() |
|
|
|
util.showToast(err) |
|
|
|
@ -235,6 +235,18 @@ Scene({ |
|
|
|
util.showToast(err) |
|
|
|
}) |
|
|
|
}, |
|
|
|
viewImage: function (e) { |
|
|
|
var imgList = [] |
|
|
|
for (let index = 0; index < this.data.form.onsideGrossWeightImageList.length; index++) { |
|
|
|
var url = this.data.form.onsideGrossWeightImageList[index].url |
|
|
|
if(!util.isEmpty(url) && 'error' != url){ |
|
|
|
imgList.push(url) |
|
|
|
} |
|
|
|
} |
|
|
|
if(imgList.length){ |
|
|
|
wx.previewImage({ urls: imgList, current: e.currentTarget.dataset.url }) |
|
|
|
} |
|
|
|
}, |
|
|
|
checkForm: function(){ |
|
|
|
|
|
|
|
} |