interface.uts 1.2 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 27 28 29 30 31 32 33 34 35 36


export type GetSystemSettingResult = {
  /**
   * 蓝牙是否开启
   */
  bluetoothEnabled?: boolean,
  /**
   * 蓝牙的报错信息
   */
  bluetoothError?: string,
  /**
   * 位置是否开启
   */
  locationEnabled : boolean,
  /**
   * wifi是否开启
   */
  wifiEnabled?: boolean,
  /**
   * wifi的报错信息
   */
  wifiError?: string,
  /**
   * 设备方向
   */
  deviceOrientation : string
}


export type GetSystemSetting = () => GetSystemSettingResult


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