@alipay/ams-checkout 0.0.1758783821-dev.1 → 0.0.1758783821-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.
@@ -26,7 +26,9 @@ export declare const validateElementOption: (options: IElementOptions) => {
26
26
  };
27
27
  /**
28
28
  * 校验渲染条件
29
- * 校验当前sdkSelector结点是否存在
29
+ * 1.校验当前 sdkSelector 结点是否存在
30
+ * 2.校验当前 Element 的状态是否能够渲染
31
+ * 3.校验当前 type 类型 Elment 是否已经执行过 mount
30
32
  */
31
33
  export declare function checkCanMount({ sdkSelector, containerService, status, }: {
32
34
  sdkSelector: string;
@@ -27,6 +27,7 @@ export var formatElementOption = function formatElementOption(options) {
27
27
  export var validateElementOption = function validateElementOption(options) {
28
28
  var errors = [];
29
29
  if (!options.sessionData) {
30
+ console.error('sessionData is empty, please check new AMSElement params.');
30
31
  errors.push({
31
32
  field: 'sessionData',
32
33
  message: 'sessionData is empty'
@@ -47,7 +48,9 @@ export var validateElementOption = function validateElementOption(options) {
47
48
 
48
49
  /**
49
50
  * 校验渲染条件
50
- * 校验当前sdkSelector结点是否存在
51
+ * 1.校验当前 sdkSelector 结点是否存在
52
+ * 2.校验当前 Element 的状态是否能够渲染
53
+ * 3.校验当前 type 类型 Elment 是否已经执行过 mount
51
54
  */
52
55
  export function checkCanMount(_ref) {
53
56
  var sdkSelector = _ref.sdkSelector,
@@ -133,7 +136,7 @@ export function generateIframeSrc(_ref3) {
133
136
  var extendInfo = (paymentSessionObj === null || paymentSessionObj === void 0 ? void 0 : paymentSessionObj.extendInfo) || '';
134
137
  var mid = paymentSessionObj === null || paymentSessionObj === void 0 ? void 0 : paymentSessionObj.clientId;
135
138
  var hostSign = (paymentSession || '').split('&&')[1] || '';
136
- var baseUrl = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ELEMENT_ENVIRONMENT.DEV, 'http://page.alipay.net/page/antom-web-checkout-v2'), ELEMENT_ENVIRONMENT.TEST, 'http://page.test.alipay.net/page/antom-web-checkout-v2'), ELEMENT_ENVIRONMENT.SIT, 'http://page.test.alipay.net/page/antom-web-checkout-v2'), ELEMENT_ENVIRONMENT.PRE, 'https://pre.ac.alipay.com/page/antom-web-checkout-v2'), ELEMENT_ENVIRONMENT.SANDBOX, 'https://checkout.antom.com'), ELEMENT_ENVIRONMENT.PROD, 'https://checkout.antom.com');
139
+ var baseUrl = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ELEMENT_ENVIRONMENT.DEV, 'http://dev.ac.alipay.com/page/antom-web-checkout-v2'), ELEMENT_ENVIRONMENT.TEST, 'http://page.test.alipay.net/page/antom-web-checkout-v2'), ELEMENT_ENVIRONMENT.SIT, 'http://page.test.alipay.net/page/antom-web-checkout-v2'), ELEMENT_ENVIRONMENT.PRE, 'https://pre.ac.alipay.com/page/antom-web-checkout-v2'), ELEMENT_ENVIRONMENT.SANDBOX, 'https://checkout.antom.com'), ELEMENT_ENVIRONMENT.PROD, 'https://checkout.antom.com');
137
140
  var _env = (environment === null || environment === void 0 ? void 0 : environment.toLocaleUpperCase()) || ELEMENT_ENVIRONMENT.DEV;
138
141
  if (!link) {
139
142
  link = "".concat(baseUrl[_env]).concat(pageUrl);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "0.0.1758783821-dev.1",
3
+ "version": "0.0.1758783821-dev.2",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",