@dcloudio/uni-app-x 0.7.37 → 0.7.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/package.json +1 -1
  2. package/types/UniPage.d.ts +48 -9
  3. package/types/app.d.ts +8 -5
  4. package/types/native/AsyncApiResult.d.ts +1 -0
  5. package/types/native/CanvasRenderingContext2D.d.ts +1 -1
  6. package/types/native/IUniElement.d.ts +130 -35
  7. package/types/native/UniElement.d.ts +2 -1
  8. package/types/native/UniTextElement.d.ts +1 -0
  9. package/types/native/global.d.ts +16 -0
  10. package/types/page.d.ts +47 -5
  11. package/types/uni/env/index.d.ts +87 -73
  12. package/types/uni/global.d.ts +1 -0
  13. package/types/uni/index.d.ts +1 -0
  14. package/types/uni/uni-map-tencent-global.d.ts +33 -0
  15. package/types/uni/uni-map-tencent-map.d.ts +52 -0
  16. package/types/uni/uts-plugin-api/global.d.ts +2 -1
  17. package/types/uni/uts-plugin-api/index.d.ts +2 -1
  18. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/global.d.ts +0 -2
  19. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/index.d.ts +0 -1
  20. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/interface.d.ts +212 -219
  21. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/interface.d.ts +73 -73
  22. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/interface.d.ts +331 -205
  23. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/interface.d.ts +73 -73
  24. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/interface.d.ts +848 -208
  25. package/types/uni/{uts-plugin-extend → uts-plugin-api}/lib/uni-chooseLocation/utssdk/global.d.ts +5 -6
  26. package/types/uni/{uts-plugin-extend → uts-plugin-api}/lib/uni-chooseLocation/utssdk/index.d.ts +3 -3
  27. package/types/uni/uts-plugin-api/lib/uni-chooseLocation/utssdk/interface.d.ts +414 -0
  28. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/interface.d.ts +2 -2
  29. package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/global.d.ts +4 -0
  30. package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/index.d.ts +2 -0
  31. package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +1226 -1726
  32. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/interface.d.ts +1 -1
  33. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/interface.d.ts +102 -18
  34. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +2 -2
  35. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/interface.d.ts +1199 -1045
  36. package/types/uni/uts-plugin-api/lib/uni-event/utssdk/interface.d.ts +294 -263
  37. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +33 -28
  38. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/interface.d.ts +210 -0
  39. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +4828 -1750
  40. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +490 -448
  41. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +2138 -829
  42. package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/global.d.ts +4 -0
  43. package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/index.d.ts +2 -0
  44. package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +664 -114
  45. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +891 -9
  46. package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/interface.d.ts +3 -3
  47. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +254 -114
  48. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +152 -12
  49. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/interface.d.ts +813 -57
  50. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent-uni1/utssdk/global.d.ts +0 -2
  51. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent-uni1/utssdk/interface.d.ts +0 -45
  52. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +274 -148
  53. package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/interface.d.ts +38 -3
  54. package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/interface.d.ts +969 -969
  55. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +3161 -43
  56. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +316 -22
  57. package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/interface.d.ts +2 -2
  58. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/interface.d.ts +42 -0
  59. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/interface.d.ts +41 -41
  60. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/interface.d.ts +88 -88
  61. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/global.d.ts +8 -0
  62. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/index.d.ts +4 -0
  63. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +2765 -1193
  64. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/interface.d.ts +18 -18
  65. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +3098 -1153
  66. package/types/uni/uts-plugin-api/lib/uni-oauth/utssdk/interface.d.ts +13 -13
  67. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/interface.d.ts +42 -0
  68. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/interface.d.ts +10 -10
  69. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/interface.d.ts +621 -369
  70. package/types/uni/uts-plugin-api/lib/uni-payment-huawei/utssdk/global.d.ts +8 -0
  71. package/types/uni/uts-plugin-api/lib/uni-payment-huawei/utssdk/index.d.ts +4 -0
  72. package/types/uni/uts-plugin-api/lib/uni-payment-huawei/utssdk/interface.d.ts +1 -0
  73. package/types/uni/uts-plugin-api/lib/uni-privacy/utssdk/interface.d.ts +540 -253
  74. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +2602 -1131
  75. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/interface.d.ts +2 -2
  76. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +58 -58
  77. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/interface.d.ts +77 -35
  78. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/interface.d.ts +42 -0
  79. package/types/uni/uts-plugin-api/lib/uni-shareWithSystem/utssdk/global.d.ts +4 -0
  80. package/types/uni/uts-plugin-api/lib/uni-shareWithSystem/utssdk/index.d.ts +2 -0
  81. package/types/uni/uts-plugin-api/lib/uni-shareWithSystem/utssdk/interface.d.ts +614 -15
  82. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +857 -437
  83. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +58 -16
  84. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/global.d.ts +8 -0
  85. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/index.d.ts +4 -0
  86. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/interface.d.ts +1057 -516
  87. package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/interface.d.ts +1656 -1488
  88. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +1752 -786
  89. package/types/uni/uts-plugin-biz/global.d.ts +1 -0
  90. package/types/uni/uts-plugin-biz/index.d.ts +1 -0
  91. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +85 -1
  92. package/types/uni/{uts-plugin-api → uts-plugin-biz}/lib/uni-crash/utssdk/interface.d.ts +46 -46
  93. package/types/uni/uts-plugin-biz/lib/uni-map-tencent/utssdk/interface.d.ts +72 -20
  94. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/interface.d.ts +126 -0
  95. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/global.d.ts +4 -0
  96. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/index.d.ts +2 -0
  97. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +98 -15
  98. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +677 -299
  99. package/types/uni/uts-plugin-extend/README.md +3 -0
  100. package/types/uni/uts-plugin-extend/global.d.ts +1 -0
  101. package/types/uni/uts-plugin-extend/lib/uni-__f__/utssdk/global.d.ts +7 -0
  102. package/types/uni/uts-plugin-extend/lib/uni-__f__/utssdk/index.d.ts +0 -0
  103. package/types/uni/uts-plugin-extend/lib/uni-__f__/utssdk/interface.d.ts +3 -0
  104. package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/interface.d.ts +4 -4
  105. package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/interface.d.ts +5 -5
  106. package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/interface.d.ts +302 -302
  107. package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/interface.d.ts +77 -77
  108. package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +431 -11
  109. package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/interface.d.ts +3 -3
  110. package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/interface.d.ts +6 -6
  111. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/interface.d.ts +2 -2
  112. package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/interface.d.ts +73 -73
  113. package/types/uni-cloud/interface.d.ts +91 -0
  114. package/uts-plugin.d.ts +3 -1
  115. package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/interface.d.ts +0 -151
  116. package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/global.d.ts +0 -11
  117. package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/index.d.ts +0 -4
  118. package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +0 -224
  119. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/global.d.ts +0 -53
  120. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/index.d.ts +0 -25
  121. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/interface.d.ts +0 -487
  122. package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/global.d.ts +0 -9
  123. package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/index.d.ts +0 -1
  124. package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/interface.d.ts +0 -165
  125. /package/types/uni/{uts-plugin-api → uts-plugin-biz}/lib/uni-crash/utssdk/global.d.ts +0 -0
  126. /package/types/uni/{uts-plugin-api → uts-plugin-biz}/lib/uni-crash/utssdk/index.d.ts +0 -0
