@alipay/ams-checkout 0.0.1766066234-dev.1 → 0.0.1766066234-dev.2
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.
|
@@ -369,7 +369,7 @@ var ElementController = /*#__PURE__*/function () {
|
|
|
369
369
|
_context4.next = 11;
|
|
370
370
|
return new Promise( /*#__PURE__*/function () {
|
|
371
371
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(resolve) {
|
|
372
|
-
var that, recordResultCallback, params, processStep, _yield$_this3$onValid2, data, errorResult;
|
|
372
|
+
var that, recordResultCallback, params, processStep, _yield$_this3$onValid2, data, errorString, errorResult;
|
|
373
373
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
374
374
|
while (1) switch (_context3.prev = _context3.next) {
|
|
375
375
|
case 0:
|
|
@@ -458,14 +458,16 @@ var ElementController = /*#__PURE__*/function () {
|
|
|
458
458
|
recordResult = data;
|
|
459
459
|
recordResultCallback(recordResult);
|
|
460
460
|
case 21:
|
|
461
|
-
_context3.next =
|
|
461
|
+
_context3.next = 30;
|
|
462
462
|
break;
|
|
463
463
|
case 23:
|
|
464
464
|
_context3.prev = 23;
|
|
465
465
|
_context3.t0 = _context3["catch"](2);
|
|
466
|
+
// 修复error为{}空对象的问题,上报stack&message
|
|
467
|
+
errorString = JSON.stringify(_context3.t0, Object.getOwnPropertyNames(_context3.t0));
|
|
466
468
|
errorResult = {
|
|
467
469
|
error: _objectSpread(_objectSpread({}, ERRORMESSAGE.ERR_DATA_STRUCT_UNRECOGNIZED), {}, {
|
|
468
|
-
context:
|
|
470
|
+
context: errorString
|
|
469
471
|
}),
|
|
470
472
|
status: PaymentStatus.FAIL
|
|
471
473
|
};
|
|
@@ -476,7 +478,7 @@ var ElementController = /*#__PURE__*/function () {
|
|
|
476
478
|
});
|
|
477
479
|
recordResult = errorResult;
|
|
478
480
|
recordResultCallback(errorResult);
|
|
479
|
-
case
|
|
481
|
+
case 30:
|
|
480
482
|
case "end":
|
|
481
483
|
return _context3.stop();
|
|
482
484
|
}
|
|
@@ -63,14 +63,20 @@ export function checkCanMount(_ref) {
|
|
|
63
63
|
return {
|
|
64
64
|
success: false,
|
|
65
65
|
errorMsg: "Element with selector ".concat(sdkSelector, " not found."),
|
|
66
|
-
error:
|
|
66
|
+
error: {
|
|
67
|
+
code: ERRORMESSAGE.PARAM_INVALID.code,
|
|
68
|
+
message: "Element with selector ".concat(sdkSelector, " not found.")
|
|
69
|
+
}
|
|
67
70
|
};
|
|
68
71
|
}
|
|
69
72
|
if (status === IElementStatus.DESTROYED) {
|
|
70
73
|
return {
|
|
71
74
|
success: false,
|
|
72
75
|
errorMsg: "Creating components in the destroyed state is forbidden.",
|
|
73
|
-
error:
|
|
76
|
+
error: {
|
|
77
|
+
code: ERRORMESSAGE.UI_STATE_ERROR.code,
|
|
78
|
+
message: "Creating components in the destroyed state is forbidden."
|
|
79
|
+
}
|
|
74
80
|
};
|
|
75
81
|
}
|
|
76
82
|
if (status === IElementStatus.READY) {
|
|
@@ -82,7 +88,10 @@ export function checkCanMount(_ref) {
|
|
|
82
88
|
return {
|
|
83
89
|
success: false,
|
|
84
90
|
errorMsg: "SDK status error.",
|
|
85
|
-
error:
|
|
91
|
+
error: {
|
|
92
|
+
code: ERRORMESSAGE.UI_STATE_ERROR.code,
|
|
93
|
+
message: "SDK status error."
|
|
94
|
+
}
|
|
86
95
|
};
|
|
87
96
|
}
|
|
88
97
|
return {
|