::: sourceCode ## uni.getSystemSetting() @getsystemsetting > issues: https://issues.dcloud.net.cn/?mid=api.device.getSystemSetting > 源码: https://github.com/dcloudio/uni-app/tree/uni-app-x-alpha/src/uni_modules/uni-getSystemSetting ::: 获取系统设置 ### getSystemSetting 兼容性 ### 返回值 | 类型 | | :- | | **GetSystemSettingResult** | #### GetSystemSettingResult 的属性描述 | 名称 | 类型 | 必备 | 兼容性 | 描述 | | :- | :- | :- | :-: | :- | | bluetoothEnabled | boolean | 否 | Web: x; 微信小程序: 4.41; 支付宝小程序: 5.31; Android: 3.9; iOS: 4.11; HarmonyOS: 4.61 | 蓝牙是否开启
| | bluetoothError | string | 否 | Web: x; 微信小程序: 4.41; 支付宝小程序: 5.31; Android: 3.9; iOS: 4.11; HarmonyOS: 4.61 | 蓝牙的报错信息
| | locationEnabled | boolean | 是 | Web: x; 微信小程序: 4.41; 支付宝小程序: 5.31; Android: 3.9; iOS: 4.11; HarmonyOS: 4.61 | 位置是否开启
| | wifiEnabled | boolean | 否 | Web: x; 微信小程序: 4.41; 支付宝小程序: 5.31; Android: 3.9; iOS: 4.11; HarmonyOS: 4.61 | wifi是否开启
| | wifiError | string | 否 | Web: x; 微信小程序: 4.41; 支付宝小程序: 5.31; Android: 3.9; iOS: x; HarmonyOS: 4.61 | wifi的报错信息
| | deviceOrientation | string | 是 | Web: x; 微信小程序: 4.41; 支付宝小程序: 5.31; Android: 3.9; iOS: 4.11; HarmonyOS: 4.61 | 设备方向
| ##### deviceOrientation 的属性描述 | 合法值 | 兼容性 | 描述 | | :- | :-: | :- | | "portrait" | Web: x | 纵向 | | "landscape" | Web: x | 横向 | ## 注意事项 - 如果出现 `bluetoothError`、`wifiError` 非空的情况就说明权限配置错误,需要根据 [文档](https://uniapp.dcloud.net.cn/tutorial/app-nativeresource-android.html#permissions) 正确配置权限。 ### 示例 示例为[hello uni-app x alpha分支](https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/API/get-system-setting/get-system-setting.uvue),与最新HBuilderX Alpha版同步。与最新正式版同步的master分支示例[另见](https://gitcode.com/dcloud/hello-uni-app-x/blob/master//pages/API/get-system-setting/get-system-setting.uvue) > > 该 API 不支持 Web,请运行 hello uni-app x 到 App 平台体验 ::: preview > appRedirect https://hellouniappx.dcloud.net.cn/appredirect.html?path=pages/API/get-system-setting/get-system-setting ```uvue ``` ::: ## 通用类型 ### GeneralCallbackResult @generalcallbackresult-values | 名称 | 类型 | 必备 | 描述 | | :- | :- | :- | :- | | errMsg | string | 是 | 错误信息 |