获得过 0 次赞
回答过的问题获得 0 次赞
分享过的文章/案例获得 0 次赞
评论与回复获得 0 次赞
that=[代码]this[代码] [代码]//......[代码] [代码] [代码] [代码] [代码] [代码]that.setData({[代码] [代码]//.....[代码]
compressImage里setData无效[代码]wx.compressImage({[代码][代码] [代码][代码]src: res.tempImagePath, [代码][代码]// 原图片路径[代码][代码] [代码][代码]quality: 50, [代码][代码]// 压缩质量,[代码][代码] [代码][代码]complete: compRes => {[代码][代码] [代码][代码]console.log(compRes.tempFilePath)[代码][代码] [代码][代码]this[代码][代码].setData({[代码][代码] [代码][代码]'form.compImg'[代码][代码]: compRes.tempFilePath[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码]console.log(compRes.tempFilePath)能打印出来正确的临时路径,但是往form.compImg里赋值就是一直时undefined??
2019-03-13