const { bluetoothAuthorized } = uni.getAppAuthorizeSetting()
console.log(bluetoothAuthorized )
// bluetoothAuthorized = “not determined”
![JSRTSDF](https://img-cdn-tc.dcloud.net.cn/account/identicon/eb95be3fa071de0c67dc3b60813345f2.png)
- 发布:2025-01-13 18:03
- 更新:2025-01-13 18:03
- 阅读:45
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 22H2
HBuilderX类型: 正式
HBuilderX版本号: 4.45
手机系统: iOS
手机系统版本号: iOS 18
手机厂商: 苹果
手机机型: iPhone 11
页面类型: vue
vue版本: vue2
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
在 onLoad中执行:
const { bluetoothAuthorized } = uni.getAppAuthorizeSetting()
console.log(bluetoothAuthorized )
// bluetoothAuthorized = “not determined”
在 onLoad中执行:
const { bluetoothAuthorized } = uni.getAppAuthorizeSetting()
console.log(bluetoothAuthorized )
// bluetoothAuthorized = “not determined”
预期结果:
返回正确的bluetoothAuthorized 值
返回正确的bluetoothAuthorized 值
实际结果:
app打开后 第一次运行总是返回 “not determined”
app打开后 第一次运行总是返回 “not determined”
bug描述:
每次打开app 第一次执行 uni.getAppAuthorizeSetting方法时,返回的bluetoothAuthorized值总是为 “not determined”
0 个回复