小程序扫码,之前可以用的突然不能用了?
var that = this;
wx.authorize({
scope: 'scope.camera',
success () {
console.log('同意调取摄像头授权')
}
})
wx.getSetting({
success(res) {
if (res.authSetting['scope.camera']) {
console.log(' camera 已授权')
wx.scanCode({
onlyFromCamera:false,//相册或相机获取二维码
success (res) {}
else
{
console.log('camera 未授权')
}
// 现在申请权限拉不起来,无法打开摄像头扫码