对于这个公告中的scope.bluetooth,2022年2月21日24时前如何处理?
发布于 3 年前 作者 dongjie 8315 次浏览 来自 问答

https://developers.weixin.qq.com/community/develop/doc/000e881c7046a8fa1f4d464105b001?idescene=6&page=1#comment-list

开发者可在平台调整前提前增加使用 wx.getSetting 获取用户当前的授权状态的逻辑,若授权状态为false可以调用 wx.openSetting 打开设置界面,引导用户开启授权。

请问,2022年2月21日24时前又没有scope.bluetooth选项,即使打开设置界面,要用户设置什么?都选不了,要怎么设置!!!!!!!

难道要2022年2月21日24时立马上线新版本小程序么?

1 回复

确定没有吗?测试过了吗?

逻辑大概是:你可以通过 wx.getSetting 获取 scope.bluetooth 是否为 true 代表授权状态

如果 wx.getSetting 里没有 scope.bluetooth ,则要用 wx.authorize({ scope: “scope.bluetooth” }) 去弹窗要求用户授权

如果 wx.getSetting 里有 scope.bluetooth 并且为 false,则要用 wx.openSetting 引导用户手动开启授权开关。

回到顶部