# Object wx.getSystemSetting()

> 基础库 2.20.1 开始支持，低版本需做[兼容处理](1003706)。

> __小程序插件__：支持，需要小程序基础库版本不低于 [2.21.3](1003706)
> 
> __微信 Windows 版__：支持
> 
> __微信 Mac 版__：支持
> 
> __微信 鸿蒙 OS 版__：支持

## 功能描述

获取设备设置

## 返回值

### Object


```json
[
  {
    "属性": "bluetoothEnabled",
    "类型": "boolean",
    "说明": "蓝牙的系统开关"
  },
  {
    "属性": "locationEnabled",
    "类型": "boolean",
    "说明": "地理位置的系统开关"
  },
  {
    "属性": "wifiEnabled",
    "类型": "boolean",
    "说明": "Wi-Fi 的系统开关"
  },
  {
    "属性": "deviceOrientation",
    "类型": "string",
    "说明": "设备方向（注意：IOS客户端横屏游戏获取deviceOrientation可能不准，建议以屏幕宽高为准）",
    "子项": [
      {
        "合法值": "portrait",
        "说明": "竖屏"
      },
      {
        "合法值": "landscape",
        "说明": "横屏"
      }
    ]
  }
]
```

## 示例代码

```js
const systemSetting = wx.getSystemSetting()

console.log(systemSetting.bluetoothEnabled)
console.log(systemSetting.deviceOrientation)
console.log(systemSetting.locationEnabled)
console.log(systemSetting.wifiEnabled)
```
