@alipay/ams-checkout 0.0.1709535659-dev.0 → 0.0.1709536306-dev.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.
@@ -12,8 +12,8 @@ var _queryParse = queryParse(),
12
12
  groupId = _queryParse.groupId,
13
13
  host = _queryParse.requestHost;
14
14
  export var requestHost = {
15
- local: 'http://imgs-1529.gz00b.dev.alipay.net/mgw.htm',
16
- dev: host || 'http://imgs-1529.gz00b.dev.alipay.net/mgw.htm',
15
+ local: 'http://imgs-8452.sggz00b.dev.alipay.net/mgw.htm',
16
+ dev: host || 'http://imgs-8452.sggz00b.dev.alipay.net/mgw.htm',
17
17
  sit: host || 'http://imgs-9.sggz00a.test.alipay.net/mgw.htm',
18
18
  pre: 'https://imgs-sea-pre.alipay.com/mgw.htm',
19
19
  prod: 'https://imgs-sea-global.alipay.com/mgw.htm',
@@ -22,7 +22,7 @@ export var requestHost = {
22
22
  export var clientId = '5J5Y8X4E2Y25GR00690';
23
23
  export var tntInstId = 'ALIPW3SG';
24
24
  export var appId = 'ANTOM_PAYMENT_WEB';
25
- export var sofaId = groupId || 'GROUP_20231218150235';
25
+ export var sofaId = groupId || 'GROUP_20240304204929';
26
26
  export var hostSignMap = function hostSignMap(hostSign, env) {
27
27
  var map = {
28
28
  SG: 'https://imgs-sea-global.alipay.com/mgw.htm',
@@ -25,7 +25,6 @@ export default class ComponentApp {
25
25
  private _renderDisplayType;
26
26
  private _multipleCallbackEvents;
27
27
  _merchantAppointParam: IMerchantAppointParam;
28
- private _webAppHeartBeatTimeoutId;
29
28
  private _webAppHeartBeatTimeoutFn;
30
29
  constructor();
31
30
  /**
@@ -98,7 +97,7 @@ export default class ComponentApp {
98
97
  */
99
98
  dispatchToApp(payload: {
100
99
  context: eventPayloadContext;
101
- }, targetElement?: any): any;
100
+ }, targetElement?: any, sendLog?: boolean): any;
102
101
  /**
103
102
  * @description Subscribe to messages from SDK
104
103
  */
@@ -52,7 +52,6 @@ var ComponentApp = /*#__PURE__*/function () {
52
52
  _defineProperty(this, "_renderDisplayType", renderDisplayTypeEnum.popup);
53
53
  _defineProperty(this, "_multipleCallbackEvents", void 0);
54
54
  _defineProperty(this, "_merchantAppointParam", void 0);
55
- _defineProperty(this, "_webAppHeartBeatTimeoutId", void 0);
56
55
  _defineProperty(this, "_webAppHeartBeatTimeoutFn", void 0);
57
56
  this._appVersion = '1.10.1';
58
57
  this._isInitComponent = false;
@@ -1235,12 +1234,12 @@ var ComponentApp = /*#__PURE__*/function () {
1235
1234
  }
1236
1235
  };
1237
1236
  }
1238
- if (this._webAppHeartBeatTimeoutId) {
1239
- clearTimeout(this._webAppHeartBeatTimeoutId);
1240
- this._webAppHeartBeatTimeoutId = null;
1237
+ if (window._webAppHeartBeatTimeoutId) {
1238
+ clearTimeout(window._webAppHeartBeatTimeoutId);
1239
+ window._webAppHeartBeatTimeoutId = null;
1241
1240
  }
1242
1241
  if (this._webAppHeartBeatTimeoutFn) {
1243
- this._webAppHeartBeatTimeoutId = setTimeout(this._webAppHeartBeatTimeoutFn, TIMEOUT_WEB_APP_HEART_BEAT);
1242
+ window._webAppHeartBeatTimeoutId = setTimeout(this._webAppHeartBeatTimeoutFn, TIMEOUT_WEB_APP_HEART_BEAT);
1244
1243
  }
1245
1244
  setTimeout(function () {
1246
1245
  if (_this8.isAppAttached()) {
@@ -1249,7 +1248,7 @@ var ComponentApp = /*#__PURE__*/function () {
1249
1248
  event: 'sdkHeartBeat',
1250
1249
  data: {}
1251
1250
  }
1252
- });
1251
+ }, null, false);
1253
1252
  }
1254
1253
  }, TIME_DELAY_SEND_HEART_BEAT);
1255
1254
  } catch (error) {
@@ -1299,17 +1298,20 @@ var ComponentApp = /*#__PURE__*/function () {
1299
1298
  key: "dispatchToApp",
1300
1299
  value: function dispatchToApp(payload) {
1301
1300
  var targetElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
1301
+ var sendLog = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
1302
1302
  var data = Object.assign({}, payload, {
1303
1303
  name: messageName.SDK_TO_APP,
1304
1304
  mode: this.AMSSDK.options.mode,
1305
1305
  appId: COMPONENTPLUGINID,
1306
1306
  instanceId: this.AMSSDK._instanceId
1307
1307
  });
1308
- this.AMSSDK.logger.logInfo({
1309
- title: 'sdk_event_send_message_to_web'
1310
- }, {
1311
- event: data === null || data === void 0 ? void 0 : data.context.event
1312
- }).send();
1308
+ if (sendLog) {
1309
+ this.AMSSDK.logger.logInfo({
1310
+ title: 'sdk_event_send_message_to_web'
1311
+ }, {
1312
+ event: data === null || data === void 0 ? void 0 : data.context.event
1313
+ }).send();
1314
+ }
1313
1315
  if (targetElement && targetElement.contentWindow) {
1314
1316
  return targetElement.contentWindow.postMessage(JSON.stringify(data), '*');
1315
1317
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "0.0.1709535659-dev.0",
3
+ "version": "0.0.1709536306-dev.0",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",