提个意见
发布于 4 年前 作者 jun46 14410 次浏览 来自 官方Issues
1 回复

比如:你可以通过 wx.getSetting 获取 scope.bluetooth 是否为 true 代表授权状态

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

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

回到顶部