- 视频广告组件的曝光量和拉取量差距好大是为什么?
[图片] 这个拉取量2500,为啥曝光量就400呢,是什么原因导致两者差距那么大的呢?
2019-10-25 - 相机组件重新授权之后无法拍照?
刚进入页面的时候利用 wx.getSetting({ success(res) { console.log(res) if (!res.authSetting['scope.camera']) { console.log('没有授权') wx.authorize({ scope: 'scope.camera', success() { wx.hideLoading() ctx = wx.createCameraContext() _this.cameraSuccess() }, fail: function(res) { console.log(res) wx.hideLoading() _this.setData({ getCamera: true }) } }) } else { //用户已经授权相机 wx.hideLoading() console.log('授权了') ctx = wx.createCameraContext() _this.cameraSuccess() } } }) 判断有没有相机授权,点击拒绝之后,利用 wx.openSetting({ success: function(res) { console.log(res) if (res.authSetting['scope.camera']) { _this.setData({ getCamera: false, }) wx.showModal({ title: '提示', content: '您已授权成功', showCancel: false, confirmText: '确定', success: function(res) { if (res.confirm) { // console.log('用户点击了“返回授权”') _this.cameraSuccess() } } }) setTimeout(function() { // _this.cameraSuccess() }, 1000) } else { wx.showModal({ title: '警告', content: '您没有授权成功', showCancel: false, confirmText: '确定', success: function(res) { if (res.confirm) { // console.log('用户点击了“返回授权”') } } }) } }, fail: function(res) { console.log(res) } }) 引导用户开启相机权限,但是开启返回之后,就不会调用ctx.takePhoto(),方法都没有走,因为我的手机是redmi k20 pro,调用摄像头的时候会弹出来,这里都没有弹出来,怎么解决,是我代码写的问题吗?
2019-10-22