interface.uts 1.1 KB
Newer Older
DCloud-yyl's avatar
DCloud-yyl 已提交
1 2 3 4


export type GetSystemSettingResult = {
  /**
DCloud-yyl's avatar
DCloud-yyl 已提交
5
   * 蓝牙是否开启
DCloud-yyl's avatar
DCloud-yyl 已提交
6 7 8
   */
  bluetoothEnabled?: boolean,
  /**
DCloud-yyl's avatar
DCloud-yyl 已提交
9
   * 蓝牙的报错信息
DCloud-yyl's avatar
DCloud-yyl 已提交
10 11 12
   */
  bluetoothError?: string,
  /**
DCloud-yyl's avatar
DCloud-yyl 已提交
13
   * 位置是否开启
DCloud-yyl's avatar
DCloud-yyl 已提交
14 15 16
   */
  locationEnabled : boolean,
  /**
DCloud-yyl's avatar
DCloud-yyl 已提交
17
   * wifi是否开启
DCloud-yyl's avatar
DCloud-yyl 已提交
18 19 20
   */
  wifiEnabled?: boolean,
  /**
DCloud-yyl's avatar
DCloud-yyl 已提交
21
   * wifi的报错信息
DCloud-yyl's avatar
DCloud-yyl 已提交
22 23 24
   */
  wifiError?: string,
  /**
DCloud-yyl's avatar
DCloud-yyl 已提交
25
   * 设备方向
DCloud-yyl's avatar
DCloud-yyl 已提交
26
   */
DCloud-yyl's avatar
DCloud-yyl 已提交
27
  deviceOrientation : 'portrait' | 'landscape',
DCloud-yyl's avatar
DCloud-yyl 已提交
28 29 30 31 32 33 34 35 36
}


export type GetSystemSetting = () => GetSystemSettingResult


export interface Uni {
  /**
    * GetSystemSetting()
DCloud-yyl's avatar
DCloud-yyl 已提交
37
    * @description 
DCloud-yyl's avatar
DCloud-yyl 已提交
38 39 40
    * 获取系统设置
    * @return {object}
    * @tutorial https://uniapp.dcloud.net.cn/api/system/getsystemsetting.html
DCloud-yyl's avatar
DCloud-yyl 已提交
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
    * @uniPlatform
	* {
	* 	"app": {
	* 		"android": {
	* 			"osVer": "5.0",
	* 			"uniVer": "√",
	* 			"unixVer": "3.9+"
	* 		},
	* 		"ios": {
	* 			"osVer": "12.0",
	* 			"uniVer": "√",
	* 			"unixVer": "4.11"
	* 		}
	* 	}
	* }
DCloud-yyl's avatar
DCloud-yyl 已提交
56 57 58 59 60 61 62
    * @example
     ```typescript
      uni.getSystemSetting()
     ```
    */
  getSystemSetting(): GetSystemSettingResult;
}