- 线上发布版本无法初始化蓝牙功能?
打开小程序就提示蓝牙初始化失败,但是在开发版本和体验版本上没有这个问题 wx.getSetting({ success:(res)=>{ if(res.authSetting['scope.bluetooth'] != undefined && res.authSetting['scope.bluetooth'] == false){ wx.openSetting({ success:(authData)=>{ if(authData.authSetting['scope.bluetooth'] == true){ this.openBluetoothAdapter() ; }else{ wx.showToast({ title: '未获得蓝牙使用权限!', icon: "none" }) } } }) } if(res.authSetting['scope.bluetooth'] == undefined){ wx.authorize({ scope: 'scope.bluetooth', success:(res)=>{ this.openBluetoothAdapter() ; } }) } if(res.authSetting['scope.bluetooth'] == true){ this.openBluetoothAdapter() ; } } }) openBluetoothAdapter(){ if(this.globalData.blehaveInit == false){ wx.showLoading({title: "正在初始化蓝牙..."}); } wx.openBluetoothAdapter({ success: (res) => { console.log('openBluetoothAdapter success', res) this.globalData.blehaveInit = true; wx.hideLoading(); }, fail: (res) => { if (res.errCode === 10001) { wx.onBluetoothAdapterStateChange(function (res) { console.log('onBluetoothAdapterStateChange', res) if (res.available) { this.globalData.blehaveInit = true; wx.hideLoading(); }else{ this.globalData.blehaveInit = false; wx.hideLoading(); wx.showToast({ title: '蓝牙初始化失败!', icon: "none" }) } }) }else{ this.globalData.blehaveInit = false; wx.hideLoading(); wx.showToast({ title: '蓝牙初始化失败!', icon: "none" }) } } }) }, 以上是蓝牙的授权和初始化代码,在编译器里面也有警告无效的 app.json permission["scope.bluetooth"],请问如何解决?
10-09 - 遇到request:fail net::ERR_CERT_AUTHORITY_INVALID怎么办?
您好,在该域名下的其他的小程序都能正常访问服务地址,但是就有一个小程序服务这个地址的下的服务访问一直报这个错误。而且证书刚续费过了,续费之前也一直是可以正常访问的。证书也检查过了,没有问题。请问,有什么办法去解决?
2020-10-09