@alipay/ams-checkout 0.0.1730706734-dev.6 → 0.0.1730706734-dev.7
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,8 @@ export var ElementAuthComponent = /*#__PURE__*/function () {
|
|
23
23
|
try {
|
24
24
|
var selector = options.selector,
|
25
25
|
url = options.url;
|
26
|
-
var
|
26
|
+
var containerId = (selector === null || selector === void 0 ? void 0 : selector.indexOf('#')) === -1 ? selector : selector.slice(1);
|
27
|
+
var containerSelector = "antom-sdk-web-app-".concat(containerId);
|
27
28
|
var container = createInlineBaseElement(selector);
|
28
29
|
var webApp = createIframe(containerSelector);
|
29
30
|
webApp.src = url;
|
@@ -23,7 +23,7 @@ import { ElementAddressComponent } from "./components/address";
|
|
23
23
|
import { ElementAuthComponent } from "./components/auth";
|
24
24
|
import { ElementPaymentComponent } from "./components/payment";
|
25
25
|
import { EVENT as ConstantEvent } from "../../../constant";
|
26
|
-
// import { oneAccount, sdkAction } from './mock';
|
26
|
+
// import { oneAccount, sdkAction, submitResult } from './mock';
|
27
27
|
|
28
28
|
import { addressTheme, ELEMENT_ENVIRONMENT, ThemeType } from "./type";
|
29
29
|
var ElementProcessor = /*#__PURE__*/function () {
|
@@ -404,7 +404,7 @@ export var ElementComponent = /*#__PURE__*/function () {
|
|
404
404
|
};
|
405
405
|
}());
|
406
406
|
});
|
407
|
-
var env = options.environment || ELEMENT_ENVIRONMENT.
|
407
|
+
var env = options.environment || ELEMENT_ENVIRONMENT.PROD;
|
408
408
|
this._options = _objectSpread(_objectSpread({}, options), {}, {
|
409
409
|
environment: env.toLocaleLowerCase()
|
410
410
|
});
|
@@ -553,6 +553,9 @@ export var ElementComponent = /*#__PURE__*/function () {
|
|
553
553
|
this.eventService.listen(ConstantEvent.close.name, function () {
|
554
554
|
_this6.unmount();
|
555
555
|
});
|
556
|
+
this.eventService.listen(ConstantEvent.redirect.name, function (data, res) {
|
557
|
+
data.isDestroy && _this6.unmount();
|
558
|
+
});
|
556
559
|
this.eventService.listen(ElementPaymentEvent.LOG, function (result) {
|
557
560
|
console.log('antom sdk 组件日志回调');
|
558
561
|
});
|
@@ -758,6 +761,8 @@ export var ElementComponent = /*#__PURE__*/function () {
|
|
758
761
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
759
762
|
while (1) switch (_context2.prev = _context2.next) {
|
760
763
|
case 0:
|
764
|
+
// this.onAfterSubmitFunc(ElementPaymentMethod.PAYMENT_ELEMENT, submitResult);
|
765
|
+
// return
|
761
766
|
if ((_this$_options$loadin7 = this._options.loading) !== null && _this$_options$loadin7 !== void 0 && _this$_options$loadin7.onStartLoading) {
|
762
767
|
(_this$_options$loadin8 = this._options.loading) === null || _this$_options$loadin8 === void 0 || (_this$_options$loadin9 = _this$_options$loadin8.onStartLoading) === null || _this$_options$loadin9 === void 0 || _this$_options$loadin9.call(_this$_options$loadin8);
|
763
768
|
}
|
@@ -1153,4 +1153,17 @@ export var paymentResult = {
|
|
1153
1153
|
},
|
1154
1154
|
source: 'PAYMENT_ELEMENT',
|
1155
1155
|
target: 'CONTAINER_ELEMENT'
|
1156
|
+
};
|
1157
|
+
export var submitResult = {
|
1158
|
+
"actionForm": {
|
1159
|
+
"actionFormType": "RedirectActionForm",
|
1160
|
+
"method": "GET",
|
1161
|
+
"redirectType": "TWO_D",
|
1162
|
+
"redirectUrl": "https://www.baidu.com"
|
1163
|
+
},
|
1164
|
+
"errorActions": {},
|
1165
|
+
"extendInfo": {
|
1166
|
+
"icon": "https://cdn.marmot-cloud.com/storage/2024/07/15/c77c0d3d-a3d0-48ad-8a40-cb3e777a2608.svg"
|
1167
|
+
},
|
1168
|
+
"success": true
|
1156
1169
|
};
|