@@ -7,7 +7,6 @@ import {
7
7
  GetLocation as GetLocationOrigin,
8
8
  GetLocationSuccess as GetLocationSuccessOrigin,
9
9
  GetLocationOptions as GetLocationOptionsOrigin,
10
- Uni as UniOrigin
11
10
  } from './interface'
12
11
 
13
12
  declare global {
@@ -18,5 +17,4 @@ declare global {
18
17
  type GetLocation = GetLocationOrigin
19
18
  type GetLocationSuccess = GetLocationSuccessOrigin
20
19
  type GetLocationOptions = GetLocationOptionsOrigin
21
- interface Uni extends UniOrigin { }
22
20
  }
@@ -2,51 +2,6 @@ import { GetLocationFailImpl as GetLocationFailImplement } from './unierror.uts'
2
2
 
3
3
  export type GetLocationFailImpl = GetLocationFailImplement
4
4
 
5
- export interface Uni {
6
-
7
- /**
8
- * @description 获取当前的地理位置、速度
9
- * @param {GetLocation} option
10
- * @example
11
- * ```typescript
12
- * uni.getLocation({
13
- * type: 'wgs84',
14
- * success: function (res) {
15
- * console.log('当前位置的经度:' + res.longitude);
16
- * console.log('当前位置的纬度:' + res.latitude);
17
- * }
18
- * });
19
- * ```
20
- * @tutorial http://uniapp.dcloud.io/api/location/location?id=getlocation
21
- * @uniPlatform {
22
- * "app": {
23
- * "android": {
24
- * "osVer": "5.0",
25
- * "uniVer": "√",
26
- * "unixVer": "3.9.0"
27
- * },
28
- * "ios": {
29
- * "osVer": "12.0",
30
- * "uniVer": "√",
31
- * "unixVer": "4.11"
32
- * },
33
- * "harmony": {
34
- * "osVer": "x",
35
- * "uniVer": "4.25",
36
- * "unixVer": "x"
37
- * }
38
- * },
39
- * "web": {
40
- * "uniVer": "√",
41
- * "unixVer": "4.0"
42
- * }
43
- * }
44
- *
45
- */
46
- getLocation(options : GetLocationOptions) : void;
47
-
48
- }
49
-
50
5
  /**
51
6
  * 错误码
52
7
  */
@@ -1,148 +1,274 @@
1
- export interface Uni {
2
- /**
3
- * getNetworkType()
4
- * @description
5
- * 获取网络类型
6
- * @param {GetNetworkTypeOptions} options
7
- * @return {void}
8
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/system/network.html#getnetworktype
9
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-network-type.html
10
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-network-type.html
11
- * @uniPlatform {
12
- * "app": {
13
- * "android": {
14
- * "osVer": "5.0",
15
- * "uniVer": "√",
16
- * "unixVer": "3.9+"
17
- * },
18
- * "ios": {
19
- * "osVer": "12.0",
20
- * "uniVer": "√",
21
- * "unixVer": "4.11"
22
- * },
23
- * "harmony": {
24
- * "osVer": "3.0",
25
- * "uniVer": "4.24",
26
- * "unixVer": "x"
27
- * }
28
- * },
29
- * "web": {
30
- * "uniVer": "√",
31
- * "unixVer": "4.0"
32
- * }
33
- * }
34
- * @example
35
- * ```typescript
36
- * uni.getNetworkType({
37
- * success(res){
38
- * console.log(res);
39
- * }
40
- * });
41
- * ```
42
- */
43
- getNetworkType(options: GetNetworkTypeOptions): void;
44
- /**
45
- * 监听网络状态变化
46
- *
47
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/system/network.html#onnetworkstatuschange
48
- * @tutorial https://uniapp.dcloud.net.cn/api/system/network.html#onnetworkstatuschange
49
- * @uniPlatform {
50
- * "app": {
51
- * "android": {
52
- * "osVer": "5.0",
53
- * "uniVer": "",
54
- * "unixVer": "3.9+"
55
- * },
56
- * "ios": {
57
- * "osVer": "12.0",
58
- * "uniVer": "",
59
- * "unixVer": "4.11"
60
- * },
61
- * "harmony": {
62
- * "osVer": "3.0",
63
- * "uniVer": "4.24",
64
- * "unixVer": "x"
65
- * }
66
- * },
67
- * "web": {
68
- * "uniVer": "",
69
- * "unixVer": "4.0"
70
- * }
71
- * }
72
- */
73
- onNetworkStatusChange: OnNetworkStatusChange;
74
- /**
75
- * 取消监听网络状态变化
76
- *
77
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/system/network.html#offnetworkstatuschange
78
- * @tutorial https://uniapp.dcloud.net.cn/api/system/network.html#offnetworkstatuschange
79
- * @uniPlatform {
80
- * "app": {
81
- * "android": {
82
- * "osVer": "5.0",
83
- * "uniVer": "√",
84
- * "unixVer": "3.9+"
85
- * },
86
- * "ios": {
87
- * "osVer": "12.0",
88
- * "uniVer": "√",
89
- * "unixVer": "4.11"
90
- * },
91
- * "harmony": {
92
- * "osVer": "3.0",
93
- * "uniVer": "4.24",
94
- * "unixVer": "x"
95
- * }
96
- * },
97
- * "web": {
98
- * "uniVer": "√",
99
- * "unixVer": "4.0"
100
- * }
101
- * }
102
- */
103
- offNetworkStatusChange: OffNetworkStatusChange;
104
- }
105
-
106
- export type GetNetworkType = (options: GetNetworkTypeOptions) => void;
107
- export type GetNetworkTypeSuccess = {
108
- /**
109
- * 网络类型
110
- */
111
- networkType: string
112
- };
113
- export type GetNetworkTypeSuccessCallback = (result: GetNetworkTypeSuccess) => void;
114
- export type GetNetworkTypeFail = UniError;
115
- export type GetNetworkTypeFailCallback = (result: GetNetworkTypeFail) => void;
116
- export type GetNetworkTypeComplete = any;
117
- export type GetNetworkTypeCompleteCallback = (result: GetNetworkTypeComplete) => void;
118
- export type GetNetworkTypeOptions = {
119
- /**
120
- * 接口调用成功的回调函数
121
- * @defaultValue null
122
- */
123
- success?: GetNetworkTypeSuccessCallback | null,
124
- /**
125
- * 接口调用失败的回调函数
126
- * @defaultValue null
127
- */
128
- fail?: GetNetworkTypeFailCallback | null,
129
- /**
130
- * 接口调用结束的回调函数(调用成功、失败都会执行)
131
- * @defaultValue null
132
- */
133
- complete?: GetNetworkTypeCompleteCallback | null
134
- };
135
- export type OnNetworkStatusChangeCallbackResult = {
136
- /**
137
- * 当前是否有网络连接
138
- * @type boolean
139
- */
140
- isConnected: boolean,
141
- /**
142
- * 网络类型
143
- */
144
- networkType: string
145
- };
146
- export type OnNetworkStatusChangeCallback = (result: OnNetworkStatusChangeCallbackResult) => void;
147
- export type OnNetworkStatusChange = (callback: OnNetworkStatusChangeCallback) => void;
148
- export type OffNetworkStatusChange = (callback: (result: any) => void) => void;
1
+ export interface Uni {
2
+ /**
3
+ * getNetworkType()
4
+ * @description
5
+ * 获取网络类型
6
+ * @param {GetNetworkTypeOptions} options
7
+ * @return {void}
8
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/system/network.html#getnetworktype
9
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-network-type.html
10
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-network-type.html
11
+ * @uniPlatform {
12
+ * "app": {
13
+ * "android": {
14
+ * "osVer": "5.0",
15
+ * "uniVer": "√",
16
+ * "unixVer": "3.9+"
17
+ * },
18
+ * "ios": {
19
+ * "osVer": "12.0",
20
+ * "uniVer": "√",
21
+ * "unixVer": "4.11"
22
+ * },
23
+ * "harmony": {
24
+ * "osVer": "3.0",
25
+ * "uniVer": "4.24",
26
+ * "unixVer": "x"
27
+ * }
28
+ * },
29
+ * "mp": {
30
+ * "weixin": {
31
+ * "hostVer": "",
32
+ * "uniVer": "√",
33
+ * "unixVer": "4.41"
34
+ * },
35
+ * "alipay": {
36
+ * "hostVer": "√",
37
+ * "uniVer": "√",
38
+ * "unixVer": "x"
39
+ * },
40
+ * "baidu": {
41
+ * "hostVer": "√",
42
+ * "uniVer": "√",
43
+ * "unixVer": "x"
44
+ * },
45
+ * "toutiao": {
46
+ * "hostVer": "√",
47
+ * "uniVer": "√",
48
+ * "unixVer": "x"
49
+ * },
50
+ * "lark": {
51
+ * "hostVer": "√",
52
+ * "uniVer": "",
53
+ * "unixVer": "x"
54
+ * },
55
+ * "qq": {
56
+ * "hostVer": "√",
57
+ * "uniVer": "",
58
+ * "unixVer": "x"
59
+ * },
60
+ * "kuaishou": {
61
+ * "hostVer": "√",
62
+ * "uniVer": "",
63
+ * "unixVer": "x"
64
+ * },
65
+ * "jd": {
66
+ * "hostVer": "√",
67
+ * "uniVer": "√",
68
+ * "unixVer": "x"
69
+ * }
70
+ * },
71
+ * "web": {
72
+ * "uniVer": "√",
73
+ * "unixVer": "4.0"
74
+ * }
75
+ * }
76
+ * @example
77
+ * ```typescript
78
+ * uni.getNetworkType({
79
+ * success(res){
80
+ * console.log(res);
81
+ * }
82
+ * });
83
+ * ```
84
+ */
85
+ getNetworkType(options: GetNetworkTypeOptions): void;
86
+ /**
87
+ * 监听网络状态变化
88
+ *
89
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/system/network.html#onnetworkstatuschange
90
+ * @tutorial https://uniapp.dcloud.net.cn/api/system/network.html#onnetworkstatuschange
91
+ * @uniPlatform {
92
+ * "app": {
93
+ * "android": {
94
+ * "osVer": "5.0",
95
+ * "uniVer": "√",
96
+ * "unixVer": "3.9+"
97
+ * },
98
+ * "ios": {
99
+ * "osVer": "12.0",
100
+ * "uniVer": "√",
101
+ * "unixVer": "4.11"
102
+ * },
103
+ * "harmony": {
104
+ * "osVer": "3.0",
105
+ * "uniVer": "4.24",
106
+ * "unixVer": "x"
107
+ * }
108
+ * },
109
+ * "mp": {
110
+ * "weixin": {
111
+ * "hostVer": "√",
112
+ * "uniVer": "√",
113
+ * "unixVer": "4.41"
114
+ * },
115
+ * "alipay": {
116
+ * "hostVer": "√",
117
+ * "uniVer": "√",
118
+ * "unixVer": "x"
119
+ * },
120
+ * "baidu": {
121
+ * "hostVer": "√",
122
+ * "uniVer": "√",
123
+ * "unixVer": "x"
124
+ * },
125
+ * "toutiao": {
126
+ * "hostVer": "√",
127
+ * "uniVer": "√",
128
+ * "unixVer": "x"
129
+ * },
130
+ * "lark": {
131
+ * "hostVer": "√",
132
+ * "uniVer": "√",
133
+ * "unixVer": "x"
134
+ * },
135
+ * "qq": {
136
+ * "hostVer": "√",
137
+ * "uniVer": "√",
138
+ * "unixVer": "x"
139
+ * },
140
+ * "kuaishou": {
141
+ * "hostVer": "√",
142
+ * "uniVer": "√",
143
+ * "unixVer": "x"
144
+ * },
145
+ * "jd": {
146
+ * "hostVer": "√",
147
+ * "uniVer": "√",
148
+ * "unixVer": "x"
149
+ * }
150
+ * },
151
+ * "web": {
152
+ * "uniVer": "√",
153
+ * "unixVer": "4.0"
154
+ * }
155
+ * }
156
+ */
157
+ onNetworkStatusChange: OnNetworkStatusChange;
158
+ /**
159
+ * 取消监听网络状态变化
160
+ *
161
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/system/network.html#offnetworkstatuschange
162
+ * @tutorial https://uniapp.dcloud.net.cn/api/system/network.html#offnetworkstatuschange
163
+ * @uniPlatform {
164
+ * "app": {
165
+ * "android": {
166
+ * "osVer": "5.0",
167
+ * "uniVer": "√",
168
+ * "unixVer": "3.9+"
169
+ * },
170
+ * "ios": {
171
+ * "osVer": "12.0",
172
+ * "uniVer": "√",
173
+ * "unixVer": "4.11"
174
+ * },
175
+ * "harmony": {
176
+ * "osVer": "3.0",
177
+ * "uniVer": "4.24",
178
+ * "unixVer": "x"
179
+ * }
180
+ * },
181
+ * "mp": {
182
+ * "weixin": {
183
+ * "hostVer": "√",
184
+ * "uniVer": "√",
185
+ * "unixVer": "4.41"
186
+ * },
187
+ * "alipay": {
188
+ * "hostVer": "√",
189
+ * "uniVer": "√",
190
+ * "unixVer": "x"
191
+ * },
192
+ * "baidu": {
193
+ * "hostVer": "√",
194
+ * "uniVer": "√",
195
+ * "unixVer": "x"
196
+ * },
197
+ * "toutiao": {
198
+ * "hostVer": "√",
199
+ * "uniVer": "√",
200
+ * "unixVer": "x"
201
+ * },
202
+ * "lark": {
203
+ * "hostVer": "√",
204
+ * "uniVer": "√",
205
+ * "unixVer": "x"
206
+ * },
207
+ * "qq": {
208
+ * "hostVer": "√",
209
+ * "uniVer": "√",
210
+ * "unixVer": "x"
211
+ * },
212
+ * "kuaishou": {
213
+ * "hostVer": "√",
214
+ * "uniVer": "√",
215
+ * "unixVer": "x"
216
+ * },
217
+ * "jd": {
218
+ * "hostVer": "√",
219
+ * "uniVer": "√",
220
+ * "unixVer": "x"
221
+ * }
222
+ * },
223
+ * "web": {
224
+ * "uniVer": "√",
225
+ * "unixVer": "4.0"
226
+ * }
227
+ * }
228
+ */
229
+ offNetworkStatusChange: OffNetworkStatusChange;
230
+ }
231
+
232
+ export type GetNetworkType = (options: GetNetworkTypeOptions) => void;
233
+ export type GetNetworkTypeSuccess = {
234
+ /**
235
+ * 网络类型
236
+ */
237
+ networkType: string
238
+ };
239
+ export type GetNetworkTypeSuccessCallback = (result: GetNetworkTypeSuccess) => void;
240
+ export type GetNetworkTypeFail = UniError;
241
+ export type GetNetworkTypeFailCallback = (result: GetNetworkTypeFail) => void;
242
+ export type GetNetworkTypeComplete = any;
243
+ export type GetNetworkTypeCompleteCallback = (result: GetNetworkTypeComplete) => void;
244
+ export type GetNetworkTypeOptions = {
245
+ /**
246
+ * 接口调用成功的回调函数
247
+ * @defaultValue null
248
+ */
249
+ success?: GetNetworkTypeSuccessCallback | null,
250
+ /**
251
+ * 接口调用失败的回调函数
252
+ * @defaultValue null
253
+ */
254
+ fail?: GetNetworkTypeFailCallback | null,
255
+ /**
256
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
257
+ * @defaultValue null
258
+ */
259
+ complete?: GetNetworkTypeCompleteCallback | null
260
+ };
261
+ export type OnNetworkStatusChangeCallbackResult = {
262
+ /**
263
+ * 当前是否有网络连接
264
+ * @type boolean
265
+ */
266
+ isConnected: boolean,
267
+ /**
268
+ * 网络类型
269
+ */
270
+ networkType: string
271
+ };
272
+ export type OnNetworkStatusChangeCallback = (result: OnNetworkStatusChangeCallbackResult) => void;
273
+ export type OnNetworkStatusChange = (callback: OnNetworkStatusChangeCallback) => void;
274
+ export type OffNetworkStatusChange = (callback: (result: any) => void) => void;
@@ -148,10 +148,45 @@ export interface Uni {
148
148
  * },
149
149
  * "mp": {
150
150
  * "weixin": {
151
- * "hostVer": "√",
152
- * "uniVer": "√",
153
- * "unixVer": "x"
151
+ * "hostVer": "√",
152
+ * "uniVer": "√",
153
+ * "unixVer": "4.41"
154
+ * },
155
+ * "alipay": {
156
+ * "hostVer": "√",
157
+ * "uniVer": "√",
158
+ * "unixVer": "x"
159
+ * },
160
+ * "baidu": {
161
+ * "hostVer": "√",
162
+ * "uniVer": "√",
163
+ * "unixVer": "x"
164
+ * },
165
+ * "toutiao": {
166
+ * "hostVer": "√",
167
+ * "uniVer": "√",
168
+ * "unixVer": "x"
154
169
  * },
170
+ * "lark": {
171
+ * "hostVer": "√",
172
+ * "uniVer": "√",
173
+ * "unixVer": "x"
174
+ * },
175
+ * "qq": {
176
+ * "hostVer": "√",
177
+ * "uniVer": "√",
178
+ * "unixVer": "x"
179
+ * },
180
+ * "kuaishou": {
181
+ * "hostVer": "√",
182
+ * "uniVer": "√",
183
+ * "unixVer": "x"
184
+ * },
185
+ * "jd": {
186
+ * "hostVer": "√",
187
+ * "uniVer": "√",
188
+ * "unixVer": "x"
189
+ * }
155
190
  * },
156
191
  * "web": {
157
192
  * "uniVer": "x",