在第一个页面拍照后进入第二个页面,之后返回到第一个页面,页面无法调用拍照功能
takePhoto() {
// wx.navigateTo({
// url: ‘…/testResult/testResult’
// });
const ctx = wx.createCameraContext()
ctx.takePhoto({
quality: ‘high’,
success: (res) => {
console.log(res)
this.setData({
src: res.tempImagePath
})
app.globalData.src = res.tempImagePath;
wx.navigateTo({
url: ‘…/testResult/testResult’
});
},
complete: (res) => {
}
})
}
2 回复
你好,请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。