@tarojs/plugin-platform-harmony-ets 3.7.0-alpha.27 → 4.0.0-beta.0
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/dist/apis/apis.ts +6 -2
- package/dist/apis/base/crypto.ts +4 -0
- package/dist/apis/base/debug.ts +5 -0
- package/dist/apis/base/index.ts +9 -1
- package/dist/apis/base/performance.ts +8 -0
- package/dist/apis/base/system.ts +1 -1
- package/dist/apis/base/update.ts +5 -0
- package/dist/apis/base/weapp/app-event.ts +75 -0
- package/dist/apis/base/weapp/life-cycle.ts +21 -0
- package/dist/apis/canvas/index.ts +18 -0
- package/dist/apis/data-analysis/index.ts +6 -0
- package/dist/apis/device/accelerometer.ts +2 -1
- package/dist/apis/device/accessibility.ts +4 -0
- package/dist/apis/device/battery.ts +2 -2
- package/dist/apis/device/bluetooth-ble.ts +19 -0
- package/dist/apis/device/bluetooth-peripheral.ts +6 -0
- package/dist/apis/device/bluetooth.ts +16 -0
- package/dist/apis/device/calendar.ts +5 -0
- package/dist/apis/device/clipboard.ts +1 -1
- package/dist/apis/device/compass.ts +21 -0
- package/dist/apis/device/contact.ts +5 -0
- package/dist/apis/device/crypto.ts +4 -0
- package/dist/apis/device/gyroscope.ts +7 -0
- package/dist/apis/device/iBeacon.ts +10 -0
- package/dist/apis/device/index.ts +15 -0
- package/dist/apis/device/keyboard.ts +2 -1
- package/dist/apis/device/motion.ts +6 -0
- package/dist/apis/device/network.ts +26 -9
- package/dist/apis/device/nfc.ts +10 -0
- package/dist/apis/device/phone.ts +2 -1
- package/dist/apis/device/scan.ts +4 -0
- package/dist/apis/device/screen.ts +2 -1
- package/dist/apis/device/sms.ts +4 -0
- package/dist/apis/device/vibrate.ts +19 -11
- package/dist/apis/device/wifi.ts +15 -0
- package/dist/apis/ext/index.ts +5 -0
- package/dist/apis/files/index.ts +2 -1
- package/dist/apis/files/manager.ts +2 -1
- package/dist/apis/framework/index.ts +5 -6
- package/dist/apis/location/index.ts +61 -68
- package/dist/apis/media/EditorContext.ts +32 -0
- package/dist/apis/media/audio/index.ts +18 -0
- package/dist/apis/media/background-audio/index.ts +16 -0
- package/dist/apis/media/camera.ts +16 -0
- package/dist/apis/media/common.ts +2 -1
- package/dist/apis/media/{image.ts → image/index.ts} +3 -2
- package/dist/apis/media/index.ts +10 -0
- package/dist/apis/media/live.ts +5 -0
- package/dist/apis/media/map.ts +4 -0
- package/dist/apis/media/media-recorder.ts +4 -0
- package/dist/apis/media/recorder.ts +6 -0
- package/dist/apis/media/video/VideoContext.ts +19 -0
- package/dist/apis/media/{video.ts → video/index.ts} +12 -2
- package/dist/apis/media/video-decoder.ts +4 -0
- package/dist/apis/media/video-processing.ts +4 -0
- package/dist/apis/media/voip.ts +19 -0
- package/dist/apis/network/index.ts +3 -0
- package/dist/apis/network/mdns.ts +13 -0
- package/dist/apis/network/request.ts +2 -1
- package/dist/apis/network/tcp.ts +4 -0
- package/dist/apis/network/udp.ts +4 -0
- package/dist/apis/network/webSocket.ts +2 -6
- package/dist/apis/open-api/account.ts +4 -0
- package/dist/apis/open-api/address.ts +4 -0
- package/dist/apis/open-api/authorize.ts +5 -0
- package/dist/apis/open-api/card.ts +5 -0
- package/dist/apis/open-api/channels-live.ts +11 -0
- package/dist/apis/open-api/customer-service.ts +4 -0
- package/dist/apis/open-api/device-voip.ts +5 -0
- package/dist/apis/open-api/facial.ts +7 -0
- package/dist/apis/open-api/favorites.ts +5 -0
- package/dist/apis/open-api/group.ts +4 -0
- package/dist/apis/open-api/index.ts +20 -6
- package/dist/apis/open-api/invoice.ts +5 -0
- package/dist/apis/open-api/license-plate.ts +4 -0
- package/dist/apis/open-api/login.ts +6 -0
- package/dist/apis/open-api/my-miniprogram.ts +4 -0
- package/dist/apis/open-api/privacy.ts +7 -0
- package/dist/apis/open-api/red-package.ts +4 -0
- package/dist/apis/open-api/settings.ts +5 -0
- package/dist/apis/open-api/soter.ts +6 -0
- package/dist/apis/open-api/subscribe-message.ts +6 -0
- package/dist/apis/open-api/{user-info/index.ts → user-info.ts} +1 -16
- package/dist/apis/open-api/werun.ts +5 -0
- package/dist/apis/payment/index.ts +6 -0
- package/dist/apis/route/index.ts +4 -28
- package/dist/apis/share/index.ts +33 -0
- package/dist/apis/storage/background-fetch.ts +7 -0
- package/dist/apis/storage/cache-manager.ts +4 -0
- package/dist/apis/storage/index.ts +20 -18
- package/dist/apis/ui/{animation.ts → animation/animation.ts} +2 -2
- package/dist/apis/ui/animation/index.ts +7 -0
- package/dist/apis/ui/background.ts +2 -18
- package/dist/apis/ui/custom-component.ts +8 -0
- package/dist/apis/ui/fonts.ts +4 -0
- package/dist/apis/ui/index.ts +8 -10
- package/dist/apis/ui/interaction/index.ts +3 -0
- package/dist/apis/ui/menu.ts +4 -0
- package/dist/apis/ui/navigation-bar/index.ts +60 -21
- package/dist/apis/ui/pull-down-refresh.ts +1 -1
- package/dist/apis/{page → ui/scroll}/index.ts +27 -22
- package/dist/apis/ui/sticky.ts +4 -0
- package/dist/apis/{tabbar/index.ts → ui/tab-bar.ts} +3 -5
- package/dist/apis/ui/window.ts +20 -0
- package/dist/apis/utils/handler.ts +4 -4
- package/dist/apis/worker/index.ts +4 -0
- package/dist/apis/wxml/IntersectionObserver.ts +12 -21
- package/dist/apis/wxml/index.ts +5 -2
- package/dist/apis/wxml/nodesRef.ts +2 -2
- package/dist/apis/wxml/selectorQuery.ts +3 -4
- package/dist/components-harmony-ets/button.ets +90 -64
- package/dist/components-harmony-ets/checkbox.ets +53 -98
- package/dist/components-harmony-ets/form.ets +16 -112
- package/dist/components-harmony-ets/icon.ets +59 -46
- package/dist/components-harmony-ets/image.ets +15 -40
- package/dist/components-harmony-ets/innerHtml.ets +6 -74
- package/dist/components-harmony-ets/input.ets +58 -128
- package/dist/components-harmony-ets/label.ets +43 -69
- package/dist/components-harmony-ets/picker.ets +114 -137
- package/dist/components-harmony-ets/radio.ets +55 -103
- package/dist/components-harmony-ets/richText.ets +17 -41
- package/dist/components-harmony-ets/scrollView.ets +69 -101
- package/dist/components-harmony-ets/slider.ets +35 -58
- package/dist/components-harmony-ets/swiper.ets +24 -135
- package/dist/components-harmony-ets/switch.ets +25 -55
- package/dist/components-harmony-ets/text.ets +42 -46
- package/dist/components-harmony-ets/textArea.ets +39 -107
- package/dist/components-harmony-ets/utils/constant/style.ets +9 -6
- package/dist/components-harmony-ets/utils/flexManager.ets +3 -88
- package/dist/components-harmony-ets/utils/helper.ets +2 -62
- package/dist/components-harmony-ets/utils/index.ts +1 -1
- package/dist/components-harmony-ets/utils/styles.ets +6 -9
- package/dist/components-harmony-ets/video.ets +63 -92
- package/dist/components-harmony-ets/view.ets +65 -40
- package/dist/index.js +33 -4
- package/dist/index.js.map +1 -1
- package/dist/runtime-ets/bom/getComputedStyle.ts +1 -1
- package/dist/runtime-ets/dom/bind.ts +80 -0
- package/dist/runtime-ets/dom/class-list.ts +2 -4
- package/dist/runtime-ets/dom/comment.ts +1 -2
- package/dist/runtime-ets/dom/cssStyleDeclaration.ts +1 -1
- package/dist/runtime-ets/dom/dataSource.ts +64 -0
- package/dist/runtime-ets/dom/document.ts +14 -43
- package/dist/runtime-ets/dom/element/element.ts +162 -0
- package/dist/runtime-ets/dom/element/form.ts +397 -0
- package/dist/runtime-ets/dom/element/index.ts +89 -0
- package/dist/runtime-ets/dom/element/normal.ts +75 -0
- package/dist/runtime-ets/dom/element/scrollView.ts +14 -0
- package/dist/runtime-ets/dom/element/text.ts +17 -0
- package/dist/runtime-ets/dom/element/video.ts +49 -0
- package/dist/runtime-ets/dom/event.ts +24 -1
- package/dist/runtime-ets/dom/eventTarget.ts +2 -1
- package/dist/runtime-ets/dom/node.ts +74 -44
- package/dist/runtime-ets/dom/stylesheet/index.ts +136 -23
- package/dist/runtime-ets/dom/stylesheet/type.ts +4 -3
- package/dist/runtime-ets/dom/stylesheet/util.ts +71 -1
- package/dist/runtime-ets/index.ts +0 -1
- package/dist/runtime-ets/utils/bind.ts +3 -14
- package/dist/runtime-ets/utils/index.ts +12 -7
- package/dist/runtime-ets/utils/info.ts +22 -50
- package/dist/runtime-framework/react/app.ts +3 -6
- package/dist/runtime-framework/react/page.ts +2 -9
- package/dist/runtime-framework/solid/page.ts +0 -6
- package/dist/runtime-utils.js +1150 -339
- package/dist/runtime-utils.js.map +1 -1
- package/dist/runtime.js +1150 -339
- package/dist/runtime.js.map +1 -1
- package/package.json +8 -8
- package/types/runtime.d.ts +4 -0
- package/LICENSE +0 -160
- package/dist/components-harmony-ets/base.ets +0 -63
- package/dist/components-harmony-ets/element.ets +0 -223
- package/dist/components-harmony-ets/utils/constant/icon.ts +0 -19
- package/dist/runtime-ets/dom/element.ts +0 -457
- package/dist/runtime-ets/dom/text.ts +0 -19
- package/types/api.d.ts +0 -4
package/dist/runtime-utils.js
CHANGED
|
@@ -5,6 +5,7 @@ import { eventCenter, Events, History } from '@tarojs/runtime/dist/runtime.esm';
|
|
|
5
5
|
import deviceInfo from '@ohos.deviceInfo';
|
|
6
6
|
import i18n from '@ohos.i18n';
|
|
7
7
|
import deviceMethod from '@system.device';
|
|
8
|
+
import errorManager from '@ohos.app.ability.errorManager';
|
|
8
9
|
import sensor from '@ohos.sensor';
|
|
9
10
|
import batteryInfo, { BatteryChargeState } from '@ohos.batteryInfo';
|
|
10
11
|
import pasteboard from '@ohos.pasteboard';
|
|
@@ -25,13 +26,13 @@ import image from '@ohos.multimedia.image';
|
|
|
25
26
|
import request$1 from '@ohos.request';
|
|
26
27
|
import http from '@ohos.net.http';
|
|
27
28
|
import webSocket from '@ohos.net.webSocket';
|
|
28
|
-
import { pxTransformHelper } from '@tarojs/taro';
|
|
29
29
|
import router from '@ohos.router';
|
|
30
30
|
import bundleManager from '@ohos.bundle.bundleManager';
|
|
31
31
|
import dataPreferences from '@ohos.data.preferences';
|
|
32
32
|
import hilog from '@ohos.hilog';
|
|
33
33
|
import matrix4 from '@ohos.matrix4';
|
|
34
34
|
import prompt from '@ohos.prompt';
|
|
35
|
+
import { pxTransformHelper } from '@tarojs/taro';
|
|
35
36
|
|
|
36
37
|
class MethodHandler {
|
|
37
38
|
constructor({ name, success, fail, complete }) {
|
|
@@ -251,6 +252,20 @@ function callAsyncFail(reject, res, options) {
|
|
|
251
252
|
reject(res);
|
|
252
253
|
}
|
|
253
254
|
|
|
255
|
+
// 加密
|
|
256
|
+
const getUserCryptoManager = /* @__PURE__ */ temporarilyNotSupport('getUserCryptoManager');
|
|
257
|
+
|
|
258
|
+
const setEnableDebug = /* @__PURE__ */ temporarilyNotSupport('setEnableDebug');
|
|
259
|
+
const getRealtimeLogManager = /* @__PURE__ */ temporarilyNotSupport('getRealtimeLogManager');
|
|
260
|
+
const getLogManager = /* @__PURE__ */ temporarilyNotSupport('getLogManager');
|
|
261
|
+
|
|
262
|
+
// 性能
|
|
263
|
+
const reportPerformance = /* @__PURE__ */ temporarilyNotSupport('reportPerformance');
|
|
264
|
+
const getPerformance = /* @__PURE__ */ temporarilyNotSupport('getPerformance');
|
|
265
|
+
const preloadWebview = /* @__PURE__ */ temporarilyNotSupport('preloadWebview');
|
|
266
|
+
const preloadSkylineView = /* @__PURE__ */ temporarilyNotSupport('preloadSkylineView');
|
|
267
|
+
const preloadAssets = /* @__PURE__ */ temporarilyNotSupport('preloadAssets');
|
|
268
|
+
|
|
254
269
|
// 设备信息,从 API Version 6 开始支持
|
|
255
270
|
const display = _display.getDefaultDisplaySync();
|
|
256
271
|
let device;
|
|
@@ -313,7 +328,102 @@ const getSystemInfo = function (options) {
|
|
|
313
328
|
};
|
|
314
329
|
globalThis.getSystemInfoSync = getSystemInfoSync;
|
|
315
330
|
|
|
316
|
-
|
|
331
|
+
// 更新
|
|
332
|
+
const updateWeChatApp = /* @__PURE__ */ temporarilyNotSupport('updateWeChatApp');
|
|
333
|
+
const getUpdateManager = /* @__PURE__ */ temporarilyNotSupport('getUpdateManager');
|
|
334
|
+
|
|
335
|
+
const unhandledRejectionCallbackManager = new CallbackManager();
|
|
336
|
+
const errorCallbackManager = new CallbackManager();
|
|
337
|
+
const unhandledRejectionListener = (res) => {
|
|
338
|
+
unhandledRejectionCallbackManager.trigger(res);
|
|
339
|
+
};
|
|
340
|
+
const errorListener = (res) => {
|
|
341
|
+
// @ts-ignore
|
|
342
|
+
errorCallbackManager.trigger(res.stack || res.message || res);
|
|
343
|
+
};
|
|
344
|
+
// 应用级事件
|
|
345
|
+
const onUnhandledRejection = callback => {
|
|
346
|
+
unhandledRejectionCallbackManager.add(callback);
|
|
347
|
+
if (unhandledRejectionCallbackManager.count() === 1) {
|
|
348
|
+
errorManager.on('error', {
|
|
349
|
+
unhandledRejectionListener
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
const onThemeChange = /* @__PURE__ */ temporarilyNotSupport('onThemeChange');
|
|
354
|
+
const onPageNotFound = /* @__PURE__ */ temporarilyNotSupport('onPageNotFound');
|
|
355
|
+
const onLazyLoadError = /* @__PURE__ */ temporarilyNotSupport('onLazyLoadError');
|
|
356
|
+
const onError = callback => {
|
|
357
|
+
errorCallbackManager.add(callback);
|
|
358
|
+
if (errorCallbackManager.count() === 1) {
|
|
359
|
+
errorManager.on('error', {
|
|
360
|
+
onException: errorListener
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
const onAudioInterruptionEnd = /* @__PURE__ */ temporarilyNotSupport('onAudioInterruptionEnd');
|
|
365
|
+
const onAudioInterruptionBegin = /* @__PURE__ */ temporarilyNotSupport('onAudioInterruptionBegin');
|
|
366
|
+
const onAppShow = /* @__PURE__ */ temporarilyNotSupport('onAppShow');
|
|
367
|
+
const onAppHide = /* @__PURE__ */ temporarilyNotSupport('onAppHide');
|
|
368
|
+
const offUnhandledRejection = callback => {
|
|
369
|
+
unhandledRejectionCallbackManager.remove(callback);
|
|
370
|
+
if (unhandledRejectionCallbackManager.count() === 0) {
|
|
371
|
+
errorManager.off('error', {
|
|
372
|
+
unhandledRejectionListener
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
const offThemeChange = /* @__PURE__ */ temporarilyNotSupport('offThemeChange');
|
|
377
|
+
const offPageNotFound = /* @__PURE__ */ temporarilyNotSupport('offPageNotFound');
|
|
378
|
+
const offLazyLoadError = /* @__PURE__ */ temporarilyNotSupport('offLazyLoadError');
|
|
379
|
+
const offError = callback => {
|
|
380
|
+
errorCallbackManager.remove(callback);
|
|
381
|
+
if (errorCallbackManager.count() === 0) {
|
|
382
|
+
errorManager.off('error', {
|
|
383
|
+
onException: errorListener
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
const offAudioInterruptionEnd = /* @__PURE__ */ temporarilyNotSupport('offAudioInterruptionEnd');
|
|
388
|
+
const offAudioInterruptionBegin = /* @__PURE__ */ temporarilyNotSupport('offAudioInterruptionBegin');
|
|
389
|
+
const offAppShow = /* @__PURE__ */ temporarilyNotSupport('offAppShow');
|
|
390
|
+
const offAppHide = /* @__PURE__ */ temporarilyNotSupport('offAppHide');
|
|
391
|
+
|
|
392
|
+
const launchOptions = {
|
|
393
|
+
path: '',
|
|
394
|
+
query: {},
|
|
395
|
+
scene: 0,
|
|
396
|
+
shareTicket: '',
|
|
397
|
+
referrerInfo: {}
|
|
398
|
+
};
|
|
399
|
+
function initLaunchOptions(options = {}) {
|
|
400
|
+
Object.assign(launchOptions, options);
|
|
401
|
+
}
|
|
402
|
+
eventCenter.once('__taroRouterLaunch', initLaunchOptions);
|
|
403
|
+
// 生命周期
|
|
404
|
+
const getLaunchOptionsSync = () => launchOptions;
|
|
405
|
+
const getEnterOptionsSync = () => launchOptions;
|
|
406
|
+
|
|
407
|
+
const canIUse = /* @__PURE__ */ temporarilyNotSupport('canIUse');
|
|
408
|
+
const arrayBufferToBase64 = /* @__PURE__ */ temporarilyNotSupport('arrayBufferToBase64');
|
|
409
|
+
const base64ToArrayBuffer = /* @__PURE__ */ temporarilyNotSupport('base64ToArrayBuffer');
|
|
410
|
+
|
|
411
|
+
// 画布
|
|
412
|
+
/** 创建离屏 canvas 实例 */
|
|
413
|
+
const createOffscreenCanvas = /* @__PURE__ */ temporarilyNotSupport('createOffscreenCanvas');
|
|
414
|
+
/** 创建 canvas 的绘图上下文 CanvasContext 对象 */
|
|
415
|
+
const createCanvasContext = /* @__PURE__ */ temporarilyNotSupport('createOffscreenCanvas');
|
|
416
|
+
/** 把当前画布指定区域的内容导出生成指定大小的图片 */
|
|
417
|
+
const canvasToTempFilePath = /* @__PURE__ */ temporarilyNotSupport('createOffscreenCanvas');
|
|
418
|
+
/** 将像素数据绘制到画布 */
|
|
419
|
+
const canvasPutImageData = /* @__PURE__ */ temporarilyNotSupport('createOffscreenCanvas');
|
|
420
|
+
/** 获取 canvas 区域隐含的像素数据 */
|
|
421
|
+
const canvasGetImageData = /* @__PURE__ */ temporarilyNotSupport('createOffscreenCanvas');
|
|
422
|
+
|
|
423
|
+
const reportMonitor = /* @__PURE__ */ temporarilyNotSupport('reportMonitor');
|
|
424
|
+
const reportAnalytics = /* @__PURE__ */ temporarilyNotSupport('reportAnalytics');
|
|
425
|
+
const reportEvent = /* @__PURE__ */ temporarilyNotSupport('reportEvent');
|
|
426
|
+
const getExptInfoSync = /* @__PURE__ */ temporarilyNotSupport('getExptInfoSync');
|
|
317
427
|
|
|
318
428
|
const callbackManager$1 = new CallbackManager();
|
|
319
429
|
let devicemotionListener;
|
|
@@ -382,6 +492,9 @@ const offAccelerometerChange = callback => {
|
|
|
382
492
|
callbackManager$1.remove(callback);
|
|
383
493
|
};
|
|
384
494
|
|
|
495
|
+
// 无障碍
|
|
496
|
+
const checkIsOpenAccessibility = /* @__PURE__ */ temporarilyNotSupport('checkIsOpenAccessibility');
|
|
497
|
+
|
|
385
498
|
/******************************************************************************
|
|
386
499
|
Copyright (c) Microsoft Corporation.
|
|
387
500
|
|
|
@@ -427,6 +540,48 @@ const getBatteryInfo = ({ success, fail, complete } = {}) => __awaiter(void 0, v
|
|
|
427
540
|
}
|
|
428
541
|
});
|
|
429
542
|
|
|
543
|
+
// 蓝牙-通用
|
|
544
|
+
const stopBluetoothDevicesDiscovery = /* @__PURE__ */ temporarilyNotSupport('stopBluetoothDevicesDiscovery');
|
|
545
|
+
const startBluetoothDevicesDiscovery = /* @__PURE__ */ temporarilyNotSupport('startBluetoothDevicesDiscovery');
|
|
546
|
+
const openBluetoothAdapter = /* @__PURE__ */ temporarilyNotSupport('openBluetoothAdapter');
|
|
547
|
+
const onBluetoothDeviceFound = /* @__PURE__ */ temporarilyNotSupport('onBluetoothDeviceFound');
|
|
548
|
+
const onBluetoothAdapterStateChange = /* @__PURE__ */ temporarilyNotSupport('onBluetoothAdapterStateChange');
|
|
549
|
+
const offBluetoothDeviceFound = /* @__PURE__ */ temporarilyNotSupport('offBluetoothDeviceFound');
|
|
550
|
+
const offBluetoothAdapterStateChange = /* @__PURE__ */ temporarilyNotSupport('offBluetoothAdapterStateChange');
|
|
551
|
+
const makeBluetoothPair = /* @__PURE__ */ temporarilyNotSupport('makeBluetoothPair');
|
|
552
|
+
const isBluetoothDevicePaired = /* @__PURE__ */ temporarilyNotSupport('isBluetoothDevicePaired');
|
|
553
|
+
const getConnectedBluetoothDevices = /* @__PURE__ */ temporarilyNotSupport('getConnectedBluetoothDevices');
|
|
554
|
+
const getBluetoothDevices = /* @__PURE__ */ temporarilyNotSupport('getBluetoothDevices');
|
|
555
|
+
const getBluetoothAdapterState = /* @__PURE__ */ temporarilyNotSupport('getBluetoothAdapterState');
|
|
556
|
+
const closeBluetoothAdapter = /* @__PURE__ */ temporarilyNotSupport('closeBluetoothAdapter');
|
|
557
|
+
|
|
558
|
+
// 蓝牙-低功耗中心设备
|
|
559
|
+
const writeBLECharacteristicValue = /* @__PURE__ */ temporarilyNotSupport('writeBLECharacteristicValue');
|
|
560
|
+
const setBLEMTU = /* @__PURE__ */ temporarilyNotSupport('setBLEMTU');
|
|
561
|
+
const readBLECharacteristicValue = /* @__PURE__ */ temporarilyNotSupport('readBLECharacteristicValue');
|
|
562
|
+
const onBLEMTUChange = /* @__PURE__ */ temporarilyNotSupport('onBLEMTUChange');
|
|
563
|
+
const onBLEConnectionStateChange = /* @__PURE__ */ temporarilyNotSupport('onBLEConnectionStateChange');
|
|
564
|
+
const onBLECharacteristicValueChange = /* @__PURE__ */ temporarilyNotSupport('onBLECharacteristicValueChange');
|
|
565
|
+
const offBLEMTUChange = /* @__PURE__ */ temporarilyNotSupport('offBLEMTUChange');
|
|
566
|
+
const offBLEConnectionStateChange = /* @__PURE__ */ temporarilyNotSupport('offBLEConnectionStateChange');
|
|
567
|
+
const offBLECharacteristicValueChange = /* @__PURE__ */ temporarilyNotSupport('offBLECharacteristicValueChange');
|
|
568
|
+
const notifyBLECharacteristicValueChange = /* @__PURE__ */ temporarilyNotSupport('notifyBLECharacteristicValueChange');
|
|
569
|
+
const getBLEMTU = /* @__PURE__ */ temporarilyNotSupport('getBLEMTU');
|
|
570
|
+
const getBLEDeviceServices = /* @__PURE__ */ temporarilyNotSupport('getBLEDeviceServices');
|
|
571
|
+
const getBLEDeviceRSSI = /* @__PURE__ */ temporarilyNotSupport('getBLEDeviceRSSI');
|
|
572
|
+
const getBLEDeviceCharacteristics = /* @__PURE__ */ temporarilyNotSupport('getBLEDeviceCharacteristics');
|
|
573
|
+
const createBLEConnection = /* @__PURE__ */ temporarilyNotSupport('createBLEConnection');
|
|
574
|
+
const closeBLEConnection = /* @__PURE__ */ temporarilyNotSupport('closeBLEConnection');
|
|
575
|
+
|
|
576
|
+
// 蓝牙-低功耗外围设备
|
|
577
|
+
const onBLEPeripheralConnectionStateChanged = /* @__PURE__ */ temporarilyNotSupport('onBLEPeripheralConnectionStateChanged');
|
|
578
|
+
const offBLEPeripheralConnectionStateChanged = /* @__PURE__ */ temporarilyNotSupport('offBLEPeripheralConnectionStateChanged');
|
|
579
|
+
const createBLEPeripheralServer = /* @__PURE__ */ temporarilyNotSupport('createBLEPeripheralServer');
|
|
580
|
+
|
|
581
|
+
// 日历
|
|
582
|
+
const addPhoneRepeatCalendar = temporarilyNotSupport('addPhoneRepeatCalendar');
|
|
583
|
+
const addPhoneCalendar = temporarilyNotSupport('addPhoneCalendar');
|
|
584
|
+
|
|
430
585
|
// 从 API Version 6 开始支持
|
|
431
586
|
/**
|
|
432
587
|
* 设置系统剪贴板的内容
|
|
@@ -488,6 +643,45 @@ const getClipboardData = function (options) {
|
|
|
488
643
|
});
|
|
489
644
|
};
|
|
490
645
|
|
|
646
|
+
/**
|
|
647
|
+
* 停止监听罗盘数据
|
|
648
|
+
*/
|
|
649
|
+
const stopCompass = temporarilyNotSupport('stopCompass');
|
|
650
|
+
/**
|
|
651
|
+
* 开始监听罗盘数据
|
|
652
|
+
*/
|
|
653
|
+
const startCompass = temporarilyNotSupport('startCompass');
|
|
654
|
+
/**
|
|
655
|
+
* 监听罗盘数据变化事件。频率:5 次/秒,接口调用后会自动开始监听,可使用 wx.stopCompass 停止监听。
|
|
656
|
+
*/
|
|
657
|
+
const onCompassChange = temporarilyNotSupport('onCompassChange');
|
|
658
|
+
/**
|
|
659
|
+
* 取消监听罗盘数据变化事件,参数为空,则取消所有的事件监听。
|
|
660
|
+
*/
|
|
661
|
+
const offCompassChange = temporarilyNotSupport('offCompassChange');
|
|
662
|
+
|
|
663
|
+
// 联系人
|
|
664
|
+
const chooseContact = /* @__PURE__ */ temporarilyNotSupport('chooseContact');
|
|
665
|
+
const addPhoneContact = /* @__PURE__ */ temporarilyNotSupport('addPhoneContact');
|
|
666
|
+
|
|
667
|
+
// 加密
|
|
668
|
+
const getRandomValues = /* @__PURE__ */ temporarilyNotSupport('getRandomValues');
|
|
669
|
+
|
|
670
|
+
// 陀螺仪
|
|
671
|
+
const stopGyroscope = /* @__PURE__ */ temporarilyNotSupport('stopGyroscope');
|
|
672
|
+
const startGyroscope = /* @__PURE__ */ temporarilyNotSupport('startGyroscope');
|
|
673
|
+
const onGyroscopeChange = /* @__PURE__ */ temporarilyNotSupport('onGyroscopeChange');
|
|
674
|
+
const offGyroscopeChange = /* @__PURE__ */ temporarilyNotSupport('offGyroscopeChange');
|
|
675
|
+
|
|
676
|
+
// 蓝牙-信标(Beacon)
|
|
677
|
+
const stopBeaconDiscovery = /* @__PURE__ */ temporarilyNotSupport('stopBeaconDiscovery');
|
|
678
|
+
const startBeaconDiscovery = /* @__PURE__ */ temporarilyNotSupport('startBeaconDiscovery');
|
|
679
|
+
const onBeaconUpdate = /* @__PURE__ */ temporarilyNotSupport('onBeaconUpdate');
|
|
680
|
+
const onBeaconServiceChange = /* @__PURE__ */ temporarilyNotSupport('onBeaconServiceChange');
|
|
681
|
+
const offBeaconUpdate = /* @__PURE__ */ temporarilyNotSupport('offBeaconUpdate');
|
|
682
|
+
const offBeaconServiceChange = /* @__PURE__ */ temporarilyNotSupport('offBeaconServiceChange');
|
|
683
|
+
const getBeacons = /* @__PURE__ */ temporarilyNotSupport('getBeacons');
|
|
684
|
+
|
|
491
685
|
const callbackManager = new CallbackManager();
|
|
492
686
|
const resizeListener = (height) => {
|
|
493
687
|
callbackManager.trigger({
|
|
@@ -540,6 +734,11 @@ const getSelectedTextRange = /* @__PURE__ */ temporarilyNotSupport('getSelectedT
|
|
|
540
734
|
const onMemoryWarning = temporarilyNotSupport('onMemoryWarning');
|
|
541
735
|
const offMemoryWarning = temporarilyNotSupport('offMemoryWarning');
|
|
542
736
|
|
|
737
|
+
const stopDeviceMotionListening = temporarilyNotSupport('stopDeviceMotionListening');
|
|
738
|
+
const startDeviceMotionListening = temporarilyNotSupport('startDeviceMotionListening');
|
|
739
|
+
const onDeviceMotionChange = temporarilyNotSupport('onDeviceMotionChange');
|
|
740
|
+
const offDeviceMotionChange = temporarilyNotSupport('offDeviceMotionChange');
|
|
741
|
+
|
|
543
742
|
const getNetworkType = (options = {}) => {
|
|
544
743
|
const { success, fail, complete } = options;
|
|
545
744
|
const handle = new MethodHandler({ name: 'getNetworkType', success, fail, complete });
|
|
@@ -580,23 +779,50 @@ const networkStatusListener = (data, code = 0) => __awaiter(void 0, void 0, void
|
|
|
580
779
|
*/
|
|
581
780
|
const onNetworkWeakChange = /* @__PURE__ */ temporarilyNotSupport('onNetworkWeakChange');
|
|
582
781
|
const onNetworkStatusChange = callback => {
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
782
|
+
const name = 'onNetworkStatusChange';
|
|
783
|
+
const handle = new MethodHandler({ name, complete: callback });
|
|
784
|
+
try {
|
|
785
|
+
networkStatusManager.add(callback);
|
|
786
|
+
if (networkStatusManager.count() === 1) {
|
|
787
|
+
network.subscribe({
|
|
788
|
+
success: networkStatusListener,
|
|
789
|
+
fail: networkStatusListener,
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
catch (error) {
|
|
794
|
+
handle.fail({
|
|
795
|
+
errMsg: error
|
|
588
796
|
});
|
|
589
797
|
}
|
|
590
798
|
};
|
|
591
799
|
const offNetworkWeakChange = /* @__PURE__ */ temporarilyNotSupport('offNetworkWeakChange');
|
|
592
800
|
const offNetworkStatusChange = callback => {
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
801
|
+
const name = 'offNetworkStatusChange';
|
|
802
|
+
const handle = new MethodHandler({ name, complete: callback });
|
|
803
|
+
try {
|
|
804
|
+
networkStatusManager.remove(callback);
|
|
805
|
+
if (networkStatusManager.count() === 0) {
|
|
806
|
+
network.unsubscribe();
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
catch (error) {
|
|
810
|
+
handle.fail({
|
|
811
|
+
errMsg: error
|
|
812
|
+
});
|
|
596
813
|
}
|
|
597
814
|
};
|
|
598
815
|
const getLocalIPAddress = /* @__PURE__ */ temporarilyNotSupport('getLocalIPAddress');
|
|
599
816
|
|
|
817
|
+
// NFC
|
|
818
|
+
const stopHCE = /* @__PURE__ */ temporarilyNotSupport('stopHCE');
|
|
819
|
+
const startHCE = /* @__PURE__ */ temporarilyNotSupport('startHCE');
|
|
820
|
+
const sendHCEMessage = /* @__PURE__ */ temporarilyNotSupport('sendHCEMessage');
|
|
821
|
+
const onHCEMessage = /* @__PURE__ */ temporarilyNotSupport('onHCEMessage');
|
|
822
|
+
const offHCEMessage = /* @__PURE__ */ temporarilyNotSupport('offHCEMessage');
|
|
823
|
+
const getNFCAdapter = /* @__PURE__ */ temporarilyNotSupport('getNFCAdapter');
|
|
824
|
+
const getHCEState = /* @__PURE__ */ temporarilyNotSupport('getHCEState');
|
|
825
|
+
|
|
600
826
|
// 从 API Version 7 开始支持。
|
|
601
827
|
const makePhoneCall = (options) => {
|
|
602
828
|
// options must be an Object
|
|
@@ -632,6 +858,9 @@ const makePhoneCall = (options) => {
|
|
|
632
858
|
});
|
|
633
859
|
};
|
|
634
860
|
|
|
861
|
+
// 扫码
|
|
862
|
+
const scanCode = /* @__PURE__ */ temporarilyNotSupport('scanCode');
|
|
863
|
+
|
|
635
864
|
// 从API Version 7 开始,该接口不再维护,推荐使用新接口'@ohos.brightness'
|
|
636
865
|
// 但是 新接口 @ohos.brightness 没有 getValue
|
|
637
866
|
// 屏幕
|
|
@@ -697,23 +926,51 @@ const onScreenRecordingStateChanged = /* @__PURE__ */ temporarilyNotSupport('onS
|
|
|
697
926
|
const offScreenRecordingStateChanged = /* @__PURE__ */ temporarilyNotSupport('offScreenRecordingStateChanged');
|
|
698
927
|
const getScreenRecordingState = /* @__PURE__ */ temporarilyNotSupport('getScreenRecordingState');
|
|
699
928
|
|
|
929
|
+
// 短信
|
|
930
|
+
const sendSms = /* @__PURE__ */ temporarilyNotSupport('sendSms');
|
|
931
|
+
|
|
700
932
|
const VIBRATOR_LONG_TIME = 400;
|
|
701
933
|
const VIBRATOR_SHORT_TIME = 15;
|
|
702
|
-
function vibrateBaseGenerator(
|
|
703
|
-
return (
|
|
934
|
+
function vibrateBaseGenerator(duration, name = '') {
|
|
935
|
+
return ({ success, fail, complete } = {}) => {
|
|
936
|
+
const handle = new MethodHandler({ name, success, fail, complete });
|
|
704
937
|
return new Promise((resolve, reject) => {
|
|
705
|
-
vibrator.
|
|
706
|
-
|
|
707
|
-
|
|
938
|
+
vibrator.startVibration({
|
|
939
|
+
type: 'time',
|
|
940
|
+
duration,
|
|
941
|
+
}, {
|
|
942
|
+
usage: 'unknown'
|
|
708
943
|
}, (error) => {
|
|
709
|
-
|
|
710
|
-
|
|
944
|
+
if (error) {
|
|
945
|
+
return handle.fail({
|
|
946
|
+
errMsg: `vibrate fail, error.code: ${error.code}; error.message: ${error.message}`
|
|
947
|
+
}, { resolve, reject });
|
|
948
|
+
}
|
|
949
|
+
return handle.success({}, { resolve, reject });
|
|
711
950
|
});
|
|
712
951
|
});
|
|
713
952
|
};
|
|
714
953
|
}
|
|
715
|
-
const vibrateLong = vibrateBaseGenerator(VIBRATOR_LONG_TIME);
|
|
716
|
-
const vibrateShort = vibrateBaseGenerator(VIBRATOR_SHORT_TIME);
|
|
954
|
+
const vibrateLong = vibrateBaseGenerator(VIBRATOR_LONG_TIME, 'vibrateLong');
|
|
955
|
+
const vibrateShort = vibrateBaseGenerator(VIBRATOR_SHORT_TIME, 'vibrateShort');
|
|
956
|
+
|
|
957
|
+
// Wi-Fi
|
|
958
|
+
const stopWifi = /* @__PURE__ */ temporarilyNotSupport('stopWifi');
|
|
959
|
+
const startWifi = /* @__PURE__ */ temporarilyNotSupport('startWifi');
|
|
960
|
+
const setWifiList = /* @__PURE__ */ temporarilyNotSupport('setWifiList');
|
|
961
|
+
const onWifiConnectedWithPartialInfo = /* @__PURE__ */ temporarilyNotSupport('onWifiConnectedWithPartialInfo');
|
|
962
|
+
const onWifiConnected = /* @__PURE__ */ temporarilyNotSupport('onWifiConnected');
|
|
963
|
+
const onGetWifiList = /* @__PURE__ */ temporarilyNotSupport('onGetWifiList');
|
|
964
|
+
const offWifiConnectedWithPartialInfo = /* @__PURE__ */ temporarilyNotSupport('offWifiConnectedWithPartialInfo');
|
|
965
|
+
const offWifiConnected = /* @__PURE__ */ temporarilyNotSupport('offWifiConnected');
|
|
966
|
+
const offGetWifiList = /* @__PURE__ */ temporarilyNotSupport('offGetWifiList');
|
|
967
|
+
const getWifiList = /* @__PURE__ */ temporarilyNotSupport('getWifiList');
|
|
968
|
+
const getConnectedWifi = /* @__PURE__ */ temporarilyNotSupport('getConnectedWifi');
|
|
969
|
+
const connectWifi = /* @__PURE__ */ temporarilyNotSupport('connectWifi');
|
|
970
|
+
|
|
971
|
+
// 第三方平台
|
|
972
|
+
const getExtConfigSync = /* @__PURE__ */ temporarilyNotSupport('getExtConfigSync');
|
|
973
|
+
const getExtConfig = /* @__PURE__ */ temporarilyNotSupport('getExtConfig');
|
|
717
974
|
|
|
718
975
|
/**
|
|
719
976
|
* HarmonyOS 文档:
|
|
@@ -1714,14 +1971,12 @@ const ENV_TYPE = {
|
|
|
1714
1971
|
function getEnv() {
|
|
1715
1972
|
return ENV_TYPE.HARMONY;
|
|
1716
1973
|
}
|
|
1974
|
+
// TODO
|
|
1975
|
+
const getCurrentPages = () => [];
|
|
1717
1976
|
const getCurrentInstance = () => Current;
|
|
1718
|
-
const nextTick = (cb, ctx) => {
|
|
1719
|
-
setTimeout(function () {
|
|
1720
|
-
ctx ? cb.call(ctx) : cb();
|
|
1721
|
-
}, 1);
|
|
1722
|
-
};
|
|
1723
1977
|
const requirePlugin$1 = temporarilyNotSupport('requirePlugin');
|
|
1724
1978
|
|
|
1979
|
+
// @ts-nocheck
|
|
1725
1980
|
// HarmonyOS 文档: https://developer.harmonyos.com/cn/docs/documentation/doc-references/js-apis-geolocation-0000001199568865#section13752433138
|
|
1726
1981
|
// WX 文档: https://developers.weixin.qq.com/miniprogram/dev/api/location/wx.onLocationChange.html
|
|
1727
1982
|
// ✅ wx.offLocationChange
|
|
@@ -1736,8 +1991,13 @@ const requirePlugin$1 = temporarilyNotSupport('requirePlugin');
|
|
|
1736
1991
|
// ❌ wx.chooseLocation 地图相关
|
|
1737
1992
|
// ❌ wx.stopLocationUpdate
|
|
1738
1993
|
// ❌ wx.startLocationUpdate
|
|
1994
|
+
// 位置
|
|
1995
|
+
const stopLocationUpdate = /* @__PURE__ */ temporarilyNotSupport('stopLocationUpdate');
|
|
1996
|
+
const startLocationUpdateBackground = /* @__PURE__ */ temporarilyNotSupport('startLocationUpdateBackground');
|
|
1997
|
+
const startLocationUpdate = /* @__PURE__ */ temporarilyNotSupport('startLocationUpdate');
|
|
1998
|
+
const openLocation = /* @__PURE__ */ temporarilyNotSupport('openLocation');
|
|
1739
1999
|
function formatLocation(location) {
|
|
1740
|
-
const
|
|
2000
|
+
const wxLocate = {
|
|
1741
2001
|
latitude: location.latitude,
|
|
1742
2002
|
longitude: location.longitude,
|
|
1743
2003
|
altitude: location.altitude,
|
|
@@ -1746,7 +2006,7 @@ function formatLocation(location) {
|
|
|
1746
2006
|
verticalAccuracy: 0,
|
|
1747
2007
|
horizontalAccuracy: 0 // OHOS 不支持返回此参数,直接设置为默认值
|
|
1748
2008
|
};
|
|
1749
|
-
return
|
|
2009
|
+
return wxLocate;
|
|
1750
2010
|
}
|
|
1751
2011
|
// TODO:增加参数校验
|
|
1752
2012
|
// const getLocationSchema = {
|
|
@@ -1763,20 +2023,19 @@ const getLocation = function (options = {}) {
|
|
|
1763
2023
|
* 二者参数不一致
|
|
1764
2024
|
*/
|
|
1765
2025
|
const { type, altitude, isHighAccuracy, highAccuracyExpireTime } = options;
|
|
1766
|
-
const params = {
|
|
1767
|
-
type,
|
|
1768
|
-
altitude,
|
|
1769
|
-
isHighAccuracy,
|
|
1770
|
-
highAccuracyExpireTime
|
|
1771
|
-
};
|
|
1772
2026
|
try {
|
|
1773
|
-
return geoLocationManager.getCurrentLocation(
|
|
2027
|
+
return geoLocationManager.getCurrentLocation({
|
|
2028
|
+
type,
|
|
2029
|
+
altitude,
|
|
2030
|
+
isHighAccuracy,
|
|
2031
|
+
highAccuracyExpireTime
|
|
2032
|
+
}).then((location) => {
|
|
1774
2033
|
if (location.code !== 0) {
|
|
1775
2034
|
callAsyncFail(reject, location, options);
|
|
1776
2035
|
}
|
|
1777
2036
|
else {
|
|
1778
|
-
const
|
|
1779
|
-
callAsyncSuccess(resolve,
|
|
2037
|
+
const wxLocate = formatLocation(location.data);
|
|
2038
|
+
callAsyncSuccess(resolve, wxLocate, options);
|
|
1780
2039
|
}
|
|
1781
2040
|
}).catch(error => {
|
|
1782
2041
|
callAsyncFail(reject, error, options);
|
|
@@ -1788,26 +2047,90 @@ const getLocation = function (options = {}) {
|
|
|
1788
2047
|
});
|
|
1789
2048
|
};
|
|
1790
2049
|
const onLocationChange = function (callback) {
|
|
1791
|
-
|
|
1792
|
-
const
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
2050
|
+
const name = 'onLocationChange';
|
|
2051
|
+
const handle = new MethodHandler({ name, complete: callback });
|
|
2052
|
+
try {
|
|
2053
|
+
validateParams(name, [callback], ['Function']);
|
|
2054
|
+
geoLocationManager.on('locationChange', {}, (location) => {
|
|
2055
|
+
if (location) {
|
|
2056
|
+
const wxLocate = formatLocation(location);
|
|
2057
|
+
callback(wxLocate);
|
|
2058
|
+
}
|
|
2059
|
+
});
|
|
2060
|
+
}
|
|
2061
|
+
catch (error) {
|
|
2062
|
+
handle.fail({
|
|
2063
|
+
errMsg: error
|
|
2064
|
+
});
|
|
2065
|
+
}
|
|
1799
2066
|
};
|
|
1800
2067
|
const offLocationChange = function (callback) {
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
2068
|
+
const name = 'offLocationChange';
|
|
2069
|
+
const handle = new MethodHandler({ name, complete: callback });
|
|
2070
|
+
try {
|
|
2071
|
+
validateParams(name, [callback], ['Function']);
|
|
2072
|
+
geoLocationManager.off('locationChange', (location) => {
|
|
2073
|
+
const status = {
|
|
2074
|
+
errCode: 200,
|
|
2075
|
+
errMsg: location ? 'offLocationChange is off' : 'offLocationChange err'
|
|
2076
|
+
};
|
|
2077
|
+
if (callback) {
|
|
2078
|
+
callback(status);
|
|
2079
|
+
}
|
|
2080
|
+
});
|
|
2081
|
+
}
|
|
2082
|
+
catch (error) {
|
|
2083
|
+
handle.fail({
|
|
2084
|
+
errMsg: error
|
|
2085
|
+
});
|
|
2086
|
+
}
|
|
2087
|
+
};
|
|
2088
|
+
const onLocationChangeError = /* @__PURE__ */ temporarilyNotSupport('onLocationChangeError');
|
|
2089
|
+
const offLocationChangeError = /* @__PURE__ */ temporarilyNotSupport('offLocationChangeError');
|
|
2090
|
+
const choosePoi = /* @__PURE__ */ temporarilyNotSupport('choosePoi');
|
|
2091
|
+
const chooseLocation = /* @__PURE__ */ temporarilyNotSupport('chooseLocation');
|
|
2092
|
+
const getFuzzyLocation = /* @__PURE__ */ temporarilyNotSupport('getFuzzyLocation');
|
|
2093
|
+
|
|
2094
|
+
// 音频
|
|
2095
|
+
const stopVoice = /* @__PURE__ */ temporarilyNotSupport('stopVoice');
|
|
2096
|
+
const setInnerAudioOption = /* @__PURE__ */ temporarilyNotSupport('setInnerAudioOption');
|
|
2097
|
+
const playVoice = /* @__PURE__ */ temporarilyNotSupport('playVoice');
|
|
2098
|
+
const pauseVoice = /* @__PURE__ */ temporarilyNotSupport('pauseVoice');
|
|
2099
|
+
const getAvailableAudioSources = /* @__PURE__ */ temporarilyNotSupport('getAvailableAudioSources');
|
|
2100
|
+
const createWebAudioContext = /* @__PURE__ */ temporarilyNotSupport('createWebAudioContext');
|
|
2101
|
+
const createMediaAudioPlayer = /* @__PURE__ */ temporarilyNotSupport('createMediaAudioPlayer');
|
|
2102
|
+
/**
|
|
2103
|
+
* 创建内部 audio 上下文 InnerAudioContext 对象。
|
|
2104
|
+
*/
|
|
2105
|
+
const createInnerAudioContext = /* @__PURE__ */ temporarilyNotSupport('createInnerAudioContext');
|
|
2106
|
+
const createAudioContext = /* @__PURE__ */ temporarilyNotSupport('createAudioContext');
|
|
2107
|
+
|
|
2108
|
+
// 背景音频
|
|
2109
|
+
const stopBackgroundAudio = /* @__PURE__ */ temporarilyNotSupport('stopBackgroundAudio');
|
|
2110
|
+
const seekBackgroundAudio = /* @__PURE__ */ temporarilyNotSupport('seekBackgroundAudio');
|
|
2111
|
+
const playBackgroundAudio = /* @__PURE__ */ temporarilyNotSupport('playBackgroundAudio');
|
|
2112
|
+
const pauseBackgroundAudio = /* @__PURE__ */ temporarilyNotSupport('pauseBackgroundAudio');
|
|
2113
|
+
const onBackgroundAudioStop = /* @__PURE__ */ temporarilyNotSupport('onBackgroundAudioStop');
|
|
2114
|
+
const onBackgroundAudioPlay = /* @__PURE__ */ temporarilyNotSupport('onBackgroundAudioPlay');
|
|
2115
|
+
const onBackgroundAudioPause = /* @__PURE__ */ temporarilyNotSupport('onBackgroundAudioPause');
|
|
2116
|
+
const getBackgroundAudioPlayerState = /* @__PURE__ */ temporarilyNotSupport('getBackgroundAudioPlayerState');
|
|
2117
|
+
/**
|
|
2118
|
+
* 获取全局唯一的背景音频管理器
|
|
2119
|
+
*/
|
|
2120
|
+
const getBackgroundAudioManager = /* @__PURE__ */ temporarilyNotSupport('getBackgroundAudioManager');
|
|
2121
|
+
|
|
2122
|
+
// 相机
|
|
2123
|
+
class CameraContext {
|
|
2124
|
+
constructor() {
|
|
2125
|
+
this.onCameraFrame = temporarilyNotSupport('CameraContext.onCameraFrame');
|
|
2126
|
+
this.setZoom = temporarilyNotSupport('CameraContext.setZoom');
|
|
2127
|
+
this.startRecord = temporarilyNotSupport('CameraContext.startRecord');
|
|
2128
|
+
this.stopRecord = temporarilyNotSupport('CameraContext.stopRecord');
|
|
2129
|
+
this.takePhoto = temporarilyNotSupport('CameraContext.takePhoto');
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
const createCameraContext = (_) => {
|
|
2133
|
+
return new CameraContext();
|
|
1811
2134
|
};
|
|
1812
2135
|
|
|
1813
2136
|
// HarmonyOS 文档链接:https://developer.harmonyos.com/cn/docs/documentation/doc-references/js-apis-media-0000001103383404
|
|
@@ -1968,6 +2291,39 @@ const chooseImage = function (options) {
|
|
|
1968
2291
|
const previewImage = temporarilyNotSupport('previewImage');
|
|
1969
2292
|
const saveImageToPhotosAlbum = temporarilyNotSupport('saveImageToPhotosAlbum');
|
|
1970
2293
|
|
|
2294
|
+
// 实时音视频
|
|
2295
|
+
const createLivePusherContext = /* @__PURE__ */ temporarilyNotSupport('createLivePusherContext');
|
|
2296
|
+
const createLivePlayerContext = /* @__PURE__ */ temporarilyNotSupport('createLivePlayerContext');
|
|
2297
|
+
|
|
2298
|
+
// 地图
|
|
2299
|
+
const createMapContext = /* @__PURE__ */ temporarilyNotSupport('createMapContext');
|
|
2300
|
+
|
|
2301
|
+
// 画面录制器
|
|
2302
|
+
const createMediaRecorder = /* @__PURE__ */ temporarilyNotSupport('createMediaRecorder');
|
|
2303
|
+
|
|
2304
|
+
// 录音
|
|
2305
|
+
const stopRecord = /* @__PURE__ */ temporarilyNotSupport('stopRecord');
|
|
2306
|
+
const startRecord = /* @__PURE__ */ temporarilyNotSupport('startRecord');
|
|
2307
|
+
const getRecorderManager = /* @__PURE__ */ temporarilyNotSupport('getRecorderManager');
|
|
2308
|
+
|
|
2309
|
+
class VideoContext {
|
|
2310
|
+
constructor() {
|
|
2311
|
+
this.exitBackgroundPlayback = temporarilyNotSupport('VideoContext.exitBackgroundPlayback');
|
|
2312
|
+
this.exitFullScreen = temporarilyNotSupport('VideoContext.exitFullScreen');
|
|
2313
|
+
this.exitPictureInPicture = temporarilyNotSupport('VideoContext.exitPictureInPicture');
|
|
2314
|
+
this.hideStatusBar = temporarilyNotSupport('VideoContext.hideStatusBar');
|
|
2315
|
+
this.pause = temporarilyNotSupport('VideoContext.pause');
|
|
2316
|
+
this.play = temporarilyNotSupport('VideoContext.play');
|
|
2317
|
+
this.playbackRate = temporarilyNotSupport('VideoContext.playbackRate');
|
|
2318
|
+
this.requestBackgroundPlayback = temporarilyNotSupport('VideoContext.requestBackgroundPlayback');
|
|
2319
|
+
this.requestFullScreen = temporarilyNotSupport('VideoContext.requestFullScreen');
|
|
2320
|
+
this.seek = temporarilyNotSupport('VideoContext.seek');
|
|
2321
|
+
this.sendDanmu = temporarilyNotSupport('VideoContext.sendDanmu');
|
|
2322
|
+
this.showStatusBar = temporarilyNotSupport('VideoContext.showStatusBar');
|
|
2323
|
+
this.stop = temporarilyNotSupport('VideoContext.stop');
|
|
2324
|
+
}
|
|
2325
|
+
}
|
|
2326
|
+
|
|
1971
2327
|
// HarmonyOS 文档链接:https://developer.harmonyos.com/cn/docs/documentation/doc-references/js-apis-media-0000001103383404
|
|
1972
2328
|
// WX 文档链接:https://developers.weixin.qq.com/miniprogram/dev/api/media/video/wx.chooseVideo.html
|
|
1973
2329
|
// ✅ wx.saveVideoToPhotosAlbum
|
|
@@ -1993,6 +2349,9 @@ const saveImageToPhotosAlbum = temporarilyNotSupport('saveImageToPhotosAlbum');
|
|
|
1993
2349
|
const saveVideoToPhotosAlbumSchema = {
|
|
1994
2350
|
filePath: 'String'
|
|
1995
2351
|
};
|
|
2352
|
+
const createVideoContext = () => {
|
|
2353
|
+
return new VideoContext();
|
|
2354
|
+
};
|
|
1996
2355
|
// TODO: 1.返回属性补全
|
|
1997
2356
|
// TODO: 2.只支持从相册选择,补充摄像头拍摄功能,需要HarmonyOS提供选择组件
|
|
1998
2357
|
const chooseVideo = function (options = {}) {
|
|
@@ -2015,6 +2374,9 @@ const chooseVideo = function (options = {}) {
|
|
|
2015
2374
|
});
|
|
2016
2375
|
});
|
|
2017
2376
|
};
|
|
2377
|
+
const compressVideo = /* @__PURE__ */ temporarilyNotSupport('compressVideo');
|
|
2378
|
+
const getVideoInfo = /* @__PURE__ */ temporarilyNotSupport('getVideoInfo');
|
|
2379
|
+
const openVideoEditor = /* @__PURE__ */ temporarilyNotSupport('openVideoEditor');
|
|
2018
2380
|
const saveVideoToPhotosAlbum = function (options) {
|
|
2019
2381
|
return new Promise((resolve, reject) => {
|
|
2020
2382
|
try {
|
|
@@ -2038,6 +2400,30 @@ const saveVideoToPhotosAlbum = function (options) {
|
|
|
2038
2400
|
});
|
|
2039
2401
|
};
|
|
2040
2402
|
|
|
2403
|
+
// 视频解码器
|
|
2404
|
+
const createVideoDecoder = /* @__PURE__ */ temporarilyNotSupport('createVideoDecoder');
|
|
2405
|
+
|
|
2406
|
+
// 音视频合成
|
|
2407
|
+
const createMediaContainer = /* @__PURE__ */ temporarilyNotSupport('createMediaContainer');
|
|
2408
|
+
|
|
2409
|
+
// 实时语音
|
|
2410
|
+
const updateVoIPChatMuteConfig = /* @__PURE__ */ temporarilyNotSupport('updateVoIPChatMuteConfig');
|
|
2411
|
+
const subscribeVoIPVideoMembers = /* @__PURE__ */ temporarilyNotSupport('subscribeVoIPVideoMembers');
|
|
2412
|
+
const setEnable1v1Chat = /* @__PURE__ */ temporarilyNotSupport('setEnable1v1Chat');
|
|
2413
|
+
const onVoIPVideoMembersChanged = /* @__PURE__ */ temporarilyNotSupport('onVoIPVideoMembersChanged');
|
|
2414
|
+
const onVoIPChatStateChanged = /* @__PURE__ */ temporarilyNotSupport('onVoIPChatStateChanged');
|
|
2415
|
+
const onVoIPChatSpeakersChanged = /* @__PURE__ */ temporarilyNotSupport('onVoIPChatSpeakersChanged');
|
|
2416
|
+
const onVoIPChatMembersChanged = /* @__PURE__ */ temporarilyNotSupport('onVoIPChatMembersChanged');
|
|
2417
|
+
const onVoIPChatInterrupted = /* @__PURE__ */ temporarilyNotSupport('onVoIPChatInterrupted');
|
|
2418
|
+
const offVoIPChatSpeakersChanged = /* @__PURE__ */ temporarilyNotSupport('offVoIPChatSpeakersChanged');
|
|
2419
|
+
const offVoIPVideoMembersChanged = /* @__PURE__ */ temporarilyNotSupport('offVoIPVideoMembersChanged');
|
|
2420
|
+
const offVoIPChatStateChanged = /* @__PURE__ */ temporarilyNotSupport('offVoIPChatStateChanged');
|
|
2421
|
+
const offVoIPChatMembersChanged = /* @__PURE__ */ temporarilyNotSupport('offVoIPChatMembersChanged');
|
|
2422
|
+
const offVoIPChatInterrupted = /* @__PURE__ */ temporarilyNotSupport('offVoIPChatInterrupted');
|
|
2423
|
+
const joinVoIPChat = /* @__PURE__ */ temporarilyNotSupport('joinVoIPChat');
|
|
2424
|
+
const join1v1Chat = /* @__PURE__ */ temporarilyNotSupport('join1v1Chat');
|
|
2425
|
+
const exitVoIPChat = /* @__PURE__ */ temporarilyNotSupport('exitVoIPChat');
|
|
2426
|
+
|
|
2041
2427
|
// 跳转
|
|
2042
2428
|
const openEmbeddedMiniProgram = /* @__PURE__ */ temporarilyNotSupport('openEmbeddedMiniProgram');
|
|
2043
2429
|
const navigateToMiniProgram = /* @__PURE__ */ temporarilyNotSupport('navigateToMiniProgram');
|
|
@@ -2139,6 +2525,18 @@ const downloadFile = function (options) {
|
|
|
2139
2525
|
return downloadTaskWX;
|
|
2140
2526
|
};
|
|
2141
2527
|
|
|
2528
|
+
// mDNS
|
|
2529
|
+
const stopLocalServiceDiscovery = /* @__PURE__ */ temporarilyNotSupport('stopLocalServiceDiscovery');
|
|
2530
|
+
const startLocalServiceDiscovery = /* @__PURE__ */ temporarilyNotSupport('startLocalServiceDiscovery');
|
|
2531
|
+
const onLocalServiceResolveFail = /* @__PURE__ */ temporarilyNotSupport('onLocalServiceResolveFail');
|
|
2532
|
+
const onLocalServiceLost = /* @__PURE__ */ temporarilyNotSupport('onLocalServiceLost');
|
|
2533
|
+
const onLocalServiceFound = /* @__PURE__ */ temporarilyNotSupport('onLocalServiceFound');
|
|
2534
|
+
const onLocalServiceDiscoveryStop = /* @__PURE__ */ temporarilyNotSupport('onLocalServiceDiscoveryStop');
|
|
2535
|
+
const offLocalServiceResolveFail = /* @__PURE__ */ temporarilyNotSupport('offLocalServiceResolveFail');
|
|
2536
|
+
const offLocalServiceLost = /* @__PURE__ */ temporarilyNotSupport('offLocalServiceLost');
|
|
2537
|
+
const offLocalServiceFound = /* @__PURE__ */ temporarilyNotSupport('offLocalServiceFound');
|
|
2538
|
+
const offLocalServiceDiscoveryStop = /* @__PURE__ */ temporarilyNotSupport('offLocalServiceDiscoveryStop');
|
|
2539
|
+
|
|
2142
2540
|
// HarmonyOS 文档链接:https://developer.harmonyos.com/cn/docs/documentation/doc-references/js-apis-net-http-0000001168304341
|
|
2143
2541
|
// WX 文档链接:https://developers.weixin.qq.com/miniprogram/dev/api/network/request/wx.request.html
|
|
2144
2542
|
// ✅ wx.request
|
|
@@ -2219,6 +2617,12 @@ const request = function (options) {
|
|
|
2219
2617
|
return requestTask;
|
|
2220
2618
|
};
|
|
2221
2619
|
|
|
2620
|
+
// TCP 通信
|
|
2621
|
+
const createTCPSocket = /* @__PURE__ */ temporarilyNotSupport('createTCPSocket');
|
|
2622
|
+
|
|
2623
|
+
// UDP 通信
|
|
2624
|
+
const createUDPSocket = /* @__PURE__ */ temporarilyNotSupport('createUDPSocket');
|
|
2625
|
+
|
|
2222
2626
|
// HarmonyOS 文档链接:https://developer.harmonyos.com/cn/docs/documentation/doc-references/js-apis-request-0000001123753962#section455311474372
|
|
2223
2627
|
// WX 文档链接:https://developers.weixin.qq.com/miniprogram/dev/api/network/upload/wx.uploadFile.html
|
|
2224
2628
|
// ✅ wx.uploadFile
|
|
@@ -2451,6 +2855,88 @@ const connectSocket = function (options) {
|
|
|
2451
2855
|
return SocketTaskWX;
|
|
2452
2856
|
};
|
|
2453
2857
|
|
|
2858
|
+
// 帐号信息
|
|
2859
|
+
const getAccountInfoSync = /* @__PURE__ */ temporarilyNotSupport('getAccountInfoSync');
|
|
2860
|
+
|
|
2861
|
+
// 收货地址
|
|
2862
|
+
const chooseAddress = /* @__PURE__ */ temporarilyNotSupport('chooseAddress');
|
|
2863
|
+
|
|
2864
|
+
// 授权
|
|
2865
|
+
const authorizeForMiniProgram = /* @__PURE__ */ temporarilyNotSupport('authorizeForMiniProgram');
|
|
2866
|
+
const authorize = /* @__PURE__ */ temporarilyNotSupport('authorize');
|
|
2867
|
+
|
|
2868
|
+
// 卡券
|
|
2869
|
+
const openCard = /* @__PURE__ */ temporarilyNotSupport('openCard');
|
|
2870
|
+
const addCard = /* @__PURE__ */ temporarilyNotSupport('addCard');
|
|
2871
|
+
|
|
2872
|
+
// 视频号
|
|
2873
|
+
const reserveChannelsLive = /* @__PURE__ */ temporarilyNotSupport('reserveChannelsLive');
|
|
2874
|
+
const openChannelsUserProfile = /* @__PURE__ */ temporarilyNotSupport('openChannelsUserProfile');
|
|
2875
|
+
const openChannelsLive = /* @__PURE__ */ temporarilyNotSupport('openChannelsLive');
|
|
2876
|
+
const openChannelsEvent = /* @__PURE__ */ temporarilyNotSupport('openChannelsEvent');
|
|
2877
|
+
const openChannelsActivity = /* @__PURE__ */ temporarilyNotSupport('openChannelsActivity');
|
|
2878
|
+
const getChannelsShareKey = /* @__PURE__ */ temporarilyNotSupport('getChannelsShareKey');
|
|
2879
|
+
const getChannelsLiveNoticeInfo = /* @__PURE__ */ temporarilyNotSupport('getChannelsLiveNoticeInfo');
|
|
2880
|
+
const getChannelsLiveInfo = /* @__PURE__ */ temporarilyNotSupport('getChannelsLiveInfo');
|
|
2881
|
+
|
|
2882
|
+
// 微信客服
|
|
2883
|
+
const openCustomerServiceChat = /* @__PURE__ */ temporarilyNotSupport('openCustomerServiceChat');
|
|
2884
|
+
|
|
2885
|
+
// 设备(组)音视频通话
|
|
2886
|
+
const requestDeviceVoIP = /* @__PURE__ */ temporarilyNotSupport('requestDeviceVoIP');
|
|
2887
|
+
const getDeviceVoIPList = /* @__PURE__ */ temporarilyNotSupport('getDeviceVoIPList');
|
|
2888
|
+
|
|
2889
|
+
// 过往接口
|
|
2890
|
+
const checkIsSupportFacialRecognition = /* @__PURE__ */ temporarilyNotSupport('checkIsSupportFacialRecognition');
|
|
2891
|
+
const startFacialRecognitionVerify = /* @__PURE__ */ temporarilyNotSupport('startFacialRecognitionVerify');
|
|
2892
|
+
const startFacialRecognitionVerifyAndUploadVideo = /* @__PURE__ */ temporarilyNotSupport('startFacialRecognitionVerifyAndUploadVideo');
|
|
2893
|
+
const faceVerifyForPay = /* @__PURE__ */ temporarilyNotSupport('faceVerifyForPay');
|
|
2894
|
+
|
|
2895
|
+
// 收藏
|
|
2896
|
+
const addVideoToFavorites = /* @__PURE__ */ temporarilyNotSupport('addVideoToFavorites');
|
|
2897
|
+
const addFileToFavorites = /* @__PURE__ */ temporarilyNotSupport('addFileToFavorites');
|
|
2898
|
+
|
|
2899
|
+
// 微信群
|
|
2900
|
+
const getGroupEnterInfo = /* @__PURE__ */ temporarilyNotSupport('getGroupEnterInfo');
|
|
2901
|
+
|
|
2902
|
+
// 发票
|
|
2903
|
+
const chooseInvoiceTitle = /* @__PURE__ */ temporarilyNotSupport('chooseInvoiceTitle');
|
|
2904
|
+
const chooseInvoice = /* @__PURE__ */ temporarilyNotSupport('chooseInvoice');
|
|
2905
|
+
|
|
2906
|
+
// 车牌
|
|
2907
|
+
const chooseLicensePlate = /* @__PURE__ */ temporarilyNotSupport('chooseLicensePlate');
|
|
2908
|
+
|
|
2909
|
+
// 帐号信息
|
|
2910
|
+
const pluginLogin = /* @__PURE__ */ temporarilyNotSupport('pluginLogin');
|
|
2911
|
+
const login = /* @__PURE__ */ temporarilyNotSupport('login');
|
|
2912
|
+
const checkSession = /* @__PURE__ */ temporarilyNotSupport('checkSession');
|
|
2913
|
+
|
|
2914
|
+
// 我的小程序
|
|
2915
|
+
const checkIsAddedToMyMiniProgram = /* @__PURE__ */ temporarilyNotSupport('checkIsAddedToMyMiniProgram');
|
|
2916
|
+
|
|
2917
|
+
// 隐私信息授权
|
|
2918
|
+
const requirePrivacyAuthorize = /* @__PURE__ */ temporarilyNotSupport('requirePrivacyAuthorize');
|
|
2919
|
+
const openPrivacyContract = /* @__PURE__ */ temporarilyNotSupport('openPrivacyContract');
|
|
2920
|
+
const onNeedPrivacyAuthorization = /* @__PURE__ */ temporarilyNotSupport('onNeedPrivacyAuthorization');
|
|
2921
|
+
const getPrivacySetting = /* @__PURE__ */ temporarilyNotSupport('getPrivacySetting');
|
|
2922
|
+
|
|
2923
|
+
// 微信红包
|
|
2924
|
+
const showRedPackage = /* @__PURE__ */ temporarilyNotSupport('showRedPackage');
|
|
2925
|
+
|
|
2926
|
+
// 设置
|
|
2927
|
+
const openSetting = /* @__PURE__ */ temporarilyNotSupport('openSetting');
|
|
2928
|
+
const getSetting = /* @__PURE__ */ temporarilyNotSupport('getSetting');
|
|
2929
|
+
|
|
2930
|
+
// 生物认证
|
|
2931
|
+
const startSoterAuthentication = /* @__PURE__ */ temporarilyNotSupport('startSoterAuthentication');
|
|
2932
|
+
const checkIsSupportSoterAuthentication = /* @__PURE__ */ temporarilyNotSupport('checkIsSupportSoterAuthentication');
|
|
2933
|
+
const checkIsSoterEnrolledInDevice = /* @__PURE__ */ temporarilyNotSupport('checkIsSoterEnrolledInDevice');
|
|
2934
|
+
|
|
2935
|
+
// 订阅消息
|
|
2936
|
+
const requestSubscribeMessage = /* @__PURE__ */ temporarilyNotSupport('requestSubscribeMessage');
|
|
2937
|
+
// 订阅设备消息
|
|
2938
|
+
const requestSubscribeDeviceMessage = /* @__PURE__ */ temporarilyNotSupport('requestSubscribeDeviceMessage');
|
|
2939
|
+
|
|
2454
2940
|
/**
|
|
2455
2941
|
* 用户相关API, Harmony ACE API 6
|
|
2456
2942
|
*
|
|
@@ -2499,18 +2985,6 @@ const getUserProfile = temporarilyNotSupport('getUserProfile');
|
|
|
2499
2985
|
// })
|
|
2500
2986
|
// })
|
|
2501
2987
|
// }
|
|
2502
|
-
/**
|
|
2503
|
-
* 提前向用户发起授权请求
|
|
2504
|
-
*/
|
|
2505
|
-
const authorize = temporarilyNotSupport('authorize');
|
|
2506
|
-
/**
|
|
2507
|
-
* 获取用户的当前设置
|
|
2508
|
-
*/
|
|
2509
|
-
const getSetting = temporarilyNotSupport('getSetting');
|
|
2510
|
-
/**
|
|
2511
|
-
* 调起客户端小程序设置界面
|
|
2512
|
-
*/
|
|
2513
|
-
const openSetting = temporarilyNotSupport('openSetting');
|
|
2514
2988
|
// function generateUserInfo (hmsAuthInfo) {
|
|
2515
2989
|
// const userInfo = {
|
|
2516
2990
|
// nickName: String,
|
|
@@ -2527,88 +3001,15 @@ const openSetting = temporarilyNotSupport('openSetting');
|
|
|
2527
3001
|
// return userInfo
|
|
2528
3002
|
// }
|
|
2529
3003
|
|
|
2530
|
-
|
|
2531
|
-
const
|
|
2532
|
-
const
|
|
3004
|
+
// 微信运动
|
|
3005
|
+
const shareToWeRun = /* @__PURE__ */ temporarilyNotSupport('shareToWeRun');
|
|
3006
|
+
const getWeRunData = /* @__PURE__ */ temporarilyNotSupport('getWeRunData');
|
|
2533
3007
|
|
|
2534
|
-
//
|
|
2535
|
-
const
|
|
2536
|
-
const
|
|
2537
|
-
|
|
2538
|
-
return new Promise((resolve, reject) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2539
|
-
var _a, _b;
|
|
2540
|
-
const taro = Current.taro;
|
|
2541
|
-
const page = taro.getCurrentInstance().page;
|
|
2542
|
-
const res = { errMsg: 'pageScrollTo:ok' };
|
|
2543
|
-
const error = { errMsg: 'pageScrollTo:fail' };
|
|
2544
|
-
const { scrollTop, selector = '', duration = 300, offsetTop = 0 } = options;
|
|
2545
|
-
if (scrollTop && selector) {
|
|
2546
|
-
console.warn('"scrollTop" 或 "selector" 建议只设一个值,全部设置会忽略selector');
|
|
2547
|
-
}
|
|
2548
|
-
let scrollValue = -1;
|
|
2549
|
-
let scroller = page.scroller;
|
|
2550
|
-
const currentPageNode = getPageScrollerOrNode(page.node, page);
|
|
2551
|
-
if (scrollTop || typeof scrollTop === 'number') {
|
|
2552
|
-
scrollValue = scrollTop;
|
|
2553
|
-
}
|
|
2554
|
-
else if (selector) {
|
|
2555
|
-
const node = findChildNodeWithDFS(currentPageNode, selector);
|
|
2556
|
-
if (!node || !node._instance)
|
|
2557
|
-
return;
|
|
2558
|
-
const instance = node._instance;
|
|
2559
|
-
const id = node === null || node === void 0 ? void 0 : node._nid;
|
|
2560
|
-
// 获取 areaInfo,需要先调用 setNodeEventCallbackAndTriggerComponentUpdate 更新一次组件并获取组件信息
|
|
2561
|
-
yield setNodeEventCallbackAndTriggerComponentUpdate(node, AREA_CHANGE_EVENT_NAME, null, true);
|
|
2562
|
-
const { areaInfo } = ((_a = instance === null || instance === void 0 ? void 0 : instance.nodeInfoMap) === null || _a === void 0 ? void 0 : _a[id]) || {};
|
|
2563
|
-
let parent = node === null || node === void 0 ? void 0 : node.parentNode;
|
|
2564
|
-
while (!!parent && parent !== currentPageNode) {
|
|
2565
|
-
if ((_b = parent === null || parent === void 0 ? void 0 : parent._instance) === null || _b === void 0 ? void 0 : _b.scroller) {
|
|
2566
|
-
scroller = parent._instance.scroller;
|
|
2567
|
-
break;
|
|
2568
|
-
}
|
|
2569
|
-
parent = parent === null || parent === void 0 ? void 0 : parent.parentNode;
|
|
2570
|
-
}
|
|
2571
|
-
scroller = getPageScrollerOrNode(scroller, page);
|
|
2572
|
-
const { yOffset } = scroller.currentOffset();
|
|
2573
|
-
if (areaInfo) {
|
|
2574
|
-
scrollValue = areaInfo.globalPosition.y + yOffset + pxTransformHelper(offsetTop, 'px', true);
|
|
2575
|
-
}
|
|
2576
|
-
}
|
|
2577
|
-
const { xOffset } = scroller.currentOffset();
|
|
2578
|
-
if (scrollValue === -1) {
|
|
2579
|
-
return callAsyncFail(reject, { errMsg: 'pageScrollTo:fail, 请检查传入的 scrollTop 或 selector 是否合法' }, options);
|
|
2580
|
-
}
|
|
2581
|
-
try {
|
|
2582
|
-
scroller.scrollTo({
|
|
2583
|
-
xOffset,
|
|
2584
|
-
yOffset: scrollValue,
|
|
2585
|
-
animation: {
|
|
2586
|
-
duration: duration,
|
|
2587
|
-
// @ts-ignore
|
|
2588
|
-
curve: Curve.Linear
|
|
2589
|
-
}
|
|
2590
|
-
});
|
|
2591
|
-
setTimeout(() => {
|
|
2592
|
-
callAsyncSuccess(resolve, res, options);
|
|
2593
|
-
}, duration);
|
|
2594
|
-
}
|
|
2595
|
-
catch (_) {
|
|
2596
|
-
callAsyncFail(reject, error, options);
|
|
2597
|
-
}
|
|
2598
|
-
}));
|
|
2599
|
-
};
|
|
3008
|
+
// 支付
|
|
3009
|
+
const requestPayment = /* @__PURE__ */ temporarilyNotSupport('requestPayment');
|
|
3010
|
+
const requestPluginPayment = /* @__PURE__ */ temporarilyNotSupport('requestPluginPayment');
|
|
3011
|
+
const requestOrderPayment = /* @__PURE__ */ temporarilyNotSupport('requestOrderPayment');
|
|
2600
3012
|
|
|
2601
|
-
const launchOptions = {
|
|
2602
|
-
path: '',
|
|
2603
|
-
query: {},
|
|
2604
|
-
scene: 0,
|
|
2605
|
-
shareTicket: '',
|
|
2606
|
-
referrerInfo: {}
|
|
2607
|
-
};
|
|
2608
|
-
function initLaunchOptions(options = {}) {
|
|
2609
|
-
Object.assign(launchOptions, options);
|
|
2610
|
-
}
|
|
2611
|
-
eventCenter.once('__taroRouterLaunch', initLaunchOptions);
|
|
2612
3013
|
const TARO_TABBAR_PAGE_PATH = 'taro_tabbar';
|
|
2613
3014
|
function isTabPage(url) {
|
|
2614
3015
|
var _a, _b;
|
|
@@ -2624,9 +3025,6 @@ function parseURL(raw = '') {
|
|
|
2624
3025
|
}
|
|
2625
3026
|
return [url, query];
|
|
2626
3027
|
}
|
|
2627
|
-
// 生命周期
|
|
2628
|
-
const getLaunchOptionsSync = () => launchOptions;
|
|
2629
|
-
const getEnterOptionsSync = () => launchOptions;
|
|
2630
3028
|
const getRouterFunc = (method) => {
|
|
2631
3029
|
const methodName = method === 'navigateTo' ? 'pushUrl' : 'replaceUrl';
|
|
2632
3030
|
return function (options) {
|
|
@@ -2707,6 +3105,37 @@ const getState = () => {
|
|
|
2707
3105
|
return router.getState();
|
|
2708
3106
|
};
|
|
2709
3107
|
|
|
3108
|
+
// 转发
|
|
3109
|
+
/** 更新转发属性 */
|
|
3110
|
+
const updateShareMenu = /* @__PURE__ */ temporarilyNotSupport('updateShareMenu');
|
|
3111
|
+
/** 显示当前页面的转发按钮 */
|
|
3112
|
+
const showShareMenu = /* @__PURE__ */ temporarilyNotSupport('showShareMenu');
|
|
3113
|
+
/** 打开分享图片弹窗,可以将图片发送给朋友、收藏或下载 */
|
|
3114
|
+
const showShareImageMenu = /* @__PURE__ */ temporarilyNotSupport('showShareImageMenu');
|
|
3115
|
+
/** 转发视频到聊天 */
|
|
3116
|
+
const shareVideoMessage = /* @__PURE__ */ temporarilyNotSupport('shareVideoMessage');
|
|
3117
|
+
/** 转发文件到聊天 */
|
|
3118
|
+
const shareFileMessage = /* @__PURE__ */ temporarilyNotSupport('shareFileMessage');
|
|
3119
|
+
/** 监听用户点击右上角菜单的「复制链接」按钮时触发的事件 */
|
|
3120
|
+
const onCopyUrl = /* @__PURE__ */ temporarilyNotSupport('onCopyUrl');
|
|
3121
|
+
/** 移除用户点击右上角菜单的「复制链接」按钮时触发的事件的监听函数 */
|
|
3122
|
+
const offCopyUrl = /* @__PURE__ */ temporarilyNotSupport('offCopyUrl');
|
|
3123
|
+
/** 隐藏当前页面的转发按钮 */
|
|
3124
|
+
const hideShareMenu = /* @__PURE__ */ temporarilyNotSupport('hideShareMenu');
|
|
3125
|
+
/** 获取转发详细信息 */
|
|
3126
|
+
const getShareInfo = /* @__PURE__ */ temporarilyNotSupport('getShareInfo');
|
|
3127
|
+
/** 验证私密消息。 */
|
|
3128
|
+
const authPrivateMessage = /* @__PURE__ */ permanentlyNotSupport('authPrivateMessage');
|
|
3129
|
+
|
|
3130
|
+
// 周期性更新
|
|
3131
|
+
const setBackgroundFetchToken = /* @__PURE__ */ temporarilyNotSupport('setBackgroundFetchToken');
|
|
3132
|
+
const onBackgroundFetchData = /* @__PURE__ */ temporarilyNotSupport('onBackgroundFetchData');
|
|
3133
|
+
const getBackgroundFetchToken = /* @__PURE__ */ temporarilyNotSupport('getBackgroundFetchToken');
|
|
3134
|
+
const getBackgroundFetchData = /* @__PURE__ */ temporarilyNotSupport('getBackgroundFetchData');
|
|
3135
|
+
|
|
3136
|
+
// 周期性更新
|
|
3137
|
+
const createCacheManager = /* @__PURE__ */ temporarilyNotSupport('createCacheManager');
|
|
3138
|
+
|
|
2710
3139
|
const preferencesPromise = Current.contextPromise
|
|
2711
3140
|
.then((context) => {
|
|
2712
3141
|
return bundleManager
|
|
@@ -2802,135 +3231,18 @@ function clearStorage(options) {
|
|
|
2802
3231
|
}));
|
|
2803
3232
|
});
|
|
2804
3233
|
}
|
|
3234
|
+
const getStorageInfoSync = temporarilyNotSupport('getStorageInfoSync');
|
|
3235
|
+
const getStorageInfo = temporarilyNotSupport('getStorageInfo');
|
|
2805
3236
|
const getStorageSync = temporarilyNotSupport('getStorageSync', 'getStorage');
|
|
2806
3237
|
const setStorageSync = temporarilyNotSupport('setStorageSync', 'setStorage');
|
|
2807
3238
|
const clearStorageSync = temporarilyNotSupport('clearStorageSync', 'clearStorage');
|
|
2808
3239
|
const removeStorageSync = temporarilyNotSupport('removeStorageSync', 'removeStorage');
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
const
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
const taro = Current.taro;
|
|
2816
|
-
const page = taro.getCurrentInstance().page;
|
|
2817
|
-
const currentData = ((_a = page._data) === null || _a === void 0 ? void 0 : _a.taroTabBar) || page.tabBar;
|
|
2818
|
-
const res = { errMsg: `${type}TabBar:ok` };
|
|
2819
|
-
const error = { errMsg: `${type}TabBar:fail not TabBar page` };
|
|
2820
|
-
if (!currentData) {
|
|
2821
|
-
callAsyncFail(reject, error, options);
|
|
2822
|
-
}
|
|
2823
|
-
else {
|
|
2824
|
-
const isShow = type === 'show';
|
|
2825
|
-
const event = isShow ? '__taroShowTabBar' : '__taroHideTabBar';
|
|
2826
|
-
eventCenter.trigger(event, {
|
|
2827
|
-
animation: options === null || options === void 0 ? void 0 : options.animation,
|
|
2828
|
-
});
|
|
2829
|
-
(_b = page.$set) === null || _b === void 0 ? void 0 : _b.call(page, 'isShowTaroTabBar', isShow);
|
|
2830
|
-
callAsyncSuccess(resolve, res, options);
|
|
2831
|
-
}
|
|
2832
|
-
});
|
|
2833
|
-
};
|
|
2834
|
-
};
|
|
2835
|
-
const showTabBar = toggleTabBar('show');
|
|
2836
|
-
const hideTabBar = toggleTabBar('hide');
|
|
2837
|
-
const setTabBarStyle = function (options = {}) {
|
|
2838
|
-
return new Promise((resolve, reject) => {
|
|
2839
|
-
var _a, _b;
|
|
2840
|
-
const taro = Current.taro;
|
|
2841
|
-
const page = taro.getCurrentInstance().page;
|
|
2842
|
-
const currentData = ((_a = page._data) === null || _a === void 0 ? void 0 : _a.taroTabBar) || page.tabBar;
|
|
2843
|
-
const res = { errMsg: 'setTabBarStyle:ok' };
|
|
2844
|
-
const error = { errMsg: 'setTabBarStyle:fail not TabBar page' };
|
|
2845
|
-
if (!currentData) {
|
|
2846
|
-
callAsyncFail(reject, error, options);
|
|
2847
|
-
}
|
|
2848
|
-
else {
|
|
2849
|
-
const data = Object.assign({}, currentData);
|
|
2850
|
-
if (options.color)
|
|
2851
|
-
data.color = options.color;
|
|
2852
|
-
if (options.selectedColor)
|
|
2853
|
-
data.selectedColor = options.selectedColor;
|
|
2854
|
-
if (options.backgroundColor)
|
|
2855
|
-
data.backgroundColor = options.backgroundColor;
|
|
2856
|
-
if (options.borderStyle)
|
|
2857
|
-
data.borderStyle = options.borderStyle;
|
|
2858
|
-
eventCenter.trigger('__taroSetTabBarStyle', options);
|
|
2859
|
-
(_b = page.$set) === null || _b === void 0 ? void 0 : _b.call(page, 'taroTabBar', data);
|
|
2860
|
-
callAsyncSuccess(resolve, res, options);
|
|
2861
|
-
}
|
|
2862
|
-
});
|
|
2863
|
-
};
|
|
2864
|
-
const setTabBarItem = function (options) {
|
|
2865
|
-
return new Promise((resolve, reject) => {
|
|
2866
|
-
var _a, _b;
|
|
2867
|
-
const taro = Current.taro;
|
|
2868
|
-
const page = taro.getCurrentInstance().page;
|
|
2869
|
-
const currentData = ((_a = page._data) === null || _a === void 0 ? void 0 : _a.taroTabBar) || page.tabBar;
|
|
2870
|
-
const res = { errMsg: 'setTabBarItem:ok' };
|
|
2871
|
-
const error = { errMsg: 'setTabBarItem:fail not TabBar page' };
|
|
2872
|
-
if (!currentData) {
|
|
2873
|
-
callAsyncFail(reject, error, options);
|
|
2874
|
-
}
|
|
2875
|
-
else {
|
|
2876
|
-
const index = options.index;
|
|
2877
|
-
const item = Object.assign({}, currentData.list[index]);
|
|
2878
|
-
if (options.text)
|
|
2879
|
-
item.text = options.text;
|
|
2880
|
-
if (options.iconPath)
|
|
2881
|
-
item.iconPath = options.iconPath;
|
|
2882
|
-
if (options.selectedIconPath)
|
|
2883
|
-
item.selectedIconPath = options.selectedIconPath;
|
|
2884
|
-
const list = [
|
|
2885
|
-
...currentData.list.slice(0, index),
|
|
2886
|
-
item,
|
|
2887
|
-
...currentData.list.slice(index + 1)
|
|
2888
|
-
];
|
|
2889
|
-
const data = Object.assign({}, currentData, { list });
|
|
2890
|
-
eventCenter.trigger('__taroSetTabBarItem', options);
|
|
2891
|
-
(_b = page.$set) === null || _b === void 0 ? void 0 : _b.call(page, 'taroTabBar', data);
|
|
2892
|
-
callAsyncSuccess(resolve, res, options);
|
|
2893
|
-
}
|
|
2894
|
-
});
|
|
2895
|
-
};
|
|
2896
|
-
function showTabBarRedDot(options) {
|
|
2897
|
-
const res = { errMsg: 'showTabBarRedDot:ok' };
|
|
2898
|
-
return new Promise((resolve) => {
|
|
2899
|
-
eventCenter.trigger('__taroShowTabBarRedDotHandler', {
|
|
2900
|
-
index: (options === null || options === void 0 ? void 0 : options.index) || 0,
|
|
2901
|
-
});
|
|
2902
|
-
callAsyncSuccess(resolve, res, options);
|
|
2903
|
-
});
|
|
2904
|
-
}
|
|
2905
|
-
function hideTabBarRedDot(options) {
|
|
2906
|
-
const res = { errMsg: 'hideTabBarRedDot:ok' };
|
|
2907
|
-
return new Promise((resolve) => {
|
|
2908
|
-
eventCenter.trigger('__taroHideTabBarRedDotHandler', {
|
|
2909
|
-
index: (options === null || options === void 0 ? void 0 : options.index) || 0,
|
|
2910
|
-
});
|
|
2911
|
-
callAsyncSuccess(resolve, res, options);
|
|
2912
|
-
});
|
|
2913
|
-
}
|
|
2914
|
-
function setTabBarBadge(options) {
|
|
2915
|
-
const res = { errMsg: 'setTabBarBadge:ok' };
|
|
2916
|
-
return new Promise((resolve) => {
|
|
2917
|
-
const text = (options === null || options === void 0 ? void 0 : options.text) || '';
|
|
2918
|
-
eventCenter.trigger('__taroSetTabBarBadge', {
|
|
2919
|
-
index: (options === null || options === void 0 ? void 0 : options.index) || 0,
|
|
2920
|
-
text: text.replace(/[\u0391-\uFFE5]/g, 'aa').length > 4 ? '...' : text,
|
|
2921
|
-
});
|
|
2922
|
-
callAsyncSuccess(resolve, res, options);
|
|
2923
|
-
});
|
|
2924
|
-
}
|
|
2925
|
-
function removeTabBarBadge(options) {
|
|
2926
|
-
const res = { errMsg: 'removeTabBarBadge:ok' };
|
|
2927
|
-
return new Promise((resolve) => {
|
|
2928
|
-
eventCenter.trigger('__taroRemoveTabBarBadge', {
|
|
2929
|
-
index: (options === null || options === void 0 ? void 0 : options.index) || 0,
|
|
2930
|
-
});
|
|
2931
|
-
callAsyncSuccess(resolve, res, options);
|
|
2932
|
-
});
|
|
2933
|
-
}
|
|
3240
|
+
const createBufferURL = /* @__PURE__ */ temporarilyNotSupport('createBufferURL');
|
|
3241
|
+
const revokeBufferURL = /* @__PURE__ */ temporarilyNotSupport('revokeBufferURL');
|
|
3242
|
+
const batchSetStorageSync = /* @__PURE__ */ temporarilyNotSupport('batchSetStorageSync');
|
|
3243
|
+
const batchSetStorage = /* @__PURE__ */ temporarilyNotSupport('batchSetStorage');
|
|
3244
|
+
const batchGetStorageSync = /* @__PURE__ */ temporarilyNotSupport('batchGetStorageSync');
|
|
3245
|
+
const batchGetStorage = /* @__PURE__ */ temporarilyNotSupport('batchGetStorage');
|
|
2934
3246
|
|
|
2935
3247
|
class Animation {
|
|
2936
3248
|
constructor({ duration = 400, delay = 0, timingFunction = 'linear', transformOrigin = '50% 50% 0', unit = 'px' } = {}) {
|
|
@@ -3079,13 +3391,11 @@ class Animation {
|
|
|
3079
3391
|
}
|
|
3080
3392
|
}
|
|
3081
3393
|
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
// return window.getTopWindow(context)
|
|
3088
|
-
// })
|
|
3394
|
+
const createAnimation = (option) => {
|
|
3395
|
+
return new Animation(option);
|
|
3396
|
+
};
|
|
3397
|
+
|
|
3398
|
+
const setBackgroundTextStyle = /* @__PURE__ */ temporarilyNotSupport('setBackgroundTextStyle');
|
|
3089
3399
|
function setBackgroundColor(options) {
|
|
3090
3400
|
const { success, fail, complete } = options || {};
|
|
3091
3401
|
const handle = new MethodHandler({ name: 'setBackgroundColor', success, fail, complete });
|
|
@@ -3094,18 +3404,19 @@ function setBackgroundColor(options) {
|
|
|
3094
3404
|
backgroundColor: options.backgroundColor || options.backgroundColorTop || options.backgroundColorBottom,
|
|
3095
3405
|
});
|
|
3096
3406
|
return handle.success({}, { resolve, reject });
|
|
3097
|
-
// windowClassPromise.then(windowClass => {
|
|
3098
|
-
// windowClass.setBackgroundColor(color).then(() => {
|
|
3099
|
-
// const res = { errMsg: 'setBackgroundColor:ok' }
|
|
3100
|
-
// callAsyncSuccess(resolve, res, options)
|
|
3101
|
-
// }, (error) => {
|
|
3102
|
-
// const res = { errMsg: 'setBackgroundColor:fail' + error }
|
|
3103
|
-
// callAsyncFail(reject, res, options)
|
|
3104
|
-
// })
|
|
3105
|
-
// })
|
|
3106
3407
|
});
|
|
3107
3408
|
}
|
|
3108
3409
|
|
|
3410
|
+
// 自定义组件
|
|
3411
|
+
const nextTick = (cb, ctx) => {
|
|
3412
|
+
setTimeout(function () {
|
|
3413
|
+
ctx ? cb.call(ctx) : cb();
|
|
3414
|
+
}, 1);
|
|
3415
|
+
};
|
|
3416
|
+
|
|
3417
|
+
// 字体
|
|
3418
|
+
const loadFontFace = /* @__PURE__ */ temporarilyNotSupport('getMenuButtonBoundingClientRect');
|
|
3419
|
+
|
|
3109
3420
|
const resCallback = (res) => {
|
|
3110
3421
|
return { errMsg: `${res}:ok` };
|
|
3111
3422
|
};
|
|
@@ -3235,32 +3546,64 @@ function hideToast(options) {
|
|
|
3235
3546
|
}
|
|
3236
3547
|
const showLoading = temporarilyNotSupport('showLoading');
|
|
3237
3548
|
const hideLoading = temporarilyNotSupport('hideLoading');
|
|
3549
|
+
const enableAlertBeforeUnload = /* @__PURE__ */ temporarilyNotSupport('enableAlertBeforeUnload');
|
|
3550
|
+
const disableAlertBeforeUnload = /* @__PURE__ */ temporarilyNotSupport('disableAlertBeforeUnload');
|
|
3551
|
+
|
|
3552
|
+
// 菜单
|
|
3553
|
+
const getMenuButtonBoundingClientRect = /* @__PURE__ */ temporarilyNotSupport('getMenuButtonBoundingClientRect');
|
|
3238
3554
|
|
|
3239
3555
|
const setNavigationBarTitle = function (options) {
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3556
|
+
const { success, fail, complete } = options || {};
|
|
3557
|
+
const handle = new MethodHandler({ name: 'setNavigationBarTitle', success, fail, complete });
|
|
3558
|
+
return new Promise((resolve, reject) => {
|
|
3559
|
+
eventCenter.trigger('__taroNavigationStyle', {
|
|
3560
|
+
title: options.title,
|
|
3561
|
+
});
|
|
3562
|
+
return handle.success({}, { resolve, reject });
|
|
3247
3563
|
});
|
|
3248
3564
|
};
|
|
3249
3565
|
const setNavigationBarColor = function (options) {
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3566
|
+
const { success, fail, complete } = options || {};
|
|
3567
|
+
const handle = new MethodHandler({ name: 'setNavigationBarTitle', success, fail, complete });
|
|
3568
|
+
return new Promise((resolve, reject) => {
|
|
3569
|
+
eventCenter.trigger('__taroNavigationStyle', {
|
|
3570
|
+
animation: options.animation,
|
|
3571
|
+
backgroundColor: options.backgroundColor,
|
|
3572
|
+
frontColor: options.frontColor,
|
|
3573
|
+
});
|
|
3574
|
+
return handle.success({}, { resolve, reject });
|
|
3575
|
+
});
|
|
3576
|
+
};
|
|
3577
|
+
const showNavigationBarLoading = function (options) {
|
|
3578
|
+
const { success, fail, complete } = options || {};
|
|
3579
|
+
const handle = new MethodHandler({ name: 'showNavigationBarLoading', success, fail, complete });
|
|
3580
|
+
return new Promise((resolve, reject) => {
|
|
3581
|
+
eventCenter.trigger('__taroNavigationStyle', {
|
|
3582
|
+
loading: true,
|
|
3583
|
+
});
|
|
3584
|
+
return handle.success({}, { resolve, reject });
|
|
3585
|
+
});
|
|
3586
|
+
};
|
|
3587
|
+
const hideNavigationBarLoading = function (options) {
|
|
3588
|
+
const { success, fail, complete } = options || {};
|
|
3589
|
+
const handle = new MethodHandler({ name: 'hideNavigationBarLoading', success, fail, complete });
|
|
3590
|
+
return new Promise((resolve, reject) => {
|
|
3591
|
+
eventCenter.trigger('__taroNavigationStyle', {
|
|
3592
|
+
loading: false,
|
|
3593
|
+
});
|
|
3594
|
+
return handle.success({}, { resolve, reject });
|
|
3595
|
+
});
|
|
3596
|
+
};
|
|
3597
|
+
const hideHomeButton = function (options) {
|
|
3598
|
+
const { success, fail, complete } = options || {};
|
|
3599
|
+
const handle = new MethodHandler({ name: 'hideHomeButton', success, fail, complete });
|
|
3600
|
+
return new Promise((resolve, reject) => {
|
|
3601
|
+
eventCenter.trigger('__taroNavigationStyle', {
|
|
3602
|
+
home: false,
|
|
3603
|
+
});
|
|
3604
|
+
return handle.success({}, { resolve, reject });
|
|
3259
3605
|
});
|
|
3260
3606
|
};
|
|
3261
|
-
const showNavigationBarLoading = temporarilyNotSupport('showNavigationBarLoading');
|
|
3262
|
-
const hideNavigationBarLoading = temporarilyNotSupport('hideNavigationBarLoading');
|
|
3263
|
-
const hideHomeButton = temporarilyNotSupport('hideHomeButton');
|
|
3264
3607
|
|
|
3265
3608
|
const startPullDownRefresh = function (options) {
|
|
3266
3609
|
return new Promise(resolve => {
|
|
@@ -3297,12 +3640,223 @@ const stopPullDownRefresh = function (options) {
|
|
|
3297
3640
|
});
|
|
3298
3641
|
};
|
|
3299
3642
|
|
|
3300
|
-
|
|
3301
|
-
|
|
3643
|
+
/**
|
|
3644
|
+
* 将页面滚动到目标位置
|
|
3645
|
+
*/
|
|
3646
|
+
const pageScrollTo = (options) => {
|
|
3647
|
+
const { scrollTop, selector = '', duration = 300, offsetTop = 0, success, fail, complete } = options || {};
|
|
3648
|
+
const handle = new MethodHandler({ name: 'pageScrollTo', success, fail, complete });
|
|
3649
|
+
// eslint-disable-next-line no-async-promise-executor
|
|
3650
|
+
return new Promise((resolve, reject) => __awaiter(void 0, void 0, void 0, function* () {
|
|
3651
|
+
if (scrollTop === undefined && !selector) {
|
|
3652
|
+
return handle.fail({
|
|
3653
|
+
errMsg: 'scrollTop" 或 "selector" 需要其之一'
|
|
3654
|
+
}, { resolve, reject });
|
|
3655
|
+
}
|
|
3656
|
+
if (scrollTop && selector) {
|
|
3657
|
+
console.warn('"scrollTop" 或 "selector" 建议只设一个值,全部设置会忽略selector');
|
|
3658
|
+
}
|
|
3659
|
+
const taro = Current.taro;
|
|
3660
|
+
const page = taro.getCurrentInstance().page;
|
|
3661
|
+
let scrollValue = -1;
|
|
3662
|
+
let scroller = page.scroller;
|
|
3663
|
+
const currentPageNode = getPageScrollerOrNode(page.node, page);
|
|
3664
|
+
if (scrollTop || typeof scrollTop === 'number') {
|
|
3665
|
+
scrollValue = scrollTop;
|
|
3666
|
+
}
|
|
3667
|
+
else if (selector) {
|
|
3668
|
+
const node = findChildNodeWithDFS(currentPageNode, selector);
|
|
3669
|
+
if (!node)
|
|
3670
|
+
return;
|
|
3671
|
+
// 获取 areaInfo,需要先调用 setNodeEventCallbackAndTriggerComponentUpdate 更新一次组件并获取组件信息
|
|
3672
|
+
yield setNodeEventCallbackAndTriggerComponentUpdate(node, AREA_CHANGE_EVENT_NAME, null, true);
|
|
3673
|
+
const { areaInfo } = node._nodeInfo || {};
|
|
3674
|
+
let parent = node === null || node === void 0 ? void 0 : node.parentNode;
|
|
3675
|
+
while (!!parent && parent !== currentPageNode) {
|
|
3676
|
+
if (parent === null || parent === void 0 ? void 0 : parent.scroller) {
|
|
3677
|
+
scroller = parent.scroller;
|
|
3678
|
+
break;
|
|
3679
|
+
}
|
|
3680
|
+
parent = parent === null || parent === void 0 ? void 0 : parent.parentNode;
|
|
3681
|
+
}
|
|
3682
|
+
scroller = getPageScrollerOrNode(scroller, page);
|
|
3683
|
+
const { yOffset } = scroller.currentOffset();
|
|
3684
|
+
if (areaInfo) {
|
|
3685
|
+
scrollValue = areaInfo.globalPosition.y + yOffset + pxTransformHelper(offsetTop, 'px', true);
|
|
3686
|
+
}
|
|
3687
|
+
}
|
|
3688
|
+
const { xOffset } = scroller.currentOffset();
|
|
3689
|
+
if (scrollValue === -1) {
|
|
3690
|
+
return handle.fail({
|
|
3691
|
+
errMsg: '请检查传入的 scrollTop 或 selector 是否合法'
|
|
3692
|
+
}, { resolve, reject });
|
|
3693
|
+
}
|
|
3694
|
+
try {
|
|
3695
|
+
scroller.scrollTo({
|
|
3696
|
+
xOffset,
|
|
3697
|
+
yOffset: scrollValue,
|
|
3698
|
+
animation: {
|
|
3699
|
+
duration: duration,
|
|
3700
|
+
// @ts-ignore
|
|
3701
|
+
curve: Curve.Linear
|
|
3702
|
+
}
|
|
3703
|
+
});
|
|
3704
|
+
setTimeout(() => {
|
|
3705
|
+
handle.success({}, { resolve, reject });
|
|
3706
|
+
}, duration);
|
|
3707
|
+
}
|
|
3708
|
+
catch (err) {
|
|
3709
|
+
return handle.fail({
|
|
3710
|
+
errMsg: err.message
|
|
3711
|
+
}, { resolve, reject });
|
|
3712
|
+
}
|
|
3713
|
+
}));
|
|
3302
3714
|
};
|
|
3303
|
-
const getMenuButtonBoundingClientRect = temporarilyNotSupport('getMenuButtonBoundingClientRect');
|
|
3304
3715
|
|
|
3305
|
-
//
|
|
3716
|
+
// 置顶
|
|
3717
|
+
const setTopBarText = /* @__PURE__ */ temporarilyNotSupport('setTopBarText');
|
|
3718
|
+
|
|
3719
|
+
const toggleTabBar = function (type) {
|
|
3720
|
+
return function (options) {
|
|
3721
|
+
return new Promise((resolve, reject) => {
|
|
3722
|
+
var _a, _b;
|
|
3723
|
+
const taro = Current.taro;
|
|
3724
|
+
const page = taro.getCurrentInstance().page;
|
|
3725
|
+
const currentData = ((_a = page._data) === null || _a === void 0 ? void 0 : _a.taroTabBar) || page.tabBar;
|
|
3726
|
+
const res = { errMsg: `${type}TabBar:ok` };
|
|
3727
|
+
const error = { errMsg: `${type}TabBar:fail not TabBar page` };
|
|
3728
|
+
if (!currentData) {
|
|
3729
|
+
callAsyncFail(reject, error, options);
|
|
3730
|
+
}
|
|
3731
|
+
else {
|
|
3732
|
+
const isShow = type === 'show';
|
|
3733
|
+
const event = isShow ? '__taroShowTabBar' : '__taroHideTabBar';
|
|
3734
|
+
eventCenter.trigger(event, {
|
|
3735
|
+
animation: options === null || options === void 0 ? void 0 : options.animation,
|
|
3736
|
+
});
|
|
3737
|
+
(_b = page.$set) === null || _b === void 0 ? void 0 : _b.call(page, 'isShowTaroTabBar', isShow);
|
|
3738
|
+
callAsyncSuccess(resolve, res, options);
|
|
3739
|
+
}
|
|
3740
|
+
});
|
|
3741
|
+
};
|
|
3742
|
+
};
|
|
3743
|
+
const showTabBar = toggleTabBar('show');
|
|
3744
|
+
const hideTabBar = toggleTabBar('hide');
|
|
3745
|
+
const setTabBarStyle = function (options = {}) {
|
|
3746
|
+
return new Promise((resolve, reject) => {
|
|
3747
|
+
var _a, _b;
|
|
3748
|
+
const taro = Current.taro;
|
|
3749
|
+
const page = taro.getCurrentInstance().page;
|
|
3750
|
+
const currentData = ((_a = page._data) === null || _a === void 0 ? void 0 : _a.taroTabBar) || page.tabBar;
|
|
3751
|
+
const res = { errMsg: 'setTabBarStyle:ok' };
|
|
3752
|
+
const error = { errMsg: 'setTabBarStyle:fail not TabBar page' };
|
|
3753
|
+
if (!currentData) {
|
|
3754
|
+
callAsyncFail(reject, error, options);
|
|
3755
|
+
}
|
|
3756
|
+
else {
|
|
3757
|
+
const data = Object.assign({}, currentData);
|
|
3758
|
+
if (options.color)
|
|
3759
|
+
data.color = options.color;
|
|
3760
|
+
if (options.selectedColor)
|
|
3761
|
+
data.selectedColor = options.selectedColor;
|
|
3762
|
+
if (options.backgroundColor)
|
|
3763
|
+
data.backgroundColor = options.backgroundColor;
|
|
3764
|
+
if (options.borderStyle)
|
|
3765
|
+
data.borderStyle = options.borderStyle;
|
|
3766
|
+
eventCenter.trigger('__taroSetTabBarStyle', options);
|
|
3767
|
+
(_b = page.$set) === null || _b === void 0 ? void 0 : _b.call(page, 'taroTabBar', data);
|
|
3768
|
+
callAsyncSuccess(resolve, res, options);
|
|
3769
|
+
}
|
|
3770
|
+
});
|
|
3771
|
+
};
|
|
3772
|
+
const setTabBarItem = function (options) {
|
|
3773
|
+
return new Promise((resolve, reject) => {
|
|
3774
|
+
var _a, _b;
|
|
3775
|
+
const taro = Current.taro;
|
|
3776
|
+
const page = taro.getCurrentInstance().page;
|
|
3777
|
+
const currentData = ((_a = page._data) === null || _a === void 0 ? void 0 : _a.taroTabBar) || page.tabBar;
|
|
3778
|
+
const res = { errMsg: 'setTabBarItem:ok' };
|
|
3779
|
+
const error = { errMsg: 'setTabBarItem:fail not TabBar page' };
|
|
3780
|
+
if (!currentData) {
|
|
3781
|
+
callAsyncFail(reject, error, options);
|
|
3782
|
+
}
|
|
3783
|
+
else {
|
|
3784
|
+
const index = options.index;
|
|
3785
|
+
const item = Object.assign({}, currentData.list[index]);
|
|
3786
|
+
if (options.text)
|
|
3787
|
+
item.text = options.text;
|
|
3788
|
+
if (options.iconPath)
|
|
3789
|
+
item.iconPath = options.iconPath;
|
|
3790
|
+
if (options.selectedIconPath)
|
|
3791
|
+
item.selectedIconPath = options.selectedIconPath;
|
|
3792
|
+
const list = [
|
|
3793
|
+
...currentData.list.slice(0, index),
|
|
3794
|
+
item,
|
|
3795
|
+
...currentData.list.slice(index + 1)
|
|
3796
|
+
];
|
|
3797
|
+
const data = Object.assign({}, currentData, { list });
|
|
3798
|
+
eventCenter.trigger('__taroSetTabBarItem', options);
|
|
3799
|
+
(_b = page.$set) === null || _b === void 0 ? void 0 : _b.call(page, 'taroTabBar', data);
|
|
3800
|
+
callAsyncSuccess(resolve, res, options);
|
|
3801
|
+
}
|
|
3802
|
+
});
|
|
3803
|
+
};
|
|
3804
|
+
function showTabBarRedDot(options) {
|
|
3805
|
+
const res = { errMsg: 'showTabBarRedDot:ok' };
|
|
3806
|
+
return new Promise((resolve) => {
|
|
3807
|
+
eventCenter.trigger('__taroShowTabBarRedDotHandler', {
|
|
3808
|
+
index: (options === null || options === void 0 ? void 0 : options.index) || 0,
|
|
3809
|
+
});
|
|
3810
|
+
callAsyncSuccess(resolve, res, options);
|
|
3811
|
+
});
|
|
3812
|
+
}
|
|
3813
|
+
function hideTabBarRedDot(options) {
|
|
3814
|
+
const res = { errMsg: 'hideTabBarRedDot:ok' };
|
|
3815
|
+
return new Promise((resolve) => {
|
|
3816
|
+
eventCenter.trigger('__taroHideTabBarRedDotHandler', {
|
|
3817
|
+
index: (options === null || options === void 0 ? void 0 : options.index) || 0,
|
|
3818
|
+
});
|
|
3819
|
+
callAsyncSuccess(resolve, res, options);
|
|
3820
|
+
});
|
|
3821
|
+
}
|
|
3822
|
+
function setTabBarBadge(options) {
|
|
3823
|
+
const res = { errMsg: 'setTabBarBadge:ok' };
|
|
3824
|
+
return new Promise((resolve) => {
|
|
3825
|
+
const text = (options === null || options === void 0 ? void 0 : options.text) || '';
|
|
3826
|
+
eventCenter.trigger('__taroSetTabBarBadge', {
|
|
3827
|
+
index: (options === null || options === void 0 ? void 0 : options.index) || 0,
|
|
3828
|
+
text: text.replace(/[\u0391-\uFFE5]/g, 'aa').length > 4 ? '...' : text,
|
|
3829
|
+
});
|
|
3830
|
+
callAsyncSuccess(resolve, res, options);
|
|
3831
|
+
});
|
|
3832
|
+
}
|
|
3833
|
+
function removeTabBarBadge(options) {
|
|
3834
|
+
const res = { errMsg: 'removeTabBarBadge:ok' };
|
|
3835
|
+
return new Promise((resolve) => {
|
|
3836
|
+
eventCenter.trigger('__taroRemoveTabBarBadge', {
|
|
3837
|
+
index: (options === null || options === void 0 ? void 0 : options.index) || 0,
|
|
3838
|
+
});
|
|
3839
|
+
callAsyncSuccess(resolve, res, options);
|
|
3840
|
+
});
|
|
3841
|
+
}
|
|
3842
|
+
|
|
3843
|
+
/**
|
|
3844
|
+
* 设置窗口大小,该接口仅适用于 PC 平台,使用细则请参见指南
|
|
3845
|
+
*/
|
|
3846
|
+
const setWindowSize = /* @__PURE__ */ temporarilyNotSupport('setWindowSize');
|
|
3847
|
+
/**
|
|
3848
|
+
* 监听窗口尺寸变化事件
|
|
3849
|
+
*/
|
|
3850
|
+
const onWindowResize = /* @__PURE__ */ temporarilyNotSupport('onWindowResize');
|
|
3851
|
+
/**
|
|
3852
|
+
* 取消监听窗口尺寸变化事件
|
|
3853
|
+
*/
|
|
3854
|
+
const offWindowResize = /* @__PURE__ */ temporarilyNotSupport('offWindowResize');
|
|
3855
|
+
const checkIsPictureInPictureActive = /* @__PURE__ */ temporarilyNotSupport('checkIsPictureInPictureActive');
|
|
3856
|
+
|
|
3857
|
+
// Worker
|
|
3858
|
+
const createWorker = /* @__PURE__ */ temporarilyNotSupport('createWorker');
|
|
3859
|
+
|
|
3306
3860
|
class IntersectionObserver {
|
|
3307
3861
|
constructor(component, options = {}) {
|
|
3308
3862
|
// 选项
|
|
@@ -3318,55 +3872,47 @@ class IntersectionObserver {
|
|
|
3318
3872
|
Object.assign(this._options, options);
|
|
3319
3873
|
}
|
|
3320
3874
|
disconnect() {
|
|
3321
|
-
var _a
|
|
3875
|
+
var _a;
|
|
3322
3876
|
if (this._observerNodes) {
|
|
3323
3877
|
if (this._observerNodes instanceof Array) {
|
|
3324
3878
|
this._observerNodes.forEach((n) => {
|
|
3325
|
-
var _a
|
|
3879
|
+
var _a;
|
|
3326
3880
|
disconnectEvent(n, VISIBLE_CHANGE_EVENT_NAME);
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
(_c = (_b = (_a = n._instance) === null || _a === void 0 ? void 0 : _a.nodeInfoMap) === null || _b === void 0 ? void 0 : _b[n._nid]) === null || _c === void 0 ? void 0 : _c.thresholds = null;
|
|
3330
|
-
}
|
|
3881
|
+
// @ts-ignore
|
|
3882
|
+
(_a = n._nodeInfo) === null || _a === void 0 ? void 0 : _a.thresholds = null;
|
|
3331
3883
|
});
|
|
3332
3884
|
}
|
|
3333
3885
|
else {
|
|
3334
3886
|
disconnectEvent(this._observerNodes, VISIBLE_CHANGE_EVENT_NAME);
|
|
3335
3887
|
// @ts-ignore
|
|
3336
|
-
if (this._observerNodes.
|
|
3888
|
+
if (this._observerNodes._nodeInfo) {
|
|
3337
3889
|
// @ts-ignore
|
|
3338
|
-
(
|
|
3890
|
+
(_a = this._observerNodes._nodeInfo) === null || _a === void 0 ? void 0 : _a.thresholds = null;
|
|
3339
3891
|
}
|
|
3340
3892
|
}
|
|
3341
3893
|
}
|
|
3342
3894
|
}
|
|
3343
3895
|
observe(targetSelector, callback) {
|
|
3896
|
+
var _a;
|
|
3344
3897
|
const { observeAll, thresholds } = this._options;
|
|
3345
3898
|
const node = findChildNodeWithDFS(this._component, targetSelector, observeAll);
|
|
3346
3899
|
this._observerNodes = node;
|
|
3347
3900
|
if (node) {
|
|
3348
3901
|
if (node instanceof Array) {
|
|
3349
3902
|
node.forEach(n => {
|
|
3903
|
+
var _a;
|
|
3350
3904
|
// @ts-ignore
|
|
3351
|
-
n.
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
(_c = (_b = (_a = n._instance) === null || _a === void 0 ? void 0 : _a.nodeInfoMap) === null || _b === void 0 ? void 0 : _b[n._nid]) === null || _c === void 0 ? void 0 : _c.thresholds = thresholds;
|
|
3355
|
-
setNodeEventCallbackAndTriggerComponentUpdate(n, VISIBLE_CHANGE_EVENT_NAME, (isVisible, currentRatio) => {
|
|
3356
|
-
callback(this.handleResult(isVisible, currentRatio));
|
|
3357
|
-
});
|
|
3905
|
+
(_a = n._nodeInfo) === null || _a === void 0 ? void 0 : _a.thresholds = thresholds;
|
|
3906
|
+
setNodeEventCallbackAndTriggerComponentUpdate(n, VISIBLE_CHANGE_EVENT_NAME, (isVisible, currentRatio) => {
|
|
3907
|
+
callback(this.handleResult(isVisible, currentRatio));
|
|
3358
3908
|
});
|
|
3359
3909
|
});
|
|
3360
3910
|
}
|
|
3361
3911
|
else {
|
|
3362
3912
|
// @ts-ignore
|
|
3363
|
-
node.
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
(_c = (_b = (_a = node._instance) === null || _a === void 0 ? void 0 : _a.nodeInfoMap) === null || _b === void 0 ? void 0 : _b[node._nid]) === null || _c === void 0 ? void 0 : _c.thresholds = thresholds;
|
|
3367
|
-
setNodeEventCallbackAndTriggerComponentUpdate(node, VISIBLE_CHANGE_EVENT_NAME, (isVisible, currentRatio) => {
|
|
3368
|
-
callback(this.handleResult(isVisible, currentRatio));
|
|
3369
|
-
});
|
|
3913
|
+
(_a = node._nodeInfo) === null || _a === void 0 ? void 0 : _a.thresholds = thresholds;
|
|
3914
|
+
setNodeEventCallbackAndTriggerComponentUpdate(node, VISIBLE_CHANGE_EVENT_NAME, (isVisible, currentRatio) => {
|
|
3915
|
+
callback(this.handleResult(isVisible, currentRatio));
|
|
3370
3916
|
});
|
|
3371
3917
|
}
|
|
3372
3918
|
}
|
|
@@ -3512,7 +4058,6 @@ function parseHandler(selector, selectAll) {
|
|
|
3512
4058
|
}
|
|
3513
4059
|
// 从 TaroNode 里找到对应的 fields 内容
|
|
3514
4060
|
function filter(fields, dom) {
|
|
3515
|
-
var _a, _b;
|
|
3516
4061
|
if (!dom)
|
|
3517
4062
|
return null;
|
|
3518
4063
|
const { id,
|
|
@@ -3549,8 +4094,7 @@ function filter(fields, dom) {
|
|
|
3549
4094
|
// TODO harmony dataset
|
|
3550
4095
|
// if (dataset) res.dataset = Object.assign({}, dom.dataset)
|
|
3551
4096
|
if (rect || size) {
|
|
3552
|
-
const
|
|
3553
|
-
const { areaInfo } = ((_b = (_a = dom === null || dom === void 0 ? void 0 : dom._instance) === null || _a === void 0 ? void 0 : _a.nodeInfoMap) === null || _b === void 0 ? void 0 : _b[id]) || {};
|
|
4097
|
+
const { areaInfo } = (dom === null || dom === void 0 ? void 0 : dom._nodeInfo) || {};
|
|
3554
4098
|
if (areaInfo) {
|
|
3555
4099
|
if (rect) {
|
|
3556
4100
|
res.top = vp2px(areaInfo.globalPosition.y);
|
|
@@ -3565,7 +4109,7 @@ function filter(fields, dom) {
|
|
|
3565
4109
|
}
|
|
3566
4110
|
}
|
|
3567
4111
|
if (scrollOffset) {
|
|
3568
|
-
const scroller = dom.
|
|
4112
|
+
const scroller = dom.scroller;
|
|
3569
4113
|
if (scroller) {
|
|
3570
4114
|
const { xOffset, yOffset } = scroller.currentOffset();
|
|
3571
4115
|
res.scrollLeft = vp2px(xOffset);
|
|
@@ -3687,109 +4231,336 @@ const createSelectorQuery = () => {
|
|
|
3687
4231
|
const createIntersectionObserver = (component, options) => {
|
|
3688
4232
|
return new IntersectionObserver(component, options);
|
|
3689
4233
|
};
|
|
4234
|
+
const createMediaQueryObserver = /* @__PURE__ */ temporarilyNotSupport('createMediaQueryObserver');
|
|
3690
4235
|
|
|
3691
4236
|
var apis = /*#__PURE__*/Object.freeze({
|
|
3692
4237
|
__proto__: null,
|
|
4238
|
+
Current: Current,
|
|
3693
4239
|
ENV_TYPE: ENV_TYPE,
|
|
3694
4240
|
Events: Events,
|
|
3695
4241
|
History: History,
|
|
4242
|
+
addCard: addCard,
|
|
4243
|
+
addFileToFavorites: addFileToFavorites,
|
|
4244
|
+
addPhoneCalendar: addPhoneCalendar,
|
|
4245
|
+
addPhoneContact: addPhoneContact,
|
|
4246
|
+
addPhoneRepeatCalendar: addPhoneRepeatCalendar,
|
|
4247
|
+
addVideoToFavorites: addVideoToFavorites,
|
|
4248
|
+
arrayBufferToBase64: arrayBufferToBase64,
|
|
4249
|
+
authPrivateMessage: authPrivateMessage,
|
|
3696
4250
|
authorize: authorize,
|
|
4251
|
+
authorizeForMiniProgram: authorizeForMiniProgram,
|
|
4252
|
+
base64ToArrayBuffer: base64ToArrayBuffer,
|
|
4253
|
+
batchGetStorage: batchGetStorage,
|
|
4254
|
+
batchGetStorageSync: batchGetStorageSync,
|
|
4255
|
+
batchSetStorage: batchSetStorage,
|
|
4256
|
+
batchSetStorageSync: batchSetStorageSync,
|
|
4257
|
+
canIUse: canIUse,
|
|
4258
|
+
canvasGetImageData: canvasGetImageData,
|
|
4259
|
+
canvasPutImageData: canvasPutImageData,
|
|
4260
|
+
canvasToTempFilePath: canvasToTempFilePath,
|
|
4261
|
+
checkIsAddedToMyMiniProgram: checkIsAddedToMyMiniProgram,
|
|
4262
|
+
checkIsOpenAccessibility: checkIsOpenAccessibility,
|
|
4263
|
+
checkIsPictureInPictureActive: checkIsPictureInPictureActive,
|
|
4264
|
+
checkIsSoterEnrolledInDevice: checkIsSoterEnrolledInDevice,
|
|
4265
|
+
checkIsSupportFacialRecognition: checkIsSupportFacialRecognition,
|
|
4266
|
+
checkIsSupportSoterAuthentication: checkIsSupportSoterAuthentication,
|
|
4267
|
+
checkSession: checkSession,
|
|
4268
|
+
chooseAddress: chooseAddress,
|
|
4269
|
+
chooseContact: chooseContact,
|
|
3697
4270
|
chooseImage: chooseImage,
|
|
4271
|
+
chooseInvoice: chooseInvoice,
|
|
4272
|
+
chooseInvoiceTitle: chooseInvoiceTitle,
|
|
4273
|
+
chooseLicensePlate: chooseLicensePlate,
|
|
4274
|
+
chooseLocation: chooseLocation,
|
|
3698
4275
|
chooseMedia: chooseMedia,
|
|
4276
|
+
choosePoi: choosePoi,
|
|
3699
4277
|
chooseVideo: chooseVideo,
|
|
3700
4278
|
clearStorage: clearStorage,
|
|
3701
4279
|
clearStorageSync: clearStorageSync,
|
|
4280
|
+
closeBLEConnection: closeBLEConnection,
|
|
4281
|
+
closeBluetoothAdapter: closeBluetoothAdapter,
|
|
3702
4282
|
compressImage: compressImage,
|
|
4283
|
+
compressVideo: compressVideo,
|
|
3703
4284
|
connectSocket: connectSocket,
|
|
4285
|
+
connectWifi: connectWifi,
|
|
3704
4286
|
createAnimation: createAnimation,
|
|
4287
|
+
createAudioContext: createAudioContext,
|
|
4288
|
+
createBLEConnection: createBLEConnection,
|
|
4289
|
+
createBLEPeripheralServer: createBLEPeripheralServer,
|
|
4290
|
+
createBufferURL: createBufferURL,
|
|
4291
|
+
createCacheManager: createCacheManager,
|
|
4292
|
+
createCameraContext: createCameraContext,
|
|
4293
|
+
createCanvasContext: createCanvasContext,
|
|
4294
|
+
createInnerAudioContext: createInnerAudioContext,
|
|
3705
4295
|
createIntersectionObserver: createIntersectionObserver,
|
|
4296
|
+
createLivePlayerContext: createLivePlayerContext,
|
|
4297
|
+
createLivePusherContext: createLivePusherContext,
|
|
4298
|
+
createMapContext: createMapContext,
|
|
4299
|
+
createMediaAudioPlayer: createMediaAudioPlayer,
|
|
4300
|
+
createMediaContainer: createMediaContainer,
|
|
4301
|
+
createMediaQueryObserver: createMediaQueryObserver,
|
|
4302
|
+
createMediaRecorder: createMediaRecorder,
|
|
4303
|
+
createOffscreenCanvas: createOffscreenCanvas,
|
|
3706
4304
|
createSelectorQuery: createSelectorQuery,
|
|
4305
|
+
createTCPSocket: createTCPSocket,
|
|
4306
|
+
createUDPSocket: createUDPSocket,
|
|
4307
|
+
createVideoContext: createVideoContext,
|
|
4308
|
+
createVideoDecoder: createVideoDecoder,
|
|
4309
|
+
createWebAudioContext: createWebAudioContext,
|
|
4310
|
+
createWorker: createWorker,
|
|
4311
|
+
disableAlertBeforeUnload: disableAlertBeforeUnload,
|
|
3707
4312
|
downloadFile: downloadFile,
|
|
4313
|
+
enableAlertBeforeUnload: enableAlertBeforeUnload,
|
|
3708
4314
|
eventCenter: eventCenter,
|
|
3709
4315
|
exitMiniProgram: exitMiniProgram,
|
|
4316
|
+
exitVoIPChat: exitVoIPChat,
|
|
4317
|
+
faceVerifyForPay: faceVerifyForPay,
|
|
3710
4318
|
getAccountInfoSync: getAccountInfoSync,
|
|
4319
|
+
getAvailableAudioSources: getAvailableAudioSources,
|
|
4320
|
+
getBLEDeviceCharacteristics: getBLEDeviceCharacteristics,
|
|
4321
|
+
getBLEDeviceRSSI: getBLEDeviceRSSI,
|
|
4322
|
+
getBLEDeviceServices: getBLEDeviceServices,
|
|
4323
|
+
getBLEMTU: getBLEMTU,
|
|
4324
|
+
getBackgroundAudioManager: getBackgroundAudioManager,
|
|
4325
|
+
getBackgroundAudioPlayerState: getBackgroundAudioPlayerState,
|
|
4326
|
+
getBackgroundFetchData: getBackgroundFetchData,
|
|
4327
|
+
getBackgroundFetchToken: getBackgroundFetchToken,
|
|
3711
4328
|
getBatteryInfo: getBatteryInfo,
|
|
3712
4329
|
getBatteryInfoSync: getBatteryInfoSync,
|
|
4330
|
+
getBeacons: getBeacons,
|
|
4331
|
+
getBluetoothAdapterState: getBluetoothAdapterState,
|
|
4332
|
+
getBluetoothDevices: getBluetoothDevices,
|
|
4333
|
+
getChannelsLiveInfo: getChannelsLiveInfo,
|
|
4334
|
+
getChannelsLiveNoticeInfo: getChannelsLiveNoticeInfo,
|
|
4335
|
+
getChannelsShareKey: getChannelsShareKey,
|
|
3713
4336
|
getClipboardData: getClipboardData,
|
|
4337
|
+
getConnectedBluetoothDevices: getConnectedBluetoothDevices,
|
|
4338
|
+
getConnectedWifi: getConnectedWifi,
|
|
3714
4339
|
getCurrentInstance: getCurrentInstance,
|
|
3715
4340
|
getCurrentPages: getCurrentPages,
|
|
4341
|
+
getDeviceVoIPList: getDeviceVoIPList,
|
|
3716
4342
|
getEnterOptionsSync: getEnterOptionsSync,
|
|
3717
4343
|
getEnv: getEnv,
|
|
4344
|
+
getExptInfoSync: getExptInfoSync,
|
|
4345
|
+
getExtConfig: getExtConfig,
|
|
4346
|
+
getExtConfigSync: getExtConfigSync,
|
|
3718
4347
|
getFileInfo: getFileInfo,
|
|
3719
4348
|
getFileSystemManager: getFileSystemManager,
|
|
4349
|
+
getFuzzyLocation: getFuzzyLocation,
|
|
4350
|
+
getGroupEnterInfo: getGroupEnterInfo,
|
|
4351
|
+
getHCEState: getHCEState,
|
|
3720
4352
|
getImageInfo: getImageInfo,
|
|
3721
4353
|
getLaunchOptionsSync: getLaunchOptionsSync,
|
|
3722
4354
|
getLength: getLength,
|
|
3723
4355
|
getLocalIPAddress: getLocalIPAddress,
|
|
3724
4356
|
getLocation: getLocation,
|
|
4357
|
+
getLogManager: getLogManager,
|
|
3725
4358
|
getMenuButtonBoundingClientRect: getMenuButtonBoundingClientRect,
|
|
4359
|
+
getNFCAdapter: getNFCAdapter,
|
|
3726
4360
|
getNetworkType: getNetworkType,
|
|
4361
|
+
getPerformance: getPerformance,
|
|
4362
|
+
getPrivacySetting: getPrivacySetting,
|
|
4363
|
+
getRandomValues: getRandomValues,
|
|
4364
|
+
getRealtimeLogManager: getRealtimeLogManager,
|
|
4365
|
+
getRecorderManager: getRecorderManager,
|
|
3727
4366
|
getSavedFileInfo: getSavedFileInfo,
|
|
3728
4367
|
getSavedFileList: getSavedFileList,
|
|
3729
4368
|
getScreenBrightness: getScreenBrightness,
|
|
3730
4369
|
getScreenRecordingState: getScreenRecordingState,
|
|
3731
4370
|
getSelectedTextRange: getSelectedTextRange,
|
|
3732
4371
|
getSetting: getSetting,
|
|
4372
|
+
getShareInfo: getShareInfo,
|
|
3733
4373
|
getState: getState,
|
|
3734
4374
|
getStorage: getStorage,
|
|
4375
|
+
getStorageInfo: getStorageInfo,
|
|
4376
|
+
getStorageInfoSync: getStorageInfoSync,
|
|
3735
4377
|
getStorageSync: getStorageSync,
|
|
3736
4378
|
getSystemInfo: getSystemInfo,
|
|
3737
4379
|
getSystemInfoSync: getSystemInfoSync,
|
|
3738
4380
|
getUpdateManager: getUpdateManager,
|
|
4381
|
+
getUserCryptoManager: getUserCryptoManager,
|
|
3739
4382
|
getUserInfo: getUserInfo,
|
|
3740
4383
|
getUserProfile: getUserProfile,
|
|
4384
|
+
getVideoInfo: getVideoInfo,
|
|
4385
|
+
getWeRunData: getWeRunData,
|
|
4386
|
+
getWifiList: getWifiList,
|
|
3741
4387
|
hideHomeButton: hideHomeButton,
|
|
3742
4388
|
hideKeyboard: hideKeyboard,
|
|
3743
4389
|
hideLoading: hideLoading,
|
|
3744
4390
|
hideNavigationBarLoading: hideNavigationBarLoading,
|
|
4391
|
+
hideShareMenu: hideShareMenu,
|
|
3745
4392
|
hideTabBar: hideTabBar,
|
|
3746
4393
|
hideTabBarRedDot: hideTabBarRedDot,
|
|
3747
4394
|
hideToast: hideToast,
|
|
4395
|
+
isBluetoothDevicePaired: isBluetoothDevicePaired,
|
|
4396
|
+
join1v1Chat: join1v1Chat,
|
|
4397
|
+
joinVoIPChat: joinVoIPChat,
|
|
4398
|
+
loadFontFace: loadFontFace,
|
|
3748
4399
|
login: login,
|
|
4400
|
+
makeBluetoothPair: makeBluetoothPair,
|
|
3749
4401
|
makePhoneCall: makePhoneCall,
|
|
3750
4402
|
navigateBack: navigateBack,
|
|
3751
4403
|
navigateBackMiniProgram: navigateBackMiniProgram,
|
|
3752
4404
|
navigateTo: navigateTo,
|
|
3753
4405
|
navigateToMiniProgram: navigateToMiniProgram,
|
|
3754
4406
|
nextTick: nextTick,
|
|
4407
|
+
notifyBLECharacteristicValueChange: notifyBLECharacteristicValueChange,
|
|
3755
4408
|
offAccelerometerChange: offAccelerometerChange,
|
|
4409
|
+
offAppHide: offAppHide,
|
|
4410
|
+
offAppShow: offAppShow,
|
|
4411
|
+
offAudioInterruptionBegin: offAudioInterruptionBegin,
|
|
4412
|
+
offAudioInterruptionEnd: offAudioInterruptionEnd,
|
|
4413
|
+
offBLECharacteristicValueChange: offBLECharacteristicValueChange,
|
|
4414
|
+
offBLEConnectionStateChange: offBLEConnectionStateChange,
|
|
4415
|
+
offBLEMTUChange: offBLEMTUChange,
|
|
4416
|
+
offBLEPeripheralConnectionStateChanged: offBLEPeripheralConnectionStateChanged,
|
|
4417
|
+
offBeaconServiceChange: offBeaconServiceChange,
|
|
4418
|
+
offBeaconUpdate: offBeaconUpdate,
|
|
4419
|
+
offBluetoothAdapterStateChange: offBluetoothAdapterStateChange,
|
|
4420
|
+
offBluetoothDeviceFound: offBluetoothDeviceFound,
|
|
4421
|
+
offCompassChange: offCompassChange,
|
|
4422
|
+
offCopyUrl: offCopyUrl,
|
|
4423
|
+
offDeviceMotionChange: offDeviceMotionChange,
|
|
4424
|
+
offError: offError,
|
|
4425
|
+
offGetWifiList: offGetWifiList,
|
|
4426
|
+
offGyroscopeChange: offGyroscopeChange,
|
|
4427
|
+
offHCEMessage: offHCEMessage,
|
|
3756
4428
|
offKeyboardHeightChange: offKeyboardHeightChange,
|
|
4429
|
+
offLazyLoadError: offLazyLoadError,
|
|
4430
|
+
offLocalServiceDiscoveryStop: offLocalServiceDiscoveryStop,
|
|
4431
|
+
offLocalServiceFound: offLocalServiceFound,
|
|
4432
|
+
offLocalServiceLost: offLocalServiceLost,
|
|
4433
|
+
offLocalServiceResolveFail: offLocalServiceResolveFail,
|
|
3757
4434
|
offLocationChange: offLocationChange,
|
|
4435
|
+
offLocationChangeError: offLocationChangeError,
|
|
3758
4436
|
offMemoryWarning: offMemoryWarning,
|
|
3759
4437
|
offNetworkStatusChange: offNetworkStatusChange,
|
|
3760
4438
|
offNetworkWeakChange: offNetworkWeakChange,
|
|
4439
|
+
offPageNotFound: offPageNotFound,
|
|
3761
4440
|
offScreenRecordingStateChanged: offScreenRecordingStateChanged,
|
|
4441
|
+
offThemeChange: offThemeChange,
|
|
4442
|
+
offUnhandledRejection: offUnhandledRejection,
|
|
3762
4443
|
offUserCaptureScreen: offUserCaptureScreen,
|
|
4444
|
+
offVoIPChatInterrupted: offVoIPChatInterrupted,
|
|
4445
|
+
offVoIPChatMembersChanged: offVoIPChatMembersChanged,
|
|
4446
|
+
offVoIPChatSpeakersChanged: offVoIPChatSpeakersChanged,
|
|
4447
|
+
offVoIPChatStateChanged: offVoIPChatStateChanged,
|
|
4448
|
+
offVoIPVideoMembersChanged: offVoIPVideoMembersChanged,
|
|
4449
|
+
offWifiConnected: offWifiConnected,
|
|
4450
|
+
offWifiConnectedWithPartialInfo: offWifiConnectedWithPartialInfo,
|
|
4451
|
+
offWindowResize: offWindowResize,
|
|
3763
4452
|
onAccelerometerChange: onAccelerometerChange,
|
|
4453
|
+
onAppHide: onAppHide,
|
|
4454
|
+
onAppShow: onAppShow,
|
|
4455
|
+
onAudioInterruptionBegin: onAudioInterruptionBegin,
|
|
4456
|
+
onAudioInterruptionEnd: onAudioInterruptionEnd,
|
|
4457
|
+
onBLECharacteristicValueChange: onBLECharacteristicValueChange,
|
|
4458
|
+
onBLEConnectionStateChange: onBLEConnectionStateChange,
|
|
4459
|
+
onBLEMTUChange: onBLEMTUChange,
|
|
4460
|
+
onBLEPeripheralConnectionStateChanged: onBLEPeripheralConnectionStateChanged,
|
|
4461
|
+
onBackgroundAudioPause: onBackgroundAudioPause,
|
|
4462
|
+
onBackgroundAudioPlay: onBackgroundAudioPlay,
|
|
4463
|
+
onBackgroundAudioStop: onBackgroundAudioStop,
|
|
4464
|
+
onBackgroundFetchData: onBackgroundFetchData,
|
|
4465
|
+
onBeaconServiceChange: onBeaconServiceChange,
|
|
4466
|
+
onBeaconUpdate: onBeaconUpdate,
|
|
4467
|
+
onBluetoothAdapterStateChange: onBluetoothAdapterStateChange,
|
|
4468
|
+
onBluetoothDeviceFound: onBluetoothDeviceFound,
|
|
4469
|
+
onCompassChange: onCompassChange,
|
|
4470
|
+
onCopyUrl: onCopyUrl,
|
|
4471
|
+
onDeviceMotionChange: onDeviceMotionChange,
|
|
4472
|
+
onError: onError,
|
|
4473
|
+
onGetWifiList: onGetWifiList,
|
|
4474
|
+
onGyroscopeChange: onGyroscopeChange,
|
|
4475
|
+
onHCEMessage: onHCEMessage,
|
|
3764
4476
|
onKeyboardHeightChange: onKeyboardHeightChange,
|
|
4477
|
+
onLazyLoadError: onLazyLoadError,
|
|
4478
|
+
onLocalServiceDiscoveryStop: onLocalServiceDiscoveryStop,
|
|
4479
|
+
onLocalServiceFound: onLocalServiceFound,
|
|
4480
|
+
onLocalServiceLost: onLocalServiceLost,
|
|
4481
|
+
onLocalServiceResolveFail: onLocalServiceResolveFail,
|
|
3765
4482
|
onLocationChange: onLocationChange,
|
|
4483
|
+
onLocationChangeError: onLocationChangeError,
|
|
3766
4484
|
onMemoryWarning: onMemoryWarning,
|
|
4485
|
+
onNeedPrivacyAuthorization: onNeedPrivacyAuthorization,
|
|
3767
4486
|
onNetworkStatusChange: onNetworkStatusChange,
|
|
3768
4487
|
onNetworkWeakChange: onNetworkWeakChange,
|
|
4488
|
+
onPageNotFound: onPageNotFound,
|
|
3769
4489
|
onScreenRecordingStateChanged: onScreenRecordingStateChanged,
|
|
4490
|
+
onThemeChange: onThemeChange,
|
|
4491
|
+
onUnhandledRejection: onUnhandledRejection,
|
|
3770
4492
|
onUserCaptureScreen: onUserCaptureScreen,
|
|
4493
|
+
onVoIPChatInterrupted: onVoIPChatInterrupted,
|
|
4494
|
+
onVoIPChatMembersChanged: onVoIPChatMembersChanged,
|
|
4495
|
+
onVoIPChatSpeakersChanged: onVoIPChatSpeakersChanged,
|
|
4496
|
+
onVoIPChatStateChanged: onVoIPChatStateChanged,
|
|
4497
|
+
onVoIPVideoMembersChanged: onVoIPVideoMembersChanged,
|
|
4498
|
+
onWifiConnected: onWifiConnected,
|
|
4499
|
+
onWifiConnectedWithPartialInfo: onWifiConnectedWithPartialInfo,
|
|
4500
|
+
onWindowResize: onWindowResize,
|
|
4501
|
+
openBluetoothAdapter: openBluetoothAdapter,
|
|
3771
4502
|
openBusinessView: openBusinessView,
|
|
4503
|
+
openCard: openCard,
|
|
4504
|
+
openChannelsActivity: openChannelsActivity,
|
|
4505
|
+
openChannelsEvent: openChannelsEvent,
|
|
4506
|
+
openChannelsLive: openChannelsLive,
|
|
4507
|
+
openChannelsUserProfile: openChannelsUserProfile,
|
|
4508
|
+
openCustomerServiceChat: openCustomerServiceChat,
|
|
3772
4509
|
openDocument: openDocument,
|
|
3773
4510
|
openEmbeddedMiniProgram: openEmbeddedMiniProgram,
|
|
4511
|
+
openLocation: openLocation,
|
|
4512
|
+
openPrivacyContract: openPrivacyContract,
|
|
3774
4513
|
openSetting: openSetting,
|
|
4514
|
+
openVideoEditor: openVideoEditor,
|
|
3775
4515
|
pageScrollTo: pageScrollTo,
|
|
4516
|
+
pauseBackgroundAudio: pauseBackgroundAudio,
|
|
4517
|
+
pauseVoice: pauseVoice,
|
|
4518
|
+
playBackgroundAudio: playBackgroundAudio,
|
|
4519
|
+
playVoice: playVoice,
|
|
4520
|
+
pluginLogin: pluginLogin,
|
|
4521
|
+
preloadAssets: preloadAssets,
|
|
4522
|
+
preloadSkylineView: preloadSkylineView,
|
|
4523
|
+
preloadWebview: preloadWebview,
|
|
3776
4524
|
previewImage: previewImage,
|
|
3777
4525
|
previewMedia: previewMedia,
|
|
3778
4526
|
reLaunch: reLaunch,
|
|
4527
|
+
readBLECharacteristicValue: readBLECharacteristicValue,
|
|
3779
4528
|
redirectTo: redirectTo,
|
|
3780
4529
|
removeSavedFile: removeSavedFile,
|
|
3781
4530
|
removeStorage: removeStorage,
|
|
3782
4531
|
removeStorageSync: removeStorageSync,
|
|
3783
4532
|
removeTabBarBadge: removeTabBarBadge,
|
|
4533
|
+
reportAnalytics: reportAnalytics,
|
|
4534
|
+
reportEvent: reportEvent,
|
|
4535
|
+
reportMonitor: reportMonitor,
|
|
4536
|
+
reportPerformance: reportPerformance,
|
|
3784
4537
|
request: request,
|
|
4538
|
+
requestDeviceVoIP: requestDeviceVoIP,
|
|
4539
|
+
requestOrderPayment: requestOrderPayment,
|
|
4540
|
+
requestPayment: requestPayment,
|
|
4541
|
+
requestPluginPayment: requestPluginPayment,
|
|
4542
|
+
requestSubscribeDeviceMessage: requestSubscribeDeviceMessage,
|
|
3785
4543
|
requestSubscribeMessage: requestSubscribeMessage,
|
|
3786
4544
|
requirePlugin: requirePlugin$1,
|
|
4545
|
+
requirePrivacyAuthorize: requirePrivacyAuthorize,
|
|
4546
|
+
reserveChannelsLive: reserveChannelsLive,
|
|
4547
|
+
revokeBufferURL: revokeBufferURL,
|
|
3787
4548
|
saveFile: saveFile,
|
|
3788
4549
|
saveFileToDisk: saveFileToDisk,
|
|
3789
4550
|
saveImageToPhotosAlbum: saveImageToPhotosAlbum,
|
|
3790
4551
|
saveVideoToPhotosAlbum: saveVideoToPhotosAlbum,
|
|
4552
|
+
scanCode: scanCode,
|
|
4553
|
+
seekBackgroundAudio: seekBackgroundAudio,
|
|
4554
|
+
sendHCEMessage: sendHCEMessage,
|
|
4555
|
+
sendSms: sendSms,
|
|
4556
|
+
setBLEMTU: setBLEMTU,
|
|
3791
4557
|
setBackgroundColor: setBackgroundColor,
|
|
4558
|
+
setBackgroundFetchToken: setBackgroundFetchToken,
|
|
4559
|
+
setBackgroundTextStyle: setBackgroundTextStyle,
|
|
3792
4560
|
setClipboardData: setClipboardData,
|
|
4561
|
+
setEnable1v1Chat: setEnable1v1Chat,
|
|
4562
|
+
setEnableDebug: setEnableDebug,
|
|
4563
|
+
setInnerAudioOption: setInnerAudioOption,
|
|
3793
4564
|
setKeepScreenOn: setKeepScreenOn,
|
|
3794
4565
|
setNavigationBarColor: setNavigationBarColor,
|
|
3795
4566
|
setNavigationBarTitle: setNavigationBarTitle,
|
|
@@ -3799,22 +4570,62 @@ var apis = /*#__PURE__*/Object.freeze({
|
|
|
3799
4570
|
setTabBarBadge: setTabBarBadge,
|
|
3800
4571
|
setTabBarItem: setTabBarItem,
|
|
3801
4572
|
setTabBarStyle: setTabBarStyle,
|
|
4573
|
+
setTopBarText: setTopBarText,
|
|
3802
4574
|
setVisualEffectOnCapture: setVisualEffectOnCapture,
|
|
4575
|
+
setWifiList: setWifiList,
|
|
4576
|
+
setWindowSize: setWindowSize,
|
|
4577
|
+
shareFileMessage: shareFileMessage,
|
|
4578
|
+
shareToWeRun: shareToWeRun,
|
|
4579
|
+
shareVideoMessage: shareVideoMessage,
|
|
3803
4580
|
showActionSheet: showActionSheet,
|
|
3804
4581
|
showLoading: showLoading,
|
|
3805
4582
|
showModal: showModal,
|
|
3806
4583
|
showNavigationBarLoading: showNavigationBarLoading,
|
|
4584
|
+
showRedPackage: showRedPackage,
|
|
4585
|
+
showShareImageMenu: showShareImageMenu,
|
|
4586
|
+
showShareMenu: showShareMenu,
|
|
3807
4587
|
showTabBar: showTabBar,
|
|
3808
4588
|
showTabBarRedDot: showTabBarRedDot,
|
|
3809
4589
|
showToast: showToast,
|
|
3810
4590
|
startAccelerometer: startAccelerometer,
|
|
4591
|
+
startBeaconDiscovery: startBeaconDiscovery,
|
|
4592
|
+
startBluetoothDevicesDiscovery: startBluetoothDevicesDiscovery,
|
|
4593
|
+
startCompass: startCompass,
|
|
4594
|
+
startDeviceMotionListening: startDeviceMotionListening,
|
|
4595
|
+
startFacialRecognitionVerify: startFacialRecognitionVerify,
|
|
4596
|
+
startFacialRecognitionVerifyAndUploadVideo: startFacialRecognitionVerifyAndUploadVideo,
|
|
4597
|
+
startGyroscope: startGyroscope,
|
|
4598
|
+
startHCE: startHCE,
|
|
4599
|
+
startLocalServiceDiscovery: startLocalServiceDiscovery,
|
|
4600
|
+
startLocationUpdate: startLocationUpdate,
|
|
4601
|
+
startLocationUpdateBackground: startLocationUpdateBackground,
|
|
3811
4602
|
startPullDownRefresh: startPullDownRefresh,
|
|
4603
|
+
startRecord: startRecord,
|
|
4604
|
+
startSoterAuthentication: startSoterAuthentication,
|
|
4605
|
+
startWifi: startWifi,
|
|
3812
4606
|
stopAccelerometer: stopAccelerometer,
|
|
4607
|
+
stopBackgroundAudio: stopBackgroundAudio,
|
|
4608
|
+
stopBeaconDiscovery: stopBeaconDiscovery,
|
|
4609
|
+
stopBluetoothDevicesDiscovery: stopBluetoothDevicesDiscovery,
|
|
4610
|
+
stopCompass: stopCompass,
|
|
4611
|
+
stopDeviceMotionListening: stopDeviceMotionListening,
|
|
4612
|
+
stopGyroscope: stopGyroscope,
|
|
4613
|
+
stopHCE: stopHCE,
|
|
4614
|
+
stopLocalServiceDiscovery: stopLocalServiceDiscovery,
|
|
4615
|
+
stopLocationUpdate: stopLocationUpdate,
|
|
3813
4616
|
stopPullDownRefresh: stopPullDownRefresh,
|
|
4617
|
+
stopRecord: stopRecord,
|
|
4618
|
+
stopVoice: stopVoice,
|
|
4619
|
+
stopWifi: stopWifi,
|
|
4620
|
+
subscribeVoIPVideoMembers: subscribeVoIPVideoMembers,
|
|
3814
4621
|
switchTab: switchTab,
|
|
4622
|
+
updateShareMenu: updateShareMenu,
|
|
4623
|
+
updateVoIPChatMuteConfig: updateVoIPChatMuteConfig,
|
|
4624
|
+
updateWeChatApp: updateWeChatApp,
|
|
3815
4625
|
uploadFile: uploadFile,
|
|
3816
4626
|
vibrateLong: vibrateLong,
|
|
3817
|
-
vibrateShort: vibrateShort
|
|
4627
|
+
vibrateShort: vibrateShort,
|
|
4628
|
+
writeBLECharacteristicValue: writeBLECharacteristicValue
|
|
3818
4629
|
});
|
|
3819
4630
|
|
|
3820
4631
|
Object.assign({}, apis);
|