takePhoto 测试环境 请问为啥报下面错误,怎么办?
takePhoto() { const ctx = wx.createCameraContext() ctx.takePhoto({ quality: 'high', success(res) { console.log('success') console.log(res) }, fail(res) { console.log('takePhoto fail res') console.log(res) } }) [代码]<!-- camera.wxml --> [代码] [代码]<camera device-position="back" flash="off" binderror="error" style="width: 100%; height: 300px;"></camera><button type="primary" bindtap="takePhoto">拍照</button><view>预览</view><image mode="widthFix" src="{{src}}"></image>[代码] Cannot read property 'mode' of undefined;at pages/take_video/video page takePhoto function TypeError: Cannot read property 'mode' of undefined