@alipay/ams-checkout 0.0.1756987734-dev.1 → 0.0.1756987734-dev.3

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.
@@ -23,7 +23,7 @@ import { COMPONENTPLUGINID, COMPONENT_CLOSE_BLOCK_ID, COMPONENT_CLOSE_MASK_BLOCK
23
23
  import { ElementPaymentMethod } from "../../core/component/oldElement/type";
24
24
  import { queryPaymentInfo, submitPayInfo } from "../../service";
25
25
  import { ComponentSignEnum, DisplayTypeEnum, eventCodeEnum, MessageName, PlatformEnum, ProductSceneEnum, RedirectType, TargetEnum } from "../../types";
26
- import { getType, isJsonString, isPC } from "../../util";
26
+ import { getType, isJsonString, isPC, device } from "../../util";
27
27
  import { getBackScheme } from "../../util/getBackScheme";
28
28
  import { isLocalMock } from "../../util/mock";
29
29
  import { matchVersion } from "../../util/versionCompare";
@@ -72,7 +72,7 @@ var ComponentApp = /*#__PURE__*/function () {
72
72
  this.createPreloadIframeNode = function () {
73
73
  return Promise.resolve();
74
74
  };
75
- this.platform = isPC() ? PlatformEnum.desktop : PlatformEnum.mobile;
75
+ this.platform = device.isMobile ? PlatformEnum.mobile : PlatformEnum.desktop;
76
76
  this._isRetention = true;
77
77
  this._appLocationSearch = '';
78
78
  this._performanceData.push({
@@ -674,6 +674,7 @@ var ComponentApp = /*#__PURE__*/function () {
674
674
  message: res === null || res === void 0 ? void 0 : res.errorMessage
675
675
  };
676
676
  _this5.dispatchToSDK(EVENT.error.name, createComponentError);
677
+ _this5.dispatchToSDK(EVENT.eventCallback.name, createComponentError);
677
678
  if ((res === null || res === void 0 || (_res$errorActions = res.errorActions) === null || _res$errorActions === void 0 ? void 0 : _res$errorActions.showType) === 'NONE') {
678
679
  // 抛错销毁SDK,不展示错误页面
679
680
  reject(createComponentError);
@@ -685,6 +686,7 @@ var ComponentApp = /*#__PURE__*/function () {
685
686
  if (ComponentSignEnum.CASHIER_PAYMENT_CARD === _this5._componentSign) {
686
687
  // 通用操作:抛CREATECOMPONENT_ERROR错误码给商户,商户升级到新版本需要处理CREATECOMPONENT_ERROR逻辑
687
688
  _this5.dispatchToSDK(EVENT.error.name, ERRORMESSAGE.CREATECOMPONENT_ERROR.NETWORK_REQUEST_ERROR);
689
+ _this5.dispatchToSDK(EVENT.eventCallback.name, ERRORMESSAGE.CREATECOMPONENT_ERROR.NETWORK_REQUEST_ERROR);
688
690
  }
689
691
  if ([ComponentSignEnum.CASHIER_PAYMENT_CARD, ComponentSignEnum.VAULTING_CARD, ComponentSignEnum.CASHIER_PAYMENT_APM].includes(_this5._componentSign)) {
690
692
  return resolve({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "0.0.1756987734-dev.1",
3
+ "version": "0.0.1756987734-dev.3",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",