@alipay/ams-checkout 1.5.9 → 1.5.10
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/umd/ams-checkout.min.js +1 -1
- package/esm/config/index.js +3 -3
- package/esm/plugin/component/cashierApp.d.ts +4 -1
- package/esm/plugin/component/cashierApp.js +4 -1
- package/esm/plugin/component/index.d.ts +1 -1
- package/esm/plugin/component/index.js +19 -16
- package/esm/util/jshield-apdid/apdid-core.umd.min.js +1 -0
- package/esm/util/security.js +1 -1
- package/package.json +1 -1
package/esm/config/index.js
CHANGED
@@ -10,8 +10,8 @@ export var marmotMap = {
|
|
10
10
|
dev: 'http://page.alipay.net/page/antom-web-checkout/src/component-app',
|
11
11
|
sit: 'http://page.test.alipay.net/page/antom-web-checkout/src/component-app',
|
12
12
|
pre: 'https://pre.ac.alipay.com/page/antom-web-checkout/src/component-app',
|
13
|
-
sandbox: 'https://
|
14
|
-
light_sandbox: 'https://
|
15
|
-
prod: 'https://
|
13
|
+
sandbox: 'https://ac.alipay.com/page/antom-web-checkout/src/component-app',
|
14
|
+
light_sandbox: 'https://ac.alipay.com/page/antom-web-checkout/src/component-app',
|
15
|
+
prod: 'https://ac.alipay.com/page/antom-web-checkout/src/component-app'
|
16
16
|
};
|
17
17
|
export var sdkVersion = json.version;
|
@@ -18,7 +18,10 @@ export declare const getIframeUrl: (iframeParams: {
|
|
18
18
|
locale: string;
|
19
19
|
instanceId: string;
|
20
20
|
renderDisplayType: renderDisplayTypeEnum;
|
21
|
-
}) =>
|
21
|
+
}) => {
|
22
|
+
path: string;
|
23
|
+
locationSearch: string;
|
24
|
+
};
|
22
25
|
/**
|
23
26
|
* @description Create iframe
|
24
27
|
*/
|
@@ -99,7 +99,10 @@ export var getIframeUrl = function getIframeUrl(iframeParams) {
|
|
99
99
|
if (environment === 'sandbox' || _sandbox === 'true') urlParams.shadow = 'true';
|
100
100
|
if (_displayType) urlParams.displayType = _displayType;
|
101
101
|
var locationSearch = serialize(urlParams);
|
102
|
-
return
|
102
|
+
return {
|
103
|
+
path: path,
|
104
|
+
locationSearch: locationSearch
|
105
|
+
};
|
103
106
|
};
|
104
107
|
|
105
108
|
/**
|
@@ -14,12 +14,11 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
14
14
|
* 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
|
15
15
|
* 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
|
16
16
|
*/
|
17
|
-
/* eslint-disable no-console */
|
18
17
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
19
18
|
import { marmotMap } from "../../config/index";
|
20
19
|
import { COMPONENTPLUGINID, COMPONENT_CLOSE_BLOCK_ID, COMPONENT_CONTAINER_ID, COMPONENT_RETENTION_ID, COMPONENT_SECTION_ID, ERRORMESSAGE, EVENT, LISTENER_PREFIX, LOADING_ID, LOADTIME_LIMIT, MOCKUP_ID } from "../../constant";
|
21
20
|
import { queryPaymentInfo } from "../../service";
|
22
|
-
import { componentSignEnum, eventCodeEnum, messageName, platformEnum, productSceneEnum, renderDisplayTypeEnum, SecuritySceneEnum, targetEnum
|
21
|
+
import { componentSignEnum, eventCodeEnum, messageName, platformEnum, productSceneEnum, RedirectType, renderDisplayTypeEnum, SecuritySceneEnum, targetEnum } from "../../types";
|
23
22
|
import { getType, isJsonString, isPC } from "../../util";
|
24
23
|
import { isLocalMock } from "../../util/mock";
|
25
24
|
import { getApdidToken, getAppname, getSecurityHost, initSecuritySDK } from "../../util/security";
|
@@ -47,7 +46,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
47
46
|
_defineProperty(this, "_actionQueryPromise", null);
|
48
47
|
_defineProperty(this, "_renderParams", null);
|
49
48
|
_defineProperty(this, "_componentSign", componentSignEnum.NONE);
|
50
|
-
_defineProperty(this, "
|
49
|
+
_defineProperty(this, "_appLocationSearch", void 0);
|
51
50
|
_defineProperty(this, "_renderDisplayType", renderDisplayTypeEnum.popup);
|
52
51
|
this._appVersion = '1.5.9';
|
53
52
|
this._isInitComponent = false;
|
@@ -56,8 +55,8 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
56
55
|
return Promise.resolve();
|
57
56
|
};
|
58
57
|
this.platform = isPC() ? platformEnum.desktop : platformEnum.mobile;
|
59
|
-
this._clickEventName = this.platform === platformEnum.mobile ? 'touchend' : 'click';
|
60
58
|
this._isRetention = true;
|
59
|
+
this._appLocationSearch = '';
|
61
60
|
this._performanceData.push({
|
62
61
|
key: 'sdk_init',
|
63
62
|
value: Date.now()
|
@@ -479,17 +478,21 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
479
478
|
extendInfo: extendInfo
|
480
479
|
});
|
481
480
|
this.app = createIframe(this.AMSSDK.options.mode, this.platform);
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
481
|
+
var _getIframeUrl = getIframeUrl({
|
482
|
+
renderDisplayType: renderParams.renderDisplayType,
|
483
|
+
componentSign: this._componentSign,
|
484
|
+
analytics: this.AMSSDK.options.analytics,
|
485
|
+
productSceneVersion: productSceneVersion,
|
486
|
+
environment: environment,
|
487
|
+
appVersion: this._appVersion,
|
488
|
+
extendInfo: extendInfo,
|
489
|
+
locale: this.AMSSDK.options.locale,
|
490
|
+
instanceId: this.AMSSDK._instanceId
|
491
|
+
}),
|
492
|
+
path = _getIframeUrl.path,
|
493
|
+
locationSearch = _getIframeUrl.locationSearch;
|
494
|
+
this._appLocationSearch = locationSearch;
|
495
|
+
this.app.src = "".concat(path, "?").concat(locationSearch);
|
493
496
|
|
494
497
|
// Subscribe to messages from iframe
|
495
498
|
this.addEventListener();
|
@@ -535,7 +538,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
535
538
|
var _this$_renderParams3;
|
536
539
|
this._threedData = data;
|
537
540
|
var sessionData = encodeURIComponent((_this$_renderParams3 = this._renderParams) === null || _this$_renderParams3 === void 0 ? void 0 : _this$_renderParams3.sessionData);
|
538
|
-
var threedPageUrl = "".concat(marmotMap[this.AMSSDK.options.env.environment], "/threedPage/index.html?scene=threedWrapperPage&sessionData=").concat(sessionData, "&
|
541
|
+
var threedPageUrl = "".concat(marmotMap[this.AMSSDK.options.env.environment], "/threedPage/index.html?scene=threedWrapperPage&sessionData=").concat(sessionData, "&").concat(this._appLocationSearch);
|
539
542
|
this.popupWindow = createModal({
|
540
543
|
device: this.platform,
|
541
544
|
url: threedPageUrl
|