@tarojs/taro 3.4.1 → 3.4.2
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.
- package/package.json +5 -5
- package/types/api/ai/face.d.ts +133 -0
- package/types/api/ai/visionkit.d.ts +303 -0
- package/types/api/base/crypto.d.ts +90 -0
- package/types/api/base/debug.d.ts +152 -13
- package/types/api/base/env.d.ts +2 -1
- package/types/api/base/index.d.ts +10 -2
- package/types/api/base/performance.d.ts +195 -0
- package/types/api/base/system.d.ts +539 -101
- package/types/api/base/update.d.ts +59 -7
- package/types/api/base/weapp/app-event.d.ts +46 -23
- package/types/api/base/weapp/life-cycle.d.ts +141 -1
- package/types/api/canvas/index.d.ts +150 -136
- package/types/api/cloud/index.d.ts +2 -2
- package/types/api/device/accelerometer.d.ts +3 -3
- package/types/api/device/accessibility.d.ts +26 -0
- package/types/api/device/battery.d.ts +2 -2
- package/types/api/device/{ble.d.ts → bluetooth-ble.d.ts} +228 -62
- package/types/api/device/bluetooth-peripheral.d.ts +430 -0
- package/types/api/device/bluetooth.d.ts +67 -2
- package/types/api/device/calendar.d.ts +88 -0
- package/types/api/device/contact.d.ts +74 -50
- package/types/api/device/gyroscope.d.ts +5 -5
- package/types/api/device/iBeacon.d.ts +33 -19
- package/types/api/{ui → device}/keyboard.d.ts +0 -0
- package/types/api/device/{performance.d.ts → memory.d.ts} +4 -4
- package/types/api/device/motion.d.ts +3 -3
- package/types/api/device/network.d.ts +53 -12
- package/types/api/device/nfc.d.ts +1089 -13
- package/types/api/device/scan.d.ts +1 -1
- package/types/api/device/screen.d.ts +40 -12
- package/types/api/device/wifi.d.ts +41 -6
- package/types/api/files/index.d.ts +371 -184
- package/types/api/location/index.d.ts +116 -55
- package/types/api/media/audio.d.ts +629 -38
- package/types/api/media/background-audio.d.ts +8 -8
- package/types/api/media/camera.d.ts +38 -19
- package/types/api/media/editor.d.ts +22 -2
- package/types/api/media/image.d.ts +61 -32
- package/types/api/media/live.d.ts +66 -6
- package/types/api/media/map.d.ts +469 -49
- package/types/api/media/media-recorder.d.ts +92 -0
- package/types/api/media/recorder.d.ts +20 -20
- package/types/api/media/video-decoder.d.ts +117 -0
- package/types/api/media/video-processing.d.ts +11 -7
- package/types/api/media/video.d.ts +45 -16
- package/types/api/media/voip.d.ts +290 -0
- package/types/api/{open-api/navigate.d.ts → navigate/index.d.ts} +63 -25
- package/types/api/network/download.d.ts +39 -16
- package/types/api/network/request.d.ts +125 -37
- package/types/api/network/tcp.d.ts +181 -0
- package/types/api/network/udp.d.ts +154 -83
- package/types/api/network/upload.d.ts +41 -25
- package/types/api/network/websocket.d.ts +16 -15
- package/types/api/open-api/authorize.d.ts +41 -2
- package/types/api/open-api/channels.d.ts +178 -0
- package/types/api/open-api/facial.d.ts +3 -0
- package/types/api/open-api/favorites.d.ts +100 -0
- package/types/api/open-api/group.d.ts +59 -0
- package/types/api/open-api/invoice.d.ts +2 -2
- package/types/api/open-api/license-plate.d.ts +27 -0
- package/types/api/open-api/login.d.ts +21 -0
- package/types/api/open-api/redpackage.d.ts +24 -0
- package/types/api/open-api/settings.d.ts +76 -14
- package/types/api/open-api/soter.d.ts +2 -2
- package/types/api/open-api/subscribe-message.d.ts +88 -3
- package/types/api/open-api/user-info.d.ts +55 -18
- package/types/api/open-api/werun.d.ts +33 -6
- package/types/api/payment/index.d.ts +119 -0
- package/types/api/route/index.d.ts +13 -9
- package/types/api/share/index.d.ts +192 -9
- package/types/api/storage/index.d.ts +29 -83
- package/types/api/swan/index.d.ts +1 -1
- package/types/api/ui/animation.d.ts +84 -70
- package/types/api/ui/background.d.ts +4 -2
- package/types/api/ui/custom-component.d.ts +1 -1
- package/types/api/ui/fonts.d.ts +27 -31
- package/types/api/ui/navigation-bar.d.ts +1 -0
- package/types/api/ui/scroll.d.ts +73 -7
- package/types/api/ui/sticky.d.ts +4 -4
- package/types/api/ui/tab-bar.d.ts +7 -7
- package/types/api/ui/window.d.ts +22 -2
- package/types/api/worker/index.d.ts +9 -1
- package/types/api/wxml/index.d.ts +111 -107
- package/types/compile.d.ts +5 -0
- package/types/global.d.ts +142 -111
- package/types/taro.api.d.ts +79 -62
- package/types/api/open-api/payment.d.ts +0 -61
|
@@ -18,10 +18,12 @@ declare module '../../index' {
|
|
|
18
18
|
*/
|
|
19
19
|
interface IntersectionObserver {
|
|
20
20
|
/** 停止监听。回调函数将不再触发
|
|
21
|
+
* @supported weapp
|
|
21
22
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/IntersectionObserver.disconnect.html
|
|
22
23
|
*/
|
|
23
24
|
disconnect(): void
|
|
24
25
|
/** 指定目标节点并开始监听相交状态变化情况
|
|
26
|
+
* @supported weapp
|
|
25
27
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/IntersectionObserver.observe.html
|
|
26
28
|
*/
|
|
27
29
|
observe(
|
|
@@ -31,6 +33,7 @@ declare module '../../index' {
|
|
|
31
33
|
callback: IntersectionObserver.ObserveCallback,
|
|
32
34
|
): void
|
|
33
35
|
/** 使用选择器指定一个节点,作为参照区域之一。
|
|
36
|
+
* @supported weapp
|
|
34
37
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/IntersectionObserver.relativeTo.html
|
|
35
38
|
*/
|
|
36
39
|
relativeTo(
|
|
@@ -40,6 +43,7 @@ declare module '../../index' {
|
|
|
40
43
|
margins?: IntersectionObserver.RelativeToMargins,
|
|
41
44
|
): IntersectionObserver
|
|
42
45
|
/** 指定页面显示区域作为参照区域之一
|
|
46
|
+
* @supported weapp
|
|
43
47
|
* @example
|
|
44
48
|
* 下面的示例代码中,如果目标节点(用选择器 .target-class 指定)进入显示区域以下 100px 时,就会触发回调函数。
|
|
45
49
|
*
|
|
@@ -175,109 +179,6 @@ declare module '../../index' {
|
|
|
175
179
|
}) => void
|
|
176
180
|
}
|
|
177
181
|
|
|
178
|
-
/** 查询节点信息的对象
|
|
179
|
-
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.html
|
|
180
|
-
*/
|
|
181
|
-
interface SelectorQuery {
|
|
182
|
-
/** 执行所有的请求。请求结果按请求次序构成数组,在callback的第一个参数中返回。
|
|
183
|
-
* @supported weapp, h5
|
|
184
|
-
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.exec.html
|
|
185
|
-
*/
|
|
186
|
-
exec(
|
|
187
|
-
/** 回调函数 */
|
|
188
|
-
callback?: (...args: any[]) => any,
|
|
189
|
-
): NodesRef
|
|
190
|
-
/** 在当前页面下选择第一个匹配选择器 `selector` 的节点。返回一个 `NodesRef` 对象实例,可以用于获取节点信息。
|
|
191
|
-
*
|
|
192
|
-
* **selector 语法**
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
* selector类似于 CSS 的选择器,但仅支持下列语法。
|
|
196
|
-
*
|
|
197
|
-
* - ID选择器:#the-id
|
|
198
|
-
* - class选择器(可以连续指定多个):.a-class.another-class
|
|
199
|
-
* - 子元素选择器:.the-parent > .the-child
|
|
200
|
-
* - 后代选择器:.the-ancestor .the-descendant
|
|
201
|
-
* - 跨自定义组件的后代选择器:.the-ancestor >>> .the-descendant
|
|
202
|
-
* - 多选择器的并集:#a-node, .some-other-nodes
|
|
203
|
-
* @supported weapp, h5
|
|
204
|
-
* @example
|
|
205
|
-
* ```tsx
|
|
206
|
-
* Taro.createSelectorQuery().select('#the-id').fields({
|
|
207
|
-
* dataset: true,
|
|
208
|
-
* size: true,
|
|
209
|
-
* scrollOffset: true,
|
|
210
|
-
* properties: ['scrollX', 'scrollY']
|
|
211
|
-
* }, function (res){
|
|
212
|
-
* res.dataset // 节点的dataset
|
|
213
|
-
* res.width // 节点的宽度
|
|
214
|
-
* res.height // 节点的高度
|
|
215
|
-
* res.scrollLeft // 节点的水平滚动位置
|
|
216
|
-
* res.scrollTop // 节点的竖直滚动位置
|
|
217
|
-
* res.scrollX // 节点 scroll-x 属性的当前值
|
|
218
|
-
* res.scrollY // 节点 scroll-x 属性的当前值
|
|
219
|
-
* }).exec()
|
|
220
|
-
* ```
|
|
221
|
-
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.select.html
|
|
222
|
-
*/
|
|
223
|
-
select(
|
|
224
|
-
/** 选择器 */
|
|
225
|
-
selector: string,
|
|
226
|
-
): NodesRef
|
|
227
|
-
/** 在当前页面下选择匹配选择器 selector 的所有节点。
|
|
228
|
-
*
|
|
229
|
-
* **selector 语法**
|
|
230
|
-
*
|
|
231
|
-
* selector类似于 CSS 的选择器,但仅支持下列语法。
|
|
232
|
-
*
|
|
233
|
-
* - ID选择器:#the-id
|
|
234
|
-
* - class选择器(可以连续指定多个):.a-class.another-class
|
|
235
|
-
* - 子元素选择器:.the-parent > .the-child
|
|
236
|
-
* - 后代选择器:.the-ancestor .the-descendant
|
|
237
|
-
* - 跨自定义组件的后代选择器:.the-ancestor >>> .the-descendant
|
|
238
|
-
* - 多选择器的并集:#a-node, .some-other-nodes
|
|
239
|
-
* @supported weapp, h5
|
|
240
|
-
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.selectAll.html
|
|
241
|
-
*/
|
|
242
|
-
selectAll(
|
|
243
|
-
/** 选择器 */
|
|
244
|
-
selector: string,
|
|
245
|
-
): NodesRef
|
|
246
|
-
/** 选择显示区域。可用于获取显示区域的尺寸、滚动位置等信息。
|
|
247
|
-
* @supported weapp, h5
|
|
248
|
-
* @example
|
|
249
|
-
* ```tsx
|
|
250
|
-
* Taro.createSelectorQuery().selectViewport().scrollOffset(function (res) {
|
|
251
|
-
* res.id // 节点的ID
|
|
252
|
-
* res.dataset // 节点的dataset
|
|
253
|
-
* res.scrollLeft // 节点的水平滚动位置
|
|
254
|
-
* res.scrollTop // 节点的竖直滚动位置
|
|
255
|
-
* }).exec()
|
|
256
|
-
* ```
|
|
257
|
-
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.selectViewport.html
|
|
258
|
-
*/
|
|
259
|
-
selectViewport(): NodesRef
|
|
260
|
-
/** 将选择器的选取范围更改为自定义组件 `component` 内。(初始时,选择器仅选取页面范围的节点,不会选取任何自定义组件中的节点)。
|
|
261
|
-
* @supported weapp, h5
|
|
262
|
-
* @example
|
|
263
|
-
* ```tsx
|
|
264
|
-
* Component({
|
|
265
|
-
* queryMultipleNodes () {
|
|
266
|
-
* const query = Taro.createSelectorQuery().in(this)
|
|
267
|
-
* query.select('#the-id').boundingClientRect(function(res){
|
|
268
|
-
* res.top // 这个组件内 #the-id 节点的上边界坐标
|
|
269
|
-
* }).exec()
|
|
270
|
-
* }
|
|
271
|
-
* })
|
|
272
|
-
* ```
|
|
273
|
-
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.in.html
|
|
274
|
-
*/
|
|
275
|
-
in(
|
|
276
|
-
/** 自定义组件实例 */
|
|
277
|
-
component: TaroGeneral.IAnyObject,
|
|
278
|
-
): SelectorQuery
|
|
279
|
-
}
|
|
280
|
-
|
|
281
182
|
/** 用于获取 `WXML` 节点信息的对象
|
|
282
183
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/NodesRef.html
|
|
283
184
|
*/
|
|
@@ -318,8 +219,8 @@ declare module '../../index' {
|
|
|
318
219
|
/** 回调函数,在执行 `SelectorQuery.exec` 方法后,节点信息会在 `callback` 中返回。 */
|
|
319
220
|
callback?: NodesRef.BoundingClientRectCallback,
|
|
320
221
|
): SelectorQuery
|
|
321
|
-
/** 添加节点的 Context 对象查询请求。目前支持 [VideoContext](
|
|
322
|
-
* @supported weapp
|
|
222
|
+
/** 添加节点的 Context 对象查询请求。目前支持 [VideoContext](/docs/apis/media/video/VideoContext)、[CanvasContext](/docs/apis/canvas/CanvasContext)、[LivePlayerContext](/docs/apis/media/live/LivePlayerContext)、[EditorContext](/docs/apis/media/editor/EditorContext)和 [MapContext](/docs/apis/media/map/MapContext) 的获取。
|
|
223
|
+
* @supported weapp, h5
|
|
323
224
|
* @example
|
|
324
225
|
* ```tsx
|
|
325
226
|
* Taro.createSelectorQuery().select('.the-video-class').context(function (res) {
|
|
@@ -367,8 +268,8 @@ declare module '../../index' {
|
|
|
367
268
|
/** 回调函数 */
|
|
368
269
|
callback?: NodesRef.FieldsCallback,
|
|
369
270
|
): SelectorQuery
|
|
370
|
-
/** 获取 Node 节点实例。目前支持 [Canvas](
|
|
371
|
-
* @supported weapp
|
|
271
|
+
/** 获取 Node 节点实例。目前支持 [Canvas](/docs/components/canvas/canvas) 的获取。
|
|
272
|
+
* @supported weapp, h5
|
|
372
273
|
* @example
|
|
373
274
|
* ```tsx
|
|
374
275
|
* Taro.createSelectorQuery().select('.canvas').node(function(res){
|
|
@@ -478,6 +379,109 @@ declare module '../../index' {
|
|
|
478
379
|
}
|
|
479
380
|
}
|
|
480
381
|
|
|
382
|
+
/** 查询节点信息的对象
|
|
383
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.html
|
|
384
|
+
*/
|
|
385
|
+
interface SelectorQuery {
|
|
386
|
+
/** 执行所有的请求。请求结果按请求次序构成数组,在callback的第一个参数中返回。
|
|
387
|
+
* @supported weapp, h5
|
|
388
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.exec.html
|
|
389
|
+
*/
|
|
390
|
+
exec(
|
|
391
|
+
/** 回调函数 */
|
|
392
|
+
callback?: (...args: any[]) => any,
|
|
393
|
+
): NodesRef
|
|
394
|
+
/** 将选择器的选取范围更改为自定义组件 `component` 内。(初始时,选择器仅选取页面范围的节点,不会选取任何自定义组件中的节点)。
|
|
395
|
+
* @supported weapp, h5
|
|
396
|
+
* @example
|
|
397
|
+
* ```tsx
|
|
398
|
+
* Component({
|
|
399
|
+
* queryMultipleNodes () {
|
|
400
|
+
* const query = Taro.createSelectorQuery().in(this)
|
|
401
|
+
* query.select('#the-id').boundingClientRect(function(res){
|
|
402
|
+
* res.top // 这个组件内 #the-id 节点的上边界坐标
|
|
403
|
+
* }).exec()
|
|
404
|
+
* }
|
|
405
|
+
* })
|
|
406
|
+
* ```
|
|
407
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.in.html
|
|
408
|
+
*/
|
|
409
|
+
in(
|
|
410
|
+
/** 自定义组件实例 */
|
|
411
|
+
component: TaroGeneral.IAnyObject,
|
|
412
|
+
): SelectorQuery
|
|
413
|
+
/** 在当前页面下选择第一个匹配选择器 `selector` 的节点。返回一个 `NodesRef` 对象实例,可以用于获取节点信息。
|
|
414
|
+
*
|
|
415
|
+
* **selector 语法**
|
|
416
|
+
*
|
|
417
|
+
*
|
|
418
|
+
* selector类似于 CSS 的选择器,但仅支持下列语法。
|
|
419
|
+
*
|
|
420
|
+
* - ID选择器:#the-id
|
|
421
|
+
* - class选择器(可以连续指定多个):.a-class.another-class
|
|
422
|
+
* - 子元素选择器:.the-parent > .the-child
|
|
423
|
+
* - 后代选择器:.the-ancestor .the-descendant
|
|
424
|
+
* - 跨自定义组件的后代选择器:.the-ancestor >>> .the-descendant
|
|
425
|
+
* - 多选择器的并集:#a-node, .some-other-nodes
|
|
426
|
+
* @supported weapp, h5
|
|
427
|
+
* @example
|
|
428
|
+
* ```tsx
|
|
429
|
+
* Taro.createSelectorQuery().select('#the-id').fields({
|
|
430
|
+
* dataset: true,
|
|
431
|
+
* size: true,
|
|
432
|
+
* scrollOffset: true,
|
|
433
|
+
* properties: ['scrollX', 'scrollY']
|
|
434
|
+
* }, function (res){
|
|
435
|
+
* res.dataset // 节点的dataset
|
|
436
|
+
* res.width // 节点的宽度
|
|
437
|
+
* res.height // 节点的高度
|
|
438
|
+
* res.scrollLeft // 节点的水平滚动位置
|
|
439
|
+
* res.scrollTop // 节点的竖直滚动位置
|
|
440
|
+
* res.scrollX // 节点 scroll-x 属性的当前值
|
|
441
|
+
* res.scrollY // 节点 scroll-x 属性的当前值
|
|
442
|
+
* }).exec()
|
|
443
|
+
* ```
|
|
444
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.select.html
|
|
445
|
+
*/
|
|
446
|
+
select(
|
|
447
|
+
/** 选择器 */
|
|
448
|
+
selector: string,
|
|
449
|
+
): NodesRef
|
|
450
|
+
/** 在当前页面下选择匹配选择器 selector 的所有节点。
|
|
451
|
+
*
|
|
452
|
+
* **selector 语法**
|
|
453
|
+
*
|
|
454
|
+
* selector类似于 CSS 的选择器,但仅支持下列语法。
|
|
455
|
+
*
|
|
456
|
+
* - ID选择器:#the-id
|
|
457
|
+
* - class选择器(可以连续指定多个):.a-class.another-class
|
|
458
|
+
* - 子元素选择器:.the-parent > .the-child
|
|
459
|
+
* - 后代选择器:.the-ancestor .the-descendant
|
|
460
|
+
* - 跨自定义组件的后代选择器:.the-ancestor >>> .the-descendant
|
|
461
|
+
* - 多选择器的并集:#a-node, .some-other-nodes
|
|
462
|
+
* @supported weapp, h5
|
|
463
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.selectAll.html
|
|
464
|
+
*/
|
|
465
|
+
selectAll(
|
|
466
|
+
/** 选择器 */
|
|
467
|
+
selector: string,
|
|
468
|
+
): NodesRef
|
|
469
|
+
/** 选择显示区域。可用于获取显示区域的尺寸、滚动位置等信息。
|
|
470
|
+
* @supported weapp, h5
|
|
471
|
+
* @example
|
|
472
|
+
* ```tsx
|
|
473
|
+
* Taro.createSelectorQuery().selectViewport().scrollOffset(function (res) {
|
|
474
|
+
* res.id // 节点的ID
|
|
475
|
+
* res.dataset // 节点的dataset
|
|
476
|
+
* res.scrollLeft // 节点的水平滚动位置
|
|
477
|
+
* res.scrollTop // 节点的竖直滚动位置
|
|
478
|
+
* }).exec()
|
|
479
|
+
* ```
|
|
480
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.selectViewport.html
|
|
481
|
+
*/
|
|
482
|
+
selectViewport(): NodesRef
|
|
483
|
+
}
|
|
484
|
+
|
|
481
485
|
interface TaroStatic {
|
|
482
486
|
/** 返回一个 SelectorQuery 对象实例。在自定义组件或包含自定义组件的页面中,应使用 `this.createSelectorQuery()` 来代替。
|
|
483
487
|
* @supported weapp, h5
|
package/types/compile.d.ts
CHANGED
|
@@ -110,6 +110,11 @@ export interface ICompileOption {
|
|
|
110
110
|
interface Runtime {
|
|
111
111
|
enableInnerHTML: boolean
|
|
112
112
|
enableSizeAPIs: boolean
|
|
113
|
+
enableAdjacentHTML: boolean
|
|
114
|
+
enableTemplateContent: boolean
|
|
115
|
+
enableCloneNode: boolean
|
|
116
|
+
enableContains: boolean
|
|
117
|
+
enableMutationObserver: boolean
|
|
113
118
|
}
|
|
114
119
|
|
|
115
120
|
export interface IMiniAppConfig {
|
package/types/global.d.ts
CHANGED
|
@@ -99,55 +99,55 @@ declare namespace TaroGeneral {
|
|
|
99
99
|
*/
|
|
100
100
|
interface AdErrCode {
|
|
101
101
|
/**
|
|
102
|
-
* @
|
|
102
|
+
* @illustrate 后端接口调用失败
|
|
103
103
|
* @reason 该项错误不是开发者的异常情况
|
|
104
104
|
* @solution 一般情况下忽略一段时间即可恢复。
|
|
105
105
|
*/
|
|
106
106
|
1000
|
|
107
107
|
/**
|
|
108
|
-
* @
|
|
108
|
+
* @illustrate 参数错误
|
|
109
109
|
* @reason 使用方法错误
|
|
110
110
|
* @solution 可以前往 developers.weixin.qq.com 确认具体教程(小程序和小游戏分别有各自的教程,可以在顶部选项中,“设计”一栏的右侧进行切换。
|
|
111
111
|
*/
|
|
112
112
|
1001
|
|
113
113
|
/**
|
|
114
|
-
* @
|
|
114
|
+
* @illustrate 广告单元无效
|
|
115
115
|
* @reason 可能是拼写错误、或者误用了其他APP的广告ID
|
|
116
116
|
* @solution 请重新前往 mp.weixin.qq.com 确认广告位ID。
|
|
117
117
|
*/
|
|
118
118
|
1002
|
|
119
119
|
/**
|
|
120
|
-
* @
|
|
120
|
+
* @illustrate 内部错误
|
|
121
121
|
* @reason 该项错误不是开发者的异常情况
|
|
122
122
|
* @solution 一般情况下忽略一段时间即可恢复。
|
|
123
123
|
*/
|
|
124
124
|
1003
|
|
125
125
|
/**
|
|
126
|
-
* @
|
|
126
|
+
* @illustrate 无合适的广告
|
|
127
127
|
* @reason 广告不是每一次都会出现,这次没有出现可能是由于该用户不适合浏览广告
|
|
128
128
|
* @solution 属于正常情况,且开发者需要针对这种情况做形态上的兼容。
|
|
129
129
|
*/
|
|
130
130
|
1004
|
|
131
131
|
/**
|
|
132
|
-
* @
|
|
132
|
+
* @illustrate 广告组件审核中
|
|
133
133
|
* @reason 你的广告正在被审核,无法展现广告
|
|
134
134
|
* @solution 请前往 mp.weixin.qq.com 确认审核状态,且开发者需要针对这种情况做形态上的兼容。
|
|
135
135
|
*/
|
|
136
136
|
1005
|
|
137
137
|
/**
|
|
138
|
-
* @
|
|
138
|
+
* @illustrate 广告组件被驳回
|
|
139
139
|
* @reason 你的广告审核失败,无法展现广告
|
|
140
140
|
* @solution 请前往 mp.weixin.qq.com 确认审核状态,且开发者需要针对这种情况做形态上的兼容。
|
|
141
141
|
*/
|
|
142
142
|
1006
|
|
143
143
|
/**
|
|
144
|
-
* @
|
|
144
|
+
* @illustrate 广告组件被封禁
|
|
145
145
|
* @reason 你的广告能力已经被封禁,封禁期间无法展现广告
|
|
146
146
|
* @solution 请前往 mp.weixin.qq.com 确认小程序广告封禁状态。
|
|
147
147
|
*/
|
|
148
148
|
1007
|
|
149
149
|
/**
|
|
150
|
-
* @
|
|
150
|
+
* @illustrate 广告单元已关闭
|
|
151
151
|
* @reason 该广告位的广告能力已经被关闭
|
|
152
152
|
* @solution 请前往 mp.weixin.qq.com 重新打开对应广告位的展现。
|
|
153
153
|
*/
|
|
@@ -156,196 +156,227 @@ declare namespace TaroGeneral {
|
|
|
156
156
|
}
|
|
157
157
|
/** 蓝牙错误码 */
|
|
158
158
|
interface BluetoothErrCode {
|
|
159
|
-
/**
|
|
160
|
-
* @
|
|
159
|
+
/** ok
|
|
160
|
+
* @illustrate 正常
|
|
161
161
|
*/
|
|
162
162
|
0
|
|
163
|
-
/**
|
|
164
|
-
* @
|
|
163
|
+
/** not init
|
|
164
|
+
* @illustrate 未初始化蓝牙适配器
|
|
165
165
|
*/
|
|
166
166
|
10000
|
|
167
|
-
/**
|
|
168
|
-
* @
|
|
167
|
+
/** not available
|
|
168
|
+
* @illustrate 当前蓝牙适配器不可用
|
|
169
169
|
*/
|
|
170
170
|
10001
|
|
171
|
-
/**
|
|
172
|
-
* @
|
|
171
|
+
/** no device
|
|
172
|
+
* @illustrate 没有找到指定设备
|
|
173
173
|
*/
|
|
174
174
|
10002
|
|
175
|
-
/**
|
|
176
|
-
* @
|
|
175
|
+
/** connection fail
|
|
176
|
+
* @illustrate 连接失败
|
|
177
177
|
*/
|
|
178
178
|
10003
|
|
179
|
-
/**
|
|
180
|
-
* @
|
|
179
|
+
/** no service
|
|
180
|
+
* @illustrate 没有找到指定服务
|
|
181
181
|
*/
|
|
182
182
|
10004
|
|
183
|
-
/**
|
|
184
|
-
* @
|
|
183
|
+
/** no characteristic
|
|
184
|
+
* @illustrate 没有找到指定特征值
|
|
185
185
|
*/
|
|
186
186
|
10005
|
|
187
|
-
/**
|
|
188
|
-
* @
|
|
187
|
+
/** no connection
|
|
188
|
+
* @illustrate 当前连接已断开
|
|
189
189
|
*/
|
|
190
190
|
10006
|
|
191
|
-
/**
|
|
192
|
-
* @
|
|
191
|
+
/** property not support
|
|
192
|
+
* @illustrate 当前特征值不支持此操作
|
|
193
193
|
*/
|
|
194
194
|
10007
|
|
195
|
-
/**
|
|
196
|
-
* @
|
|
195
|
+
/** system error
|
|
196
|
+
* @illustrate 其余所有系统上报的异常
|
|
197
197
|
*/
|
|
198
198
|
10008
|
|
199
|
-
/**
|
|
200
|
-
* @
|
|
199
|
+
/** system not support
|
|
200
|
+
* @illustrate Android 系统特有,系统版本低于 4.3 不支持 BLE
|
|
201
201
|
*/
|
|
202
202
|
10009
|
|
203
|
-
/**
|
|
204
|
-
* @
|
|
203
|
+
/** operate time out
|
|
204
|
+
* @illustrate 连接超时
|
|
205
205
|
*/
|
|
206
206
|
10012
|
|
207
|
-
/**
|
|
208
|
-
* @
|
|
207
|
+
/** invalid_data
|
|
208
|
+
* @illustrate 连接 deviceId 为空或者是格式不正确
|
|
209
209
|
*/
|
|
210
210
|
10013
|
|
211
211
|
}
|
|
212
212
|
/** iBeacon 错误码 */
|
|
213
213
|
interface IBeaconErrCode {
|
|
214
|
-
/**
|
|
215
|
-
* @
|
|
214
|
+
/** ok
|
|
215
|
+
* @illustrate 正常
|
|
216
216
|
*/
|
|
217
217
|
0
|
|
218
|
-
/**
|
|
219
|
-
* @
|
|
218
|
+
/** unsupport
|
|
219
|
+
* @illustrate 系统或设备不支持
|
|
220
220
|
*/
|
|
221
221
|
11000
|
|
222
|
-
/**
|
|
223
|
-
* @
|
|
222
|
+
/** bluetooth service unavailable
|
|
223
|
+
* @illustrate 蓝牙服务不可用
|
|
224
224
|
*/
|
|
225
225
|
11001
|
|
226
|
-
/**
|
|
227
|
-
* @
|
|
226
|
+
/** location service unavailable
|
|
227
|
+
* @illustrate 位置服务不可用
|
|
228
228
|
*/
|
|
229
229
|
11002
|
|
230
|
-
/**
|
|
231
|
-
* @
|
|
230
|
+
/** already start
|
|
231
|
+
* @illustrate 已经开始搜索
|
|
232
232
|
*/
|
|
233
233
|
11003
|
|
234
|
-
/**
|
|
235
|
-
* @
|
|
234
|
+
/** not startBeaconDiscovery
|
|
235
|
+
* @illustrate 还未开始搜索
|
|
236
236
|
*/
|
|
237
237
|
11004
|
|
238
|
-
/**
|
|
239
|
-
* @
|
|
238
|
+
/** system error
|
|
239
|
+
* @illustrate 系统错误
|
|
240
240
|
*/
|
|
241
241
|
11005
|
|
242
|
-
/**
|
|
243
|
-
* @
|
|
242
|
+
/** invalid data
|
|
243
|
+
* @illustrate 参数不正确
|
|
244
244
|
*/
|
|
245
245
|
11006
|
|
246
246
|
}
|
|
247
247
|
/** WIFI 错误码 */
|
|
248
248
|
interface WifiErrCode {
|
|
249
|
-
/**
|
|
250
|
-
* @
|
|
249
|
+
/** ok
|
|
250
|
+
* @illustrate 正常
|
|
251
251
|
*/
|
|
252
252
|
0
|
|
253
|
-
/**
|
|
254
|
-
* @
|
|
253
|
+
/** not init
|
|
254
|
+
* @illustrate 未先调用 `startWifi` 接口
|
|
255
255
|
*/
|
|
256
256
|
12000
|
|
257
|
-
/**
|
|
258
|
-
* @
|
|
257
|
+
/** system not support
|
|
258
|
+
* @illustrate 当前系统不支持相关能力
|
|
259
259
|
*/
|
|
260
260
|
12001
|
|
261
|
-
/**
|
|
262
|
-
* @
|
|
261
|
+
/** password error Wi-Fi
|
|
262
|
+
* @illustrate 密码错误
|
|
263
263
|
*/
|
|
264
264
|
12002
|
|
265
|
-
/**
|
|
266
|
-
* @
|
|
265
|
+
/** connection timeout
|
|
266
|
+
* @illustrate 连接超时
|
|
267
267
|
*/
|
|
268
268
|
12003
|
|
269
|
-
/**
|
|
270
|
-
* @
|
|
269
|
+
/** duplicate request
|
|
270
|
+
* @illustrate 重复连接 Wi-Fi
|
|
271
271
|
*/
|
|
272
272
|
12004
|
|
273
|
-
/**
|
|
274
|
-
* @
|
|
273
|
+
/** wifi not turned on
|
|
274
|
+
* @illustrate Android 特有,未打开 Wi-Fi 开关
|
|
275
275
|
*/
|
|
276
276
|
12005
|
|
277
|
-
/**
|
|
278
|
-
* @
|
|
277
|
+
/** gps not turned on
|
|
278
|
+
* @illustrate Android 特有,未打开 GPS 定位开关
|
|
279
279
|
*/
|
|
280
280
|
12006
|
|
281
|
-
/**
|
|
282
|
-
* @
|
|
281
|
+
/** user denied
|
|
282
|
+
* @illustrate 用户拒绝授权链接 Wi-Fi
|
|
283
283
|
*/
|
|
284
284
|
12007
|
|
285
|
-
/**
|
|
286
|
-
* @
|
|
285
|
+
/** invalid SSID
|
|
286
|
+
* @illustrate 无效 SSID
|
|
287
287
|
*/
|
|
288
288
|
12008
|
|
289
|
-
/**
|
|
290
|
-
* @
|
|
289
|
+
/** system config err
|
|
290
|
+
* @illustrate 系统运营商配置拒绝连接 Wi-Fi
|
|
291
291
|
*/
|
|
292
292
|
12009
|
|
293
|
-
/**
|
|
294
|
-
* @
|
|
293
|
+
/** system internal error
|
|
294
|
+
* @illustrate 系统其他错误,需要在 errmsg 打印具体的错误原因
|
|
295
295
|
*/
|
|
296
296
|
12010
|
|
297
|
-
/**
|
|
298
|
-
* @
|
|
297
|
+
/** weapp in background
|
|
298
|
+
* @illustrate 应用在后台无法配置 Wi-Fi
|
|
299
299
|
*/
|
|
300
300
|
12011
|
|
301
|
-
/**
|
|
302
|
-
* @
|
|
301
|
+
/** wifi config may be expired
|
|
302
|
+
* @illustrate 系统保存的 Wi-Fi 配置过期,建议忘记 Wi-Fi 后重试
|
|
303
303
|
*/
|
|
304
304
|
12013
|
|
305
305
|
}
|
|
306
306
|
/** NFC 错误码 */
|
|
307
307
|
interface NFCErrCode {
|
|
308
|
-
/**
|
|
309
|
-
* @
|
|
308
|
+
/** ok
|
|
309
|
+
* @illustrate 正常
|
|
310
310
|
*/
|
|
311
311
|
0
|
|
312
|
-
/** 当前设备不支持NFC */
|
|
312
|
+
/** @illustrate 当前设备不支持 NFC */
|
|
313
313
|
13000
|
|
314
|
-
/** 当前设备支持NFC,但系统NFC开关未开启 */
|
|
314
|
+
/** @illustrate 当前设备支持 NFC,但系统 NFC 开关未开启 */
|
|
315
315
|
13001
|
|
316
|
-
/** 当前设备支持NFC,但不支持HCE */
|
|
316
|
+
/** @illustrate 当前设备支持 NFC,但不支持 HCE */
|
|
317
317
|
13002
|
|
318
|
-
/** AID列表参数格式错误 */
|
|
318
|
+
/** @illustrate AID 列表参数格式错误 */
|
|
319
319
|
13003
|
|
320
|
-
/** 未设置微信为默认NFC支付应用 */
|
|
320
|
+
/** @illustrate 未设置微信为默认 NFC 支付应用 */
|
|
321
321
|
13004
|
|
322
|
-
/** 返回的指令不合法 */
|
|
322
|
+
/** @illustrate 返回的指令不合法 */
|
|
323
323
|
13005
|
|
324
|
-
/** 注册AID失败 */
|
|
324
|
+
/** @illustrate 注册 AID 失败 */
|
|
325
325
|
13006
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
326
|
+
/** @illustrate 未知错误 */
|
|
327
|
+
13010
|
|
328
|
+
/** user is not authorized
|
|
329
|
+
* @illustrate 用户未授权
|
|
330
|
+
*/
|
|
331
|
+
13019
|
|
332
|
+
/** invalid parameter
|
|
333
|
+
* @illustrate 参数无效
|
|
334
|
+
*/
|
|
335
|
+
13011
|
|
336
|
+
/** parse NdefMessage failed
|
|
337
|
+
* @illustrate 将参数解析为 NdefMessage 失败
|
|
338
|
+
*/
|
|
339
|
+
13012
|
|
340
|
+
/** NFC tag has not been discovered
|
|
341
|
+
* @illustrate 未扫描到NFC标签
|
|
342
|
+
*/
|
|
343
|
+
13013
|
|
344
|
+
/** invalid tech
|
|
345
|
+
* @illustrate 无效的标签技术
|
|
346
|
+
*/
|
|
347
|
+
13014
|
|
348
|
+
/** unavailable tech
|
|
349
|
+
* @illustrate 从标签上获取对应技术失败
|
|
350
|
+
*/
|
|
351
|
+
13015
|
|
352
|
+
/** connect fail
|
|
353
|
+
* @illustrate 连接失败
|
|
354
|
+
*/
|
|
355
|
+
13016
|
|
356
|
+
/** system internal error
|
|
357
|
+
* @illustrate 相关读写操作失败
|
|
358
|
+
*/
|
|
359
|
+
13017
|
|
360
|
+
/** NFC discovery has not started
|
|
361
|
+
* @illustrate 尝试在未开始 NFC 扫描时停止 NFC 扫描
|
|
362
|
+
*/
|
|
363
|
+
13018
|
|
364
|
+
/** NFC discovery already started
|
|
365
|
+
* @illustrate 已经开始 NFC 扫描
|
|
366
|
+
*/
|
|
367
|
+
13021
|
|
368
|
+
/** Tech already connected
|
|
369
|
+
* @illustrate 标签已经连接
|
|
370
|
+
*/
|
|
371
|
+
13022
|
|
372
|
+
/** Tech has not connected
|
|
373
|
+
* @illustrate 尝试在未连接标签时断开连接
|
|
374
|
+
*/
|
|
375
|
+
13023
|
|
376
|
+
/** function not support
|
|
377
|
+
* @illustrate 当前标签技术不支持该功能
|
|
378
|
+
*/
|
|
379
|
+
13024
|
|
349
380
|
}
|
|
350
381
|
|
|
351
382
|
// Events
|