微信小程序如何上传Camera 标签 用takePhone()拍摄的临时图片?
takePhoto() {
var that = this;
const ctx = wx.createCameraContext()
ctx.takePhoto({
quality: 'high',
success: (res) => {
this.setData({
showView1: true,
src: res.tempImagePath,//保存拍摄路径
showView1: (!that.data.showView1),//显示刚拍摄的图片
})
filePatha= res.tempImagePath;
console.log(filePatha,"aaaa");
}
})
}
然后用 wx.saveImageToPhotosAlbum 能把刚拍的图保存到本地,但是不知道如何拿到路径上传