@alipay/ams-checkout 0.0.1784626568-dev.2 → 0.0.1784626568-dev.5
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/ams-checkout.js +3 -3
- package/dist/ams-checkout.min.js +1 -1
- package/dist/ams-checkout.min.js.map +1 -1
- package/esm/config/index.js +1 -1
- package/esm/core/component/element/modernElementController/index.js +13 -3
- package/esm/modern/tools.js +1 -1
- package/esm/plugin/component/channel.js +4 -0
- package/esm/util/logger.js +1 -1
- package/package.json +1 -1
package/esm/config/index.js
CHANGED
|
@@ -30,7 +30,7 @@ export var v2AppMarmotMap = {
|
|
|
30
30
|
light_sandbox: 'https://checkout.antom.com',
|
|
31
31
|
prod: 'https://checkout.antom.com'
|
|
32
32
|
};
|
|
33
|
-
export var sdkVersion = "0.0.1784626568-dev.
|
|
33
|
+
export var sdkVersion = "0.0.1784626568-dev.5";
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* @description: 目前应用层分为v1和v2,会存在两个应用版本号不是同步发布的情况。所以需要把默认的应用版本号配置抽离出来。
|
|
@@ -401,7 +401,7 @@ export var ModernElementController = /*#__PURE__*/function () {
|
|
|
401
401
|
request.setGlobalOptions({
|
|
402
402
|
hostSign: parseHostSign(sessionData),
|
|
403
403
|
env: this.options.environment,
|
|
404
|
-
sdkVersion: "0.0.1784626568-dev.
|
|
404
|
+
sdkVersion: "0.0.1784626568-dev.5" || '',
|
|
405
405
|
tracker: sdkTracker
|
|
406
406
|
});
|
|
407
407
|
isConnect = !!(parseData !== null && parseData !== void 0 && (_parseData$connectFac = parseData.connectFactor) !== null && _parseData$connectFac !== void 0 && _parseData$connectFac.enableConnect);
|
|
@@ -497,7 +497,7 @@ export var ModernElementController = /*#__PURE__*/function () {
|
|
|
497
497
|
// 新sdk字段
|
|
498
498
|
locale: locale,
|
|
499
499
|
// 新sdk字段
|
|
500
|
-
sdkVersion: "0.0.1784626568-dev.
|
|
500
|
+
sdkVersion: "0.0.1784626568-dev.5" || '',
|
|
501
501
|
// 新sdk字段
|
|
502
502
|
merchantId: (sdkQueryResult === null || sdkQueryResult === void 0 || (_sdkQueryResult$data = sdkQueryResult.data) === null || _sdkQueryResult$data === void 0 ? void 0 : _sdkQueryResult$data.merchantId) || '',
|
|
503
503
|
// 新sdk字段
|
|
@@ -1031,12 +1031,22 @@ export var ModernElementController = /*#__PURE__*/function () {
|
|
|
1031
1031
|
loadAndPay();
|
|
1032
1032
|
return;
|
|
1033
1033
|
}
|
|
1034
|
-
|
|
1034
|
+
console.log('sdk googlePay debug 1', 'handleGetGooglePayToken');
|
|
1035
1035
|
// 否则动态加载 GP SDK 脚本
|
|
1036
1036
|
var script = document.createElement('script');
|
|
1037
1037
|
script.src = 'https://pay.google.com/gp/p/js/pay.js';
|
|
1038
1038
|
script.async = true;
|
|
1039
|
+
console.log('sdk googlePay debug 2', 'handleGetGooglePayToken');
|
|
1040
|
+
// 当判断条件成立时,代表 document.body.appendChild 方法已被劫持
|
|
1041
|
+
if (document.body.appendChild !== Node.prototype.appendChild) {
|
|
1042
|
+
// 使用原生 appendChild 避免微前端沙箱(如 qiankun)将动态 <script> 劫持为 fetch 加载,
|
|
1043
|
+
// 导致不支持 CORS 的第三方脚本(如 pay.google.com)加载失败
|
|
1044
|
+
Node.prototype.appendChild.call(document.body, script);
|
|
1045
|
+
} else {
|
|
1046
|
+
document.body.appendChild(script);
|
|
1047
|
+
}
|
|
1039
1048
|
document.body.appendChild(script);
|
|
1049
|
+
console.log('sdk googlePay debug 3', document.body.appendChild !== Node.prototype.appendChild);
|
|
1040
1050
|
script.onload = function () {
|
|
1041
1051
|
loadAndPay();
|
|
1042
1052
|
};
|