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


export type GetSystemSettingResult = {
  /**
DCloud-yyl's avatar
DCloud-yyl 已提交
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
   * 蓝牙是否开启
   * 
   * @uniPlatform
   * {
   * 	"app": {
   * 		"android": {
   * 			"osVer": "5.0",
   * 			"uniVer": "√",
   * 			"unixVer": "3.9+"
   * 		},
   * 		"ios": {
   * 			"osVer": "12.0",
   * 			"uniVer": "√",
   * 			"unixVer": "4.11"
   * 		}
   * 	}
   * }
DCloud-yyl's avatar
DCloud-yyl 已提交
22 23 24
   */
  bluetoothEnabled?: boolean,
  /**
DCloud-yyl's avatar
DCloud-yyl 已提交
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
   * 蓝牙的报错信息
   * 
   * @uniPlatform
   * {
   * 	"app": {
   * 		"android": {
   * 			"osVer": "5.0",
   * 			"uniVer": "√",
   * 			"unixVer": "3.9+"
   * 		},
   * 		"ios": {
   * 			"osVer": "12.0",
   * 			"uniVer": "√",
   * 			"unixVer": "4.11"
   * 		}
   * 	}
   * }
DCloud-yyl's avatar
DCloud-yyl 已提交
42 43 44
   */
  bluetoothError?: string,
  /**
DCloud-yyl's avatar
DCloud-yyl 已提交
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
   * 位置是否开启
   * 
   * @uniPlatform
   * {
   * 	"app": {
   * 		"android": {
   * 			"osVer": "5.0",
   * 			"uniVer": "√",
   * 			"unixVer": "3.9+"
   * 		},
   * 		"ios": {
   * 			"osVer": "12.0",
   * 			"uniVer": "√",
   * 			"unixVer": "4.11"
   * 		}
   * 	}
   * }
DCloud-yyl's avatar
DCloud-yyl 已提交
62 63 64
   */
  locationEnabled : boolean,
  /**
DCloud-yyl's avatar
DCloud-yyl 已提交
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
   * wifi是否开启
   * 
   * @uniPlatform
   * {
   * 	"app": {
   * 		"android": {
   * 			"osVer": "5.0",
   * 			"uniVer": "√",
   * 			"unixVer": "3.9+"
   * 		},
   * 		"ios": {
   * 			"osVer": "12.0",
   * 			"uniVer": "√",
   * 			"unixVer": "4.11"
   * 		}
   * 	}
   * }
DCloud-yyl's avatar
DCloud-yyl 已提交
82 83 84
   */
  wifiEnabled?: boolean,
  /**
DCloud-yyl's avatar
DCloud-yyl 已提交
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
   * wifi的报错信息
   * 
   * @uniPlatform
   * {
   * 	"app": {
   * 		"android": {
   * 			"osVer": "5.0",
   * 			"uniVer": "√",
   * 			"unixVer": "3.9+"
   * 		},
   * 		"ios": {
   * 			"osVer": "x",
   * 			"uniVer": "x",
   * 			"unixVer": "x"
   * 		}
   * 	}
   * }
DCloud-yyl's avatar
DCloud-yyl 已提交
102 103 104
   */
  wifiError?: string,
  /**
DCloud-yyl's avatar
DCloud-yyl 已提交
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
   * 设备方向
   * 
   * @uniPlatform
   * {
   * 	"app": {
   * 		"android": {
   * 			"osVer": "5.0",
   * 			"uniVer": "√",
   * 			"unixVer": "3.9+"
   * 		},
   * 		"ios": {
   * 			"osVer": "12.0",
   * 			"uniVer": "√",
   * 			"unixVer": "4.11"
   * 		}
   * 	}
   * }
DCloud-yyl's avatar
DCloud-yyl 已提交
122
   */
DCloud-yyl's avatar
DCloud-yyl 已提交
123
  deviceOrientation : 'portrait' | 'landscape',
DCloud-yyl's avatar
DCloud-yyl 已提交
124 125 126 127 128 129 130 131 132
}


export type GetSystemSetting = () => GetSystemSettingResult


export interface Uni {
  /**
    * GetSystemSetting()
DCloud-yyl's avatar
DCloud-yyl 已提交
133
    * @description 
DCloud-yyl's avatar
DCloud-yyl 已提交
134 135 136
    * 获取系统设置
    * @return {object}
    * @tutorial https://uniapp.dcloud.net.cn/api/system/getsystemsetting.html
DCloud-yyl's avatar
DCloud-yyl 已提交
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
    * @uniPlatform
	* {
	* 	"app": {
	* 		"android": {
	* 			"osVer": "5.0",
	* 			"uniVer": "√",
	* 			"unixVer": "3.9+"
	* 		},
	* 		"ios": {
	* 			"osVer": "12.0",
	* 			"uniVer": "√",
	* 			"unixVer": "4.11"
	* 		}
	* 	}
	* }
DCloud-yyl's avatar
DCloud-yyl 已提交
152 153 154 155 156 157 158
    * @example
     ```typescript
      uni.getSystemSetting()
     ```
    */
  getSystemSetting(): GetSystemSettingResult;
}