微信小程序
wx.getSystemSetting
# Object wx.getSystemSetting()
基础库 2.20.1 开始支持,低版本需做兼容处理。
小程序插件:支持,需要小程序基础库版本不低于 2.21.3
微信 Windows 版:支持
微信 Mac 版:支持
# 功能描述
获取设备设置
# 返回值
# Object
# 示例代码
const systemSetting = wx.getSystemSetting()
console.log(systemSetting.bluetoothEnabled)
console.log(systemSetting.deviceOrientation)
console.log(systemSetting.locationEnabled)
console.log(systemSetting.wifiEnabled)