interface.uts 1.1 KB
Newer Older
DCloud-yyl's avatar
DCloud-yyl 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26


export type GetSystemSettingResult = {
  /**
   * 蓝牙是否开启
   */
  bluetoothEnabled?: boolean,
  /**
   * 蓝牙的报错信息
   */
  bluetoothError?: string,
  /**
   * 位置是否开启
   */
  locationEnabled : boolean,
  /**
   * wifi是否开启
   */
  wifiEnabled?: boolean,
  /**
   * wifi的报错信息
   */
  wifiError?: string,
  /**
   * 设备方向
   */
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": "9.0",
	* 			"uniVer": "√",
	* 			"unixVer": "x"
	* 		}
	* 	}
	* }
DCloud-yyl's avatar
DCloud-yyl 已提交
56 57 58 59 60 61 62
    * @example
     ```typescript
      uni.getSystemSetting()
     ```
    */
  getSystemSetting(): GetSystemSettingResult;
}