bxs-tools-ui 3.2.0 → 3.3.0

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.
Files changed (148) hide show
  1. package/README.md +20 -20
  2. package/es/add-and-take/index.css +1 -1
  3. package/es/add-and-take/index.js +283 -64
  4. package/es/adjust-baoe/index.css +1 -1
  5. package/es/adjust-baoe/index.js +444 -195
  6. package/es/business-card/index.css +1 -1
  7. package/es/business-card/index.js +1 -0
  8. package/es/canvas-poster/index.css +1 -1
  9. package/es/canvas-poster/index.js +1 -0
  10. package/es/index.css +1 -1
  11. package/es/index.js +936 -824
  12. package/es/insure-calculate/index.css +1 -1
  13. package/es/insure-calculate/index.js +438 -265
  14. package/es/person-info/index.css +1 -1
  15. package/es/person-info/index.js +296 -1370
  16. package/es/product-info/index.css +1 -1
  17. package/es/product-info/index.js +644 -548
  18. package/es/share-sheet/index.css +1 -1
  19. package/es/share-sheet/index.js +313 -21
  20. package/es/utils/index.js +530 -429
  21. package/lib/add-and-take/index.css +1 -1
  22. package/lib/add-and-take/index.js +283 -64
  23. package/lib/adjust-baoe/index.css +1 -1
  24. package/lib/adjust-baoe/index.js +441 -194
  25. package/lib/business-card/index.css +1 -1
  26. package/lib/business-card/index.js +1 -0
  27. package/lib/canvas-poster/index.css +1 -1
  28. package/lib/canvas-poster/index.js +1 -0
  29. package/lib/index.css +1 -1
  30. package/lib/index.js +939 -826
  31. package/lib/insure-calculate/index.css +1 -1
  32. package/lib/insure-calculate/index.js +438 -268
  33. package/lib/person-info/index.css +1 -1
  34. package/lib/person-info/index.js +295 -1372
  35. package/lib/product-info/index.css +1 -1
  36. package/lib/product-info/index.js +645 -550
  37. package/lib/share-sheet/index.css +1 -1
  38. package/lib/share-sheet/index.js +313 -25
  39. package/lib/utils/index.js +531 -433
  40. package/package.json +9 -7
  41. package/packages/add-and-take/components/interest-form.less +144 -0
  42. package/packages/add-and-take/components/interest-form.vue +179 -179
  43. package/packages/add-and-take/components/interest-items.less +87 -0
  44. package/packages/add-and-take/components/interest-items.vue +67 -80
  45. package/packages/add-and-take/components/interest-table.less +111 -0
  46. package/packages/add-and-take/components/interest-table.vue +31 -31
  47. package/packages/add-and-take/constant.ts +2 -2
  48. package/packages/add-and-take/demo/index.vue +89 -86
  49. package/packages/add-and-take/handler.ts +52 -57
  50. package/packages/add-and-take/index.less +69 -0
  51. package/packages/add-and-take/index.vue +156 -156
  52. package/packages/add-and-take/readme.md +87 -98
  53. package/packages/adjust-baoe/demo/index.vue +37 -47
  54. package/packages/adjust-baoe/index.less +125 -0
  55. package/packages/adjust-baoe/index.vue +134 -147
  56. package/packages/adjust-baoe/readme.md +35 -45
  57. package/packages/business-card/demo/index.vue +7 -7
  58. package/packages/business-card/index.less +100 -0
  59. package/packages/business-card/index.vue +18 -21
  60. package/packages/business-card/readme.md +46 -53
  61. package/packages/bxs-utils/demo/index.vue +2 -2
  62. package/packages/bxs-utils/index.ts +5 -5
  63. package/packages/bxs-utils/planbook/common.ts +56 -92
  64. package/packages/bxs-utils/planbook/index.ts +4 -4
  65. package/packages/bxs-utils/planbook/insurance.ts +137 -127
  66. package/packages/bxs-utils/planbook/person.ts +143 -147
  67. package/packages/bxs-utils/planbook/product.ts +473 -509
  68. package/packages/bxs-utils/readme.md +94 -84
  69. package/packages/bxs-utils/trade/index.js +1 -1
  70. package/packages/bxs-utils/trade/insureCalculate.js +91 -204
  71. package/packages/canvas-poster/demo/index.vue +9 -13
  72. package/packages/canvas-poster/index.less +5 -0
  73. package/packages/canvas-poster/index.vue +68 -79
  74. package/packages/canvas-poster/readme.md +106 -109
  75. package/packages/index.ts +1 -1
  76. package/packages/insure-calculate/demo/index.vue +20 -20
  77. package/packages/insure-calculate/index.less +366 -0
  78. package/packages/insure-calculate/index.vue +305 -329
  79. package/packages/insure-calculate/readme.md +99 -106
  80. package/packages/person-info/crm-popup.vue +81 -80
  81. package/packages/person-info/demo/index.vue +25 -37
  82. package/packages/person-info/index-inline.less +11 -0
  83. package/packages/person-info/index.vue +53 -83
  84. package/packages/person-info/readme.md +109 -115
  85. package/packages/planbook-input/components/footer.less +54 -0
  86. package/packages/planbook-input/components/footer.vue +8 -64
  87. package/packages/planbook-input/components/handler.js +33 -44
  88. package/packages/planbook-input/components/product-table.less +235 -0
  89. package/packages/planbook-input/components/product-table.vue +114 -108
  90. package/packages/planbook-input/demo/index.vue +3 -3
  91. package/packages/planbook-input/helper.js +852 -465
  92. package/packages/planbook-input/index.less +30 -0
  93. package/packages/planbook-input/index.vue +86 -103
  94. package/packages/planbook-input/readme.md +72 -90
  95. package/packages/product-info/demo/constant.js +1 -1
  96. package/packages/product-info/demo/index.vue +31 -43
  97. package/packages/product-info/index.less +271 -0
  98. package/packages/product-info/index.vue +198 -210
  99. package/packages/product-info/readme.md +72 -75
  100. package/packages/share-sheet/constant.js +4 -4
  101. package/packages/share-sheet/demo/index.vue +10 -10
  102. package/packages/share-sheet/handler.js +14 -14
  103. package/packages/share-sheet/index.less +201 -0
  104. package/packages/share-sheet/index.vue +39 -39
  105. package/packages/share-sheet/readme.md +121 -127
  106. package/src/api/add-and-take.js +45 -0
  107. package/src/api/adjust-baoe.js +16 -0
  108. package/src/api/index.js +6 -0
  109. package/src/api/planbook.js +93 -0
  110. package/src/api/request.js +211 -0
  111. package/src/api/trade.js +56 -0
  112. package/src/api/user.js +18 -0
  113. package/src/components/common/common-age-birthday.less +66 -0
  114. package/src/components/common/common-age-birthday.vue +27 -95
  115. package/src/components/common/common-popup.less +81 -0
  116. package/src/components/common/common-popup.vue +12 -96
  117. package/src/components/common/common-radio.less +75 -0
  118. package/src/components/common/common-radio.vue +13 -91
  119. package/src/components/common/common-select.less +13 -0
  120. package/src/components/common/common-select.vue +21 -38
  121. package/src/components/common/common-title.less +115 -0
  122. package/src/components/common/common-title.vue +24 -24
  123. package/src/js/loading.js +6 -6
  124. package/src/js/md5Token.js +38 -44
  125. package/src/js/utils.js +45 -53
  126. package/src/js/variables.js +47 -25
  127. package/src/style/base.less +18 -0
  128. package/src/style/color.less +40 -0
  129. package/src/style/variables.less +21 -42
  130. package/packages/add-and-take/api.ts +0 -70
  131. package/packages/add-and-take/components/interest-form.css +0 -146
  132. package/packages/add-and-take/components/interest-items.css +0 -87
  133. package/packages/add-and-take/components/interest-table.css +0 -113
  134. package/packages/add-and-take/index.css +0 -70
  135. package/packages/adjust-baoe/index.css +0 -123
  136. package/packages/business-card/index.css +0 -101
  137. package/packages/canvas-poster/index.css +0 -5
  138. package/packages/insure-calculate/index.css +0 -368
  139. package/packages/planbook-input/api.js +0 -29
  140. package/packages/planbook-input/components/product-table.css +0 -236
  141. package/packages/planbook-input/index.css +0 -31
  142. package/packages/product-info/index.css +0 -264
  143. package/packages/share-sheet/index.css +0 -203
  144. package/src/components/common/common-title.css +0 -116
  145. package/src/js/request.js +0 -64
  146. package/src/style/apply.css +0 -25
  147. package/src/style/base.css +0 -36
  148. package/src/style/color.css +0 -74
package/es/index.js CHANGED
@@ -5,12 +5,11 @@ import _Toast from 'vant/lib/toast';
5
5
  import 'vant/lib/index.css';
6
6
  import _Vant from 'vant/lib';
7
7
  import Vue from 'vue';
8
- import { memoize, cloneDeep, get as get$3 } from 'lodash';
8
+ import { memoize, cloneDeep, findLastIndex, get as get$3 } from 'lodash';
9
9
  import QS from 'qs';
10
10
  import 'vant/lib/icon/index.css';
11
11
  import _Icon from 'vant/lib/icon';
12
12
  import cloneDeep$1 from 'lodash/cloneDeep';
13
- import axios from 'axios';
14
13
  import MD5 from 'md5';
15
14
  import CryptoJS from 'crypto-js';
16
15
  import 'vant/lib/button/index.css';
@@ -8481,12 +8480,27 @@ var jaxExports = requireJax();
8481
8480
  const Jax = /*@__PURE__*/getDefaultExportFromCjs(jaxExports);
8482
8481
 
8483
8482
  var getStandardOrigin = Jax.urlUtil.getStandardOrigin;
8483
+ var _Jax$parseUaString = Jax.parseUaString();
8484
+ _Jax$parseUaString.isApp;
8485
+ _Jax$parseUaString.appType;
8486
+ var appVersion = _Jax$parseUaString.appVersion;
8487
+ _Jax$parseUaString.isAndroid;
8488
+ var isIos$2 = _Jax$parseUaString.isIos;
8489
+ _Jax$parseUaString.isBxsApp;
8490
+ _Jax$parseUaString.isBaoXiaoZhuApp;
8491
+ _Jax$parseUaString.isBrokerApp;
8492
+ _Jax$parseUaString.isYjjApp;
8493
+ _Jax$parseUaString.isToBApp;
8494
+ _Jax$parseUaString.isRongYiBaoApp;
8495
+ _Jax$parseUaString.isWeChat;
8496
+ _Jax$parseUaString.appScheme;
8484
8497
  var hostname = window && window.location && window.location.hostname || '';
8485
8498
  /** 当前页 host 为 cppoc- 前缀时,请求 loading 使用 Vant Toast,否则走 appBridge */
8486
8499
  var IS_CPPOC_HOST = hostname.startsWith('cppoc-');
8487
8500
  var IS_PRODUCT_ENV = hostname.search(/(winbaoxian|ai-baoxiaozhu)\.com/) !== -1;
8488
8501
  hostname.search(/(winbaoxian|ai-baoxiaozhu)\.cn/) !== -1;
8489
8502
  var IS_LOCALHOST_ENV = hostname.search(/localhost|192\.168|127\.0\.0\.1|dev\.winbaoxian\.cn/) !== -1;
8503
+ var IS_LOCALHOST_IP_ENV = hostname.search(/192\.168/) !== -1;
8490
8504
  var IS_UAT_ENV = hostname.includes("pbf-uat.");
8491
8505
  var IS_ENABLE_DEBUG = !IS_PRODUCT_ENV;
8492
8506
  if (IS_ENABLE_DEBUG) {
@@ -8494,6 +8508,9 @@ if (IS_ENABLE_DEBUG) {
8494
8508
  }
8495
8509
  hostname.includes('ai-baoxiaozhu') ? 'ai-baoxiaozhu' : 'winbaoxian';
8496
8510
  function getFullOrigin(data) {
8511
+ if (IS_LOCALHOST_IP_ENV) {
8512
+ return "https://".concat(data, ".winbaoxian.cn");
8513
+ }
8497
8514
  var _prefixDomain = IS_CPPOC_HOST ? 'cppoc-' : '';
8498
8515
  if (typeof data === 'string') {
8499
8516
  return getStandardOrigin("".concat(_prefixDomain).concat(data));
@@ -8509,6 +8526,8 @@ function getFullOrigin(data) {
8509
8526
  var APP_HOSTNAME = getFullOrigin('app');
8510
8527
  getFullOrigin('pbf');
8511
8528
  var PLANBOOK_API_HOSTNAME = getFullOrigin("bxs-planbook-api".concat(IS_UAT_ENV ? '-uat' : ''));
8529
+ /** 险种试算等 trade 接口(insurance2a-api) */
8530
+ var INSURANCE2A_API_HOSTNAME = "https://insurance2a-api.wyins.net".concat(IS_PRODUCT_ENV ? '' : '.cn');
8512
8531
  getUrlParams();
8513
8532
  function getUrlParams(url) {
8514
8533
  var _url = location.search || '';
@@ -8534,37 +8553,253 @@ function hideLoading() {
8534
8553
  }
8535
8554
  }
8536
8555
 
8537
- var apiBaseUrl = "".concat(PLANBOOK_API_HOSTNAME, "/planBook");
8556
+ function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
8557
+ function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), true).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8558
+ var options$1 = {
8559
+ baseURL: PLANBOOK_API_HOSTNAME,
8560
+ withCredentials: true,
8561
+ timeout: 10000,
8562
+ headers: {
8563
+ 'X-Requested-With': 'XMLHttpRequest'
8564
+ }
8565
+ };
8566
+ var loadingTimer = null;
8567
+ var showRequestLoading = function showRequestLoading() {
8568
+ if (loadingTimer) {
8569
+ clearTimeout(loadingTimer);
8570
+ }
8571
+ loadingTimer = setTimeout(function () {
8572
+ showLoading();
8573
+ }, 300);
8574
+ };
8575
+ var hideRequestLoading = function hideRequestLoading() {
8576
+ if (loadingTimer) {
8577
+ hideLoading();
8578
+ }
8579
+ if (loadingTimer) {
8580
+ clearTimeout(loadingTimer);
8581
+ }
8582
+ };
8583
+ var normalizeMethod = function normalizeMethod(method) {
8584
+ return (method || 'get').toUpperCase();
8585
+ };
8586
+ var serializeParams = function serializeParams(params) {
8587
+ if (!params) {
8588
+ return '';
8589
+ }
8590
+ var queryParts = [];
8591
+ Object.keys(params).forEach(function (key) {
8592
+ var value = params[key];
8593
+ if (value === undefined || value === null) {
8594
+ return;
8595
+ }
8596
+ if (Array.isArray(value)) {
8597
+ value.forEach(function (item) {
8598
+ queryParts.push("".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(item)));
8599
+ });
8600
+ return;
8601
+ }
8602
+ queryParts.push("".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value)));
8603
+ });
8604
+ return queryParts.join('&');
8605
+ };
8606
+ var isAbsoluteUrl = function isAbsoluteUrl(url) {
8607
+ return /^https?:\/\//.test(url);
8608
+ };
8609
+ var buildUrl = function buildUrl(baseURL, url, params) {
8610
+ var queryString = serializeParams(params);
8611
+ var requestUrl = isAbsoluteUrl(url) ? url : "".concat(baseURL).concat(url);
8612
+ if (!queryString) {
8613
+ return requestUrl;
8614
+ }
8615
+ return "".concat(requestUrl).concat(requestUrl.includes('?') ? '&' : '?').concat(queryString);
8616
+ };
8617
+ var isPlainObject = function isPlainObject(value) {
8618
+ return Object.prototype.toString.call(value) === '[object Object]';
8619
+ };
8620
+ var buildBody = function buildBody(data, headers) {
8621
+ if (data === undefined || data === null) {
8622
+ return undefined;
8623
+ }
8624
+ if (data instanceof FormData || data instanceof Blob || typeof data === 'string') {
8625
+ return data;
8626
+ }
8627
+ if (isPlainObject(data) || Array.isArray(data)) {
8628
+ if (!headers['Content-Type']) {
8629
+ headers['Content-Type'] = 'application/json';
8630
+ }
8631
+ return JSON.stringify(data);
8632
+ }
8633
+ return data;
8634
+ };
8635
+ var parseResponse = /*#__PURE__*/function () {
8636
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(response) {
8637
+ var contentType, text;
8638
+ return _regeneratorRuntime.wrap(function (_context) {
8639
+ while (1) switch (_context.prev = _context.next) {
8640
+ case 0:
8641
+ contentType = response.headers.get('content-type') || '';
8642
+ if (!contentType.includes('application/json')) {
8643
+ _context.next = 1;
8644
+ break;
8645
+ }
8646
+ return _context.abrupt("return", response.json());
8647
+ case 1:
8648
+ _context.next = 2;
8649
+ return response.text();
8650
+ case 2:
8651
+ text = _context.sent;
8652
+ if (text) {
8653
+ _context.next = 3;
8654
+ break;
8655
+ }
8656
+ return _context.abrupt("return", {});
8657
+ case 3:
8658
+ _context.prev = 3;
8659
+ return _context.abrupt("return", JSON.parse(text));
8660
+ case 4:
8661
+ _context.prev = 4;
8662
+ _context["catch"](3);
8663
+ return _context.abrupt("return", {
8664
+ data: text
8665
+ });
8666
+ case 5:
8667
+ case "end":
8668
+ return _context.stop();
8669
+ }
8670
+ }, _callee, null, [[3, 4]]);
8671
+ }));
8672
+ return function parseResponse(_x) {
8673
+ return _ref.apply(this, arguments);
8674
+ };
8675
+ }();
8676
+ var createTimeoutError = function createTimeoutError(timeout) {
8677
+ var error = new Error("timeout of ".concat(timeout, "ms exceeded"));
8678
+ error.name = 'TimeoutError';
8679
+ return error;
8680
+ };
8681
+ var request = /*#__PURE__*/function () {
8682
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(config) {
8683
+ var url, _config$baseURL, baseURL, _config$method, method, params, data, _config$headers, headers, isIgnoreLoading, _config$timeout, timeout, _config$withCredentia, withCredentials, returnFullResponse, requestHeaders, timeoutId, fetchPromise, response, res, error, code, messageMap, message, _t2;
8684
+ return _regeneratorRuntime.wrap(function (_context2) {
8685
+ while (1) switch (_context2.prev = _context2.next) {
8686
+ case 0:
8687
+ url = config.url, _config$baseURL = config.baseURL, baseURL = _config$baseURL === void 0 ? options$1.baseURL : _config$baseURL, _config$method = config.method, method = _config$method === void 0 ? 'get' : _config$method, params = config.params, data = config.data, _config$headers = config.headers, headers = _config$headers === void 0 ? {} : _config$headers, isIgnoreLoading = config.isIgnoreLoading, _config$timeout = config.timeout, timeout = _config$timeout === void 0 ? options$1.timeout : _config$timeout, _config$withCredentia = config.withCredentials, withCredentials = _config$withCredentia === void 0 ? options$1.withCredentials : _config$withCredentia, returnFullResponse = config.returnFullResponse;
8688
+ if (!isIgnoreLoading) {
8689
+ showRequestLoading();
8690
+ }
8691
+ requestHeaders = _objectSpread$4(_objectSpread$4({}, options$1.headers), headers);
8692
+ timeoutId = null;
8693
+ _context2.prev = 1;
8694
+ fetchPromise = fetch(buildUrl(baseURL, url, params), {
8695
+ method: normalizeMethod(method),
8696
+ headers: requestHeaders,
8697
+ body: normalizeMethod(method) === 'GET' ? undefined : buildBody(data, requestHeaders),
8698
+ credentials: withCredentials ? 'include' : 'same-origin'
8699
+ });
8700
+ _context2.next = 2;
8701
+ return Promise.race([fetchPromise, new Promise(function (resolve, reject) {
8702
+ timeoutId = setTimeout(function () {
8703
+ reject(createTimeoutError(timeout));
8704
+ }, timeout);
8705
+ })]);
8706
+ case 2:
8707
+ response = _context2.sent;
8708
+ _context2.next = 3;
8709
+ return parseResponse(response);
8710
+ case 3:
8711
+ res = _context2.sent;
8712
+ if (response.ok) {
8713
+ _context2.next = 4;
8714
+ break;
8715
+ }
8716
+ error = new Error("Request failed with status code ".concat(response.status));
8717
+ error.response = {
8718
+ status: response.status,
8719
+ data: res
8720
+ };
8721
+ throw error;
8722
+ case 4:
8723
+ code = res.code;
8724
+ if (!['002012', '002013', '002015'].includes(code)) {
8725
+ _context2.next = 5;
8726
+ break;
8727
+ }
8728
+ messageMap = {
8729
+ m002012: '当前账号因操作频繁被限制,请明天再试。感谢理解',
8730
+ m002013: '您的操作频率较高,已达到今日生成上限。请稍后再试或明天继续使用,感谢您的理解!',
8731
+ m002015: '您今天做了太多计划书了,休息一下,明天再来吧'
8732
+ };
8733
+ message = messageMap["m".concat(code)];
8734
+ if (message) {
8735
+ _Dialog.alert({
8736
+ message: message,
8737
+ confirmButtonText: '知道了',
8738
+ confirmButtonColor: '#0A64FE'
8739
+ });
8740
+ }
8741
+ return _context2.abrupt("return", Promise.reject({
8742
+ code: code,
8743
+ message: message
8744
+ }));
8745
+ case 5:
8746
+ if (!(code === 401 || res.status === 401)) {
8747
+ _context2.next = 6;
8748
+ break;
8749
+ }
8750
+ gotoLogin();
8751
+ return _context2.abrupt("return", Promise.reject('status: 401'));
8752
+ case 6:
8753
+ if (!(res.success && res.data === -1)) {
8754
+ _context2.next = 7;
8755
+ break;
8756
+ }
8757
+ gotoLogin();
8758
+ return _context2.abrupt("return", Promise.reject('login: -1'));
8759
+ case 7:
8760
+ return _context2.abrupt("return", returnFullResponse ? res : res.data);
8761
+ case 8:
8762
+ _context2.prev = 8;
8763
+ _t2 = _context2["catch"](1);
8764
+ if (_t2.response && _t2.response.status == 401) {
8765
+ gotoLogin();
8766
+ }
8767
+ return _context2.abrupt("return", Promise.reject(_t2));
8768
+ case 9:
8769
+ _context2.prev = 9;
8770
+ if (timeoutId) {
8771
+ clearTimeout(timeoutId);
8772
+ }
8773
+ hideRequestLoading();
8774
+ return _context2.finish(9);
8775
+ case 10:
8776
+ case "end":
8777
+ return _context2.stop();
8778
+ }
8779
+ }, _callee2, null, [[1, 8, 9, 10]]);
8780
+ }));
8781
+ return function request(_x2) {
8782
+ return _ref2.apply(this, arguments);
8783
+ };
8784
+ }();
8785
+
8538
8786
  function initInsuranceInterest(reqParams) {
8539
8787
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8540
8788
  var scene = options.scene;
8541
8789
  var apis = {
8542
- init: "".concat(apiBaseUrl, "/interest/init"),
8543
- init4: "".concat(apiBaseUrl, "/public/interest/product/init"),
8544
- init5: "".concat(apiBaseUrl, "/insurance/compare/draw/init")
8790
+ init: '/planBook/interest/init',
8791
+ init4: '/planBook/public/interest/product/init',
8792
+ init5: '/planBook/insurance/compare/draw/init'
8545
8793
  };
8546
8794
  var api = apis["init".concat([4, 5].includes(scene) ? scene : '')];
8547
- showLoading();
8548
- return fetch(api, {
8549
- method: 'POST',
8550
- credentials: 'include',
8795
+ return request({
8796
+ url: api,
8797
+ method: 'post',
8798
+ data: reqParams,
8551
8799
  headers: {
8552
8800
  Accept: 'application/json, text/plain, */*',
8553
8801
  'Content-Type': 'application/json;'
8554
- },
8555
- body: JSON.stringify(reqParams)
8556
- }).then(function (response) {
8557
- return response.json();
8558
- }).then(function (_ref) {
8559
- var success = _ref.success,
8560
- data = _ref.data,
8561
- info = _ref.info;
8562
- if (!success || !data) {
8563
- return Promise.reject(info);
8564
- }
8565
- return Promise.resolve(data);
8566
- }).finally(function () {
8567
- hideLoading();
8802
+ }
8568
8803
  });
8569
8804
  }
8570
8805
  function getInsuranceInterestDetail(reqParams) {
@@ -8572,35 +8807,23 @@ function getInsuranceInterestDetail(reqParams) {
8572
8807
  var scene = options.scene,
8573
8808
  isReduceBaof = options.isReduceBaof;
8574
8809
  var apis = {
8575
- addAndTake: "".concat(apiBaseUrl, "/interest/addAndTake/detail"),
8576
- addAndTake4: "".concat(apiBaseUrl, "/public/interest/addAndTake/detail"),
8577
- addAndTake5: "".concat(apiBaseUrl, "/interest/addAndTake/detail"),
8578
- draw: "".concat(apiBaseUrl, "/interest/draw/detail"),
8579
- draw4: "".concat(apiBaseUrl, "/public/interest/draw/detail"),
8580
- draw5: "".concat(apiBaseUrl, "/insurance/compare/draw/detail")
8810
+ addAndTake: '/planBook/interest/addAndTake/detail',
8811
+ addAndTake4: '/planBook/public/interest/addAndTake/detail',
8812
+ addAndTake5: '/planBook/interest/addAndTake/detail',
8813
+ draw: '/planBook/interest/draw/detail',
8814
+ draw4: '/planBook/public/interest/draw/detail',
8815
+ draw5: '/planBook/insurance/compare/draw/detail'
8581
8816
  };
8582
- var _type = isReduceBaof ? 'draw' : 'addAndTake';
8583
- var api = apis["".concat(_type).concat([4, 5].includes(scene) ? scene : '')];
8584
- showLoading();
8585
- return fetch(api, {
8586
- method: 'POST',
8587
- credentials: 'include',
8817
+ var type = isReduceBaof ? 'draw' : 'addAndTake';
8818
+ var api = apis["".concat(type).concat([4, 5].includes(scene) ? scene : '')];
8819
+ return request({
8820
+ url: api,
8821
+ method: 'post',
8822
+ data: reqParams,
8588
8823
  headers: {
8589
8824
  Accept: 'application/json, text/plain, */*',
8590
8825
  'Content-Type': 'application/json;'
8591
- },
8592
- body: JSON.stringify(reqParams)
8593
- }).then(function (response) {
8594
- return response.json();
8595
- }).then(function (res) {
8596
- var success = res.success,
8597
- data = res.data;
8598
- if (!success || !data) {
8599
- return Promise.reject(res);
8600
- }
8601
- return Promise.resolve(data);
8602
- }).finally(function () {
8603
- hideLoading();
8826
+ }
8604
8827
  });
8605
8828
  }
8606
8829
 
@@ -8801,45 +9024,6 @@ function converUnit10000(value) {
8801
9024
  return value >= 10000 && !(value % 10000) ? "".concat(value / 10000, "\u4E07") : value;
8802
9025
  }
8803
9026
 
8804
- /**
8805
- * **对象的深拷贝**
8806
- * @ignore
8807
- * @author Lizhao <lz@winbaoxian.com>
8808
- * @date 2022-04-25
8809
- * @param {object} obj - 必传
8810
- * @param {WeakMap} hash - 可不传
8811
- * @returns {object} 拷贝对象
8812
- */
8813
- function deepCopy(obj) {
8814
- var hash = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new WeakMap();
8815
- if (!obj || _typeof$2(obj) !== 'object') {
8816
- return obj;
8817
- }
8818
- if (hash.has(obj)) {
8819
- return hash.get(obj);
8820
- }
8821
- var newObj;
8822
- var Constructor = obj.constructor;
8823
- switch (Constructor) {
8824
- case RegExp:
8825
- newObj = new Constructor(obj);
8826
- break;
8827
- case Date:
8828
- newObj = new Constructor(obj.getTime());
8829
- break;
8830
- default:
8831
- newObj = new Constructor();
8832
- break;
8833
- }
8834
- hash.set(obj, newObj);
8835
- for (var key in obj) {
8836
- if (obj.hasOwnProperty(key)) {
8837
- newObj[key] = _typeof$2(obj[key]) === 'object' ? deepCopy(obj[key], hash) : obj[key];
8838
- }
8839
- }
8840
- return newObj;
8841
- }
8842
-
8843
9027
  /**
8844
9028
  * **根据生日算年龄**
8845
9029
  * @author Lizhao <lz@winbaoxian.com>
@@ -8925,6 +9109,9 @@ function textOverflowEllipsis(str, n) {
8925
9109
  }
8926
9110
  function getExpressionParamMap(personData, product, ins, options) {
8927
9111
  var map = {
9112
+ user: {},
9113
+ executeSource: null,
9114
+ // 执行:init-初始化 import-导入数据 userAction-用户操作 confirm-确认
8928
9115
  planbookId: null,
8929
9116
  // 计划书id
8930
9117
  productId: null,
@@ -8998,12 +9185,18 @@ function getExpressionParamMap(personData, product, ins, options) {
8998
9185
  }
8999
9186
  }
9000
9187
  if (options) {
9188
+ if (options.user) {
9189
+ map.user = options.user;
9190
+ }
9001
9191
  if (options.planbookId) {
9002
9192
  map.planbookId = options.planbookId;
9003
9193
  }
9004
9194
  if (options.eventTarget) {
9005
9195
  map.t = options.eventTarget;
9006
9196
  }
9197
+ if (options.executeSource) {
9198
+ map.executeSource = options.executeSource;
9199
+ }
9007
9200
  }
9008
9201
  if (ins && ins.customVariableExp) {
9009
9202
  var exp = ins.customVariableExp.replace(/(%)(\d+)(\.*\w*)(%)/g, 'map.i$2$3').replace(/(%)(\w*\.*\w*)(%)/g, 'map.$2');
@@ -9129,6 +9322,15 @@ function initPersonData(inputData, verifyData) {
9129
9322
  if (!person || !person.eleOrderList) {
9130
9323
  return;
9131
9324
  }
9325
+
9326
+ // 投保人年龄默认范围调整到「16-99岁」。From hyw
9327
+ if (person.key === 'applicantInfo') {
9328
+ person.eleOrderList.forEach(function (ele) {
9329
+ if (ele.key === 'age') {
9330
+ ele.opts = [16, 99];
9331
+ }
9332
+ });
9333
+ }
9132
9334
  person.createArchive = person.createArchive || false;
9133
9335
  person.cid = person.cid || null;
9134
9336
  if (!person.eleOrderList.find(function (e) {
@@ -9141,7 +9343,7 @@ function initPersonData(inputData, verifyData) {
9141
9343
  placeholder: '请输入姓名',
9142
9344
  componentName: 'cmCommonInput',
9143
9345
  maxlength: 16,
9144
- isHide: false
9346
+ isHide: true
9145
9347
  });
9146
9348
  }
9147
9349
  // 投保人添加元素:投被保人是同一人
@@ -9254,7 +9456,7 @@ function initPersonData(inputData, verifyData) {
9254
9456
  }
9255
9457
  case 'age':
9256
9458
  {
9257
- e.label = '年龄';
9459
+ e.label = '投保时年龄';
9258
9460
  e.componentName = 'cmAgeBirthday';
9259
9461
  e.placeholder = '请选择年龄';
9260
9462
  e.options = [];
@@ -9514,6 +9716,30 @@ function convertPersonData(allPersonsData) {
9514
9716
  }
9515
9717
  }
9516
9718
 
9719
+ function getPlanbookRecommendData(params) {
9720
+ return request({
9721
+ url: '/planBook/input/calculate/recommend',
9722
+ method: 'post',
9723
+ data: params,
9724
+ headers: {
9725
+ Accept: 'application/json, text/plain, */*',
9726
+ 'Content-Type': 'application/json;'
9727
+ }
9728
+ });
9729
+ }
9730
+ function getPlanbookInsuranceVerifyData(params) {
9731
+ return request({
9732
+ baseURL: APP_HOSTNAME,
9733
+ url: '/planBook/input/insurance/verifyData',
9734
+ method: 'post',
9735
+ data: params,
9736
+ headers: {
9737
+ Accept: 'application/json, text/plain, */*',
9738
+ 'Content-Type': 'application/json;'
9739
+ }
9740
+ });
9741
+ }
9742
+
9517
9743
  function _arrayLikeToArray$1(r, a) {
9518
9744
  (null == a || a > r.length) && (a = r.length);
9519
9745
  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
@@ -9581,8 +9807,8 @@ function _slicedToArray(r, e) {
9581
9807
  return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray$1(r, e) || _nonIterableRest();
9582
9808
  }
9583
9809
 
9584
- function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9585
- function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), true).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
9810
+ function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9811
+ function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), true).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
9586
9812
 
9587
9813
  /**
9588
9814
  * **初始化险种数据**
@@ -9660,7 +9886,7 @@ function initInsuranceData(insData) {
9660
9886
  }
9661
9887
  if (e.opts && e.opts.length) {
9662
9888
  e.opts = e.opts.map(function (o) {
9663
- return _objectSpread$4(_objectSpread$4({}, o), {}, {
9889
+ return _objectSpread$3(_objectSpread$3({}, o), {}, {
9664
9890
  desc: o.desc || o.val,
9665
9891
  isHide: o.isHide || null,
9666
9892
  isDisabled: o.isDisabled || null,
@@ -9668,6 +9894,26 @@ function initInsuranceData(insData) {
9668
9894
  });
9669
9895
  });
9670
9896
  }
9897
+ if (e.componentName === 'cmCommonInput') {
9898
+ // 输入框,默认打开普通键盘。From hyw
9899
+ if (!e.inputType) {
9900
+ e.inputType = 'text';
9901
+ }
9902
+ if (['baoe', 'baof', 'payModePremium', 'num'].includes(e.key)) {
9903
+ // 输入框,默认2位小数。From hyw
9904
+ if (!e.regExp) {
9905
+ e.regExp = '/^\\d{1,9}(\\.\\d{1,2})?$/';
9906
+ e.regExpMessage = '请输入最多9位整数和最多2位小数';
9907
+ e.maxlength = 12;
9908
+ e.inputType = 'decimal';
9909
+ }
9910
+ // 输入框,整数值,使用数字键盘。From hyw
9911
+ if (e.regExp === '/^\\d{1,}$/') {
9912
+ e.maxlength = 9;
9913
+ e.inputType = 'tel';
9914
+ }
9915
+ }
9916
+ }
9671
9917
  });
9672
9918
  }
9673
9919
 
@@ -9890,7 +10136,7 @@ function restrictElementsInInsurance(_ref4) {
9890
10136
  var insuranceInfo = convertEleOrderListToObj(insData);
9891
10137
  var insVerifyData;
9892
10138
  if (insuredInfo) {
9893
- insVerifyData = _objectSpread$4({
10139
+ insVerifyData = _objectSpread$3({
9894
10140
  sex: insuredInfo.sex,
9895
10141
  age: insuredInfo.age
9896
10142
  }, insuranceInfo);
@@ -9948,8 +10194,8 @@ function restrictElementsInInsurance(_ref4) {
9948
10194
  return errorMsg;
9949
10195
  }
9950
10196
 
9951
- function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9952
- function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), true).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10197
+ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
10198
+ function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
9953
10199
 
9954
10200
  /**
9955
10201
  * **初始化产品数据(单个)**
@@ -9976,6 +10222,7 @@ function initProductData(prodData) {
9976
10222
  prodData.mulInsOrderList.forEach(function (ins) {
9977
10223
  initInsuranceData(ins);
9978
10224
  });
10225
+ setCommonInfo(prodData);
9979
10226
  return prodData;
9980
10227
  }
9981
10228
 
@@ -10009,36 +10256,22 @@ function productDataHandler(_x, _x2, _x3, _x4) {
10009
10256
  */
10010
10257
  function _productDataHandler() {
10011
10258
  _productDataHandler = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(prodData, prodVerifyData, personData, parmas) {
10012
- var productVerifyData, _parmas$eventTarget, insuranceKey, elementKey, groupInsurance, groupInsuranceIdEle, subInsurances, hasProduct, hasVerifyData, hasPersonData, personOrderList, _prodData$mulInsOrder3;
10259
+ var _ref4, eventTarget, productVerifyData, insuranceKey, elementKey, groupInsurance, groupInsuranceIdEle, subInsurances, hasProduct, hasVerifyData, hasPersonData, personOrderList, _prodData$mulInsOrder3;
10013
10260
  return _regeneratorRuntime.wrap(function (_context) {
10014
10261
  while (1) switch (_context.prev = _context.next) {
10015
10262
  case 0:
10016
- if (prodData) {
10017
- _context.next = 1;
10263
+ if (!prodData) {
10264
+ _context.next = 2;
10018
10265
  break;
10019
10266
  }
10020
- return _context.abrupt("return", prodData);
10267
+ _ref4 = parmas || {}, eventTarget = _ref4.eventTarget;
10268
+ _context.next = 1;
10269
+ return getSingleInsurancesVerifyData(prodVerifyData, prodData, personData, parmas).catch(function () {});
10021
10270
  case 1:
10022
- productVerifyData = null;
10023
- if (prodData.multipleInsured) {
10024
- multipleInsuredHandler(personData);
10025
- }
10026
- if (!(prodData.feeValidateMode === 'single' || prodVerifyData && prodVerifyData.feeValidateMode === 'single')) {
10027
- _context.next = 3;
10028
- break;
10029
- }
10030
- _context.next = 2;
10031
- return getSingleInsurancesVerifyData(prodData, personData, parmas).catch(function () {});
10032
- case 2:
10033
10271
  productVerifyData = _context.sent;
10034
- _context.next = 4;
10035
- break;
10036
- case 3:
10037
- productVerifyData = prodVerifyData;
10038
- case 4:
10039
10272
  // 组合险种特殊处理:当用户点击组合险种的子险种选项时,将其他子险种的标题设置为未选中状态
10040
- if (parmas && parmas.eventTarget) {
10041
- _parmas$eventTarget = parmas.eventTarget, insuranceKey = _parmas$eventTarget.insuranceKey, elementKey = _parmas$eventTarget.elementKey;
10273
+ if (eventTarget) {
10274
+ insuranceKey = eventTarget.insuranceKey, elementKey = eventTarget.elementKey;
10042
10275
  if (insuranceKey && elementKey === 'insuranceId') {
10043
10276
  groupInsurance = (prodData.mulInsOrderList || []).find(function (ins) {
10044
10277
  return ins.key === insuranceKey;
@@ -10067,7 +10300,6 @@ function _productDataHandler() {
10067
10300
  personOrderList = convertPersonData(personData, personData.personOrderList.map(function (p) {
10068
10301
  return p.key;
10069
10302
  }));
10070
- setCommonInfo(prodData);
10071
10303
  (_prodData$mulInsOrder3 = prodData.mulInsOrderList) === null || _prodData$mulInsOrder3 === void 0 || _prodData$mulInsOrder3.forEach(function (ins, ii, insList) {
10072
10304
  var _ins$eleOrderList;
10073
10305
  insuranceDataHandler(ins, prodData);
@@ -10301,8 +10533,9 @@ function _productDataHandler() {
10301
10533
  }
10302
10534
  setGroupInsurance(prodData);
10303
10535
  isHideProduct(prodData, productVerifyData, personOrderList);
10536
+ case 2:
10304
10537
  return _context.abrupt("return", prodData);
10305
- case 5:
10538
+ case 3:
10306
10539
  case "end":
10307
10540
  return _context.stop();
10308
10541
  }
@@ -10310,32 +10543,34 @@ function _productDataHandler() {
10310
10543
  }));
10311
10544
  return _productDataHandler.apply(this, arguments);
10312
10545
  }
10313
- function multipleInsuredHandler(personData) {
10314
- var personOrderList = personData.personOrderList;
10315
- if (!(personOrderList && personOrderList.length)) {
10316
- return null;
10317
- }
10318
- var insured2Info = personOrderList.find(function (p) {
10319
- return p.key === 'insured2Info';
10320
- });
10321
- if (!insured2Info) {
10322
- var insuredInfo = personOrderList.find(function (p) {
10323
- return p.key === 'insuredInfo';
10324
- });
10325
- var insuredIndex = personOrderList.findIndex(function (p) {
10326
- return p.key === 'insuredInfo';
10546
+ function multipleInsuredHandler(prodData, personData) {
10547
+ if (prodData && prodData.multipleInsured) {
10548
+ var personOrderList = personData.personOrderList;
10549
+ if (!(personOrderList && personOrderList.length)) {
10550
+ return null;
10551
+ }
10552
+ var insured2Info = personOrderList.find(function (p) {
10553
+ return p.key === 'insured2Info';
10327
10554
  });
10328
- if (insuredIndex >= 0) {
10329
- var person = cloneDeep(insuredInfo);
10330
- person.key = 'insured2Info';
10331
- person.eleOrderList.forEach(function (e) {
10332
- if (e.key === 'title') {
10333
- e.isDisabled = false;
10334
- e.value = true;
10335
- e.label = '第二被保人信息';
10336
- }
10555
+ if (!insured2Info) {
10556
+ var insuredInfo = personOrderList.find(function (p) {
10557
+ return p.key === 'insuredInfo';
10558
+ });
10559
+ var insuredIndex = personOrderList.findIndex(function (p) {
10560
+ return p.key === 'insuredInfo';
10337
10561
  });
10338
- personOrderList.splice(insuredIndex + 1, 0, person);
10562
+ if (insuredIndex >= 0) {
10563
+ var person = cloneDeep(insuredInfo);
10564
+ person.key = 'insured2Info';
10565
+ person.eleOrderList.forEach(function (e) {
10566
+ if (e.key === 'title') {
10567
+ e.isDisabled = false;
10568
+ e.value = true;
10569
+ e.label = '第二被保人信息';
10570
+ }
10571
+ });
10572
+ personOrderList.splice(insuredIndex + 1, 0, person);
10573
+ }
10339
10574
  }
10340
10575
  }
10341
10576
  return personData;
@@ -10350,63 +10585,67 @@ function multipleInsuredHandler(personData) {
10350
10585
  * @param {IPbPersons} personData 必传。人员信息,包括被保人、投保人、投保人配偶
10351
10586
  * @returns 请求函数的 Promise
10352
10587
  */
10353
- function getSingleInsurancesVerifyData(prodData, personData) {
10354
- var _prodData$mulInsOrder, _prodData$mulInsOrder2;
10355
- var parmas = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
10356
- var personOrderList = personData.personOrderList;
10357
- if (!(personOrderList && personOrderList.length)) {
10358
- return null;
10359
- }
10360
- var pbId = prodData.isTemp || prodData.policyType === 'single_insurance' ? null : parmas.planbookId;
10361
- var productId = prodData.policyType === 'single_insurance' ? null : prodData.key;
10362
- // 险种对比,prodData 没有 feeValidateMode 字段。因此需要特殊处理。
10363
- // 险种对比,以险种为维度,其 prodData.key 就是险种id,不能当成正常产品id。因此需要特殊处理。
10364
- if (prodData.feeValidateMode !== 'single') {
10365
- productId = null;
10366
- }
10367
- var insuredList = personOrderList.filter(function (p) {
10368
- return ['insuredInfo', 'insured2Info'].includes(p.key);
10369
- }).filter(function (p) {
10370
- var _p$eleOrderList;
10371
- var title = (_p$eleOrderList = p.eleOrderList) === null || _p$eleOrderList === void 0 ? void 0 : _p$eleOrderList.find(function (e) {
10372
- return e.key === 'title';
10588
+ function getSingleInsurancesVerifyData(verifyData, prodData, personData) {
10589
+ var parmas = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
10590
+ var isSingleFeeValidateMode = prodData && prodData.feeValidateMode === 'single' || verifyData && verifyData.feeValidateMode === 'single';
10591
+ if (isSingleFeeValidateMode) {
10592
+ var _prodData$mulInsOrder, _prodData$mulInsOrder2;
10593
+ var personOrderList = personData.personOrderList;
10594
+ if (!(personOrderList && personOrderList.length)) {
10595
+ return null;
10596
+ }
10597
+ var pbId = prodData.isTemp || prodData.policyType === 'single_insurance' ? null : parmas.planbookId;
10598
+ var productId = prodData.policyType === 'single_insurance' ? null : prodData.key;
10599
+ // 险种对比,prodData 没有 feeValidateMode 字段。因此需要特殊处理。
10600
+ // 险种对比,以险种为维度,其 prodData.key 就是险种id,不能当成正常产品id。因此需要特殊处理。
10601
+ if (prodData.feeValidateMode !== 'single') {
10602
+ productId = null;
10603
+ }
10604
+ var insuredList = personOrderList.filter(function (p) {
10605
+ return ['insuredInfo', 'insured2Info'].includes(p.key);
10606
+ }).filter(function (p) {
10607
+ var _p$eleOrderList;
10608
+ var title = (_p$eleOrderList = p.eleOrderList) === null || _p$eleOrderList === void 0 ? void 0 : _p$eleOrderList.find(function (e) {
10609
+ return e.key === 'title';
10610
+ });
10611
+ return title && title.value || p.title;
10612
+ }).map(function (p) {
10613
+ var person = convertEleOrderListToObj(p);
10614
+ return {
10615
+ key: person.key,
10616
+ sex: person.sex,
10617
+ age: person.age
10618
+ };
10619
+ });
10620
+ var applicant = null;
10621
+ var applicantItem = personData.personOrderList.find(function (p) {
10622
+ return p.key === 'applicantInfo';
10623
+ });
10624
+ if (applicantItem) {
10625
+ var person = convertEleOrderListToObj(applicantItem);
10626
+ applicant = {
10627
+ key: person.key,
10628
+ sex: person.sex,
10629
+ age: person.age
10630
+ };
10631
+ }
10632
+ var insuranceIdList = prodData === null || prodData === void 0 || (_prodData$mulInsOrder = prodData.mulInsOrderList) === null || _prodData$mulInsOrder === void 0 ? void 0 : _prodData$mulInsOrder.map(function (ins) {
10633
+ return ins.key;
10634
+ }).filter(function (k) {
10635
+ return !['common'].includes(k);
10636
+ });
10637
+ prodData === null || prodData === void 0 || (_prodData$mulInsOrder2 = prodData.mulInsOrderList) === null || _prodData$mulInsOrder2 === void 0 || _prodData$mulInsOrder2.reduce(function (list, ins) {
10638
+ return ins.key === 'common' || ins.isGroup ? list : list.concat(ins.key);
10639
+ }, []);
10640
+ return getAndCacheInsurancesVerifyData({
10641
+ pbId: pbId,
10642
+ productId: productId,
10643
+ insuredList: insuredList,
10644
+ applicant: applicant,
10645
+ insuranceIdList: insuranceIdList
10373
10646
  });
10374
- return title && title.value || p.title;
10375
- }).map(function (p) {
10376
- var person = convertEleOrderListToObj(p);
10377
- return {
10378
- key: person.key,
10379
- sex: person.sex,
10380
- age: person.age
10381
- };
10382
- });
10383
- var applicant = null;
10384
- var applicantItem = personData.personOrderList.find(function (p) {
10385
- return p.key === 'applicantInfo';
10386
- });
10387
- if (applicantItem) {
10388
- var person = convertEleOrderListToObj(applicantItem);
10389
- applicant = {
10390
- key: person.key,
10391
- sex: person.sex,
10392
- age: person.age
10393
- };
10394
10647
  }
10395
- var insuranceIdList = prodData === null || prodData === void 0 || (_prodData$mulInsOrder = prodData.mulInsOrderList) === null || _prodData$mulInsOrder === void 0 ? void 0 : _prodData$mulInsOrder.map(function (ins) {
10396
- return ins.key;
10397
- }).filter(function (k) {
10398
- return !['common'].includes(k);
10399
- });
10400
- prodData === null || prodData === void 0 || (_prodData$mulInsOrder2 = prodData.mulInsOrderList) === null || _prodData$mulInsOrder2 === void 0 || _prodData$mulInsOrder2.reduce(function (list, ins) {
10401
- return ins.key === 'common' || ins.isGroup ? list : list.concat(ins.key);
10402
- }, []);
10403
- return getAndCacheInsurancesVerifyData({
10404
- pbId: pbId,
10405
- productId: productId,
10406
- insuredList: insuredList,
10407
- applicant: applicant,
10408
- insuranceIdList: insuranceIdList
10409
- });
10648
+ return Promise.resolve(verifyData);
10410
10649
  }
10411
10650
 
10412
10651
  /**
@@ -10418,25 +10657,7 @@ function getSingleInsurancesVerifyData(prodData, personData) {
10418
10657
  * @returns {Promise<any>} 产品下所有险种的费率
10419
10658
  */
10420
10659
  var getAndCacheInsurancesVerifyData = memoize(function (params) {
10421
- var url = "".concat(APP_HOSTNAME, "/planBook/input/insurance/verifyData");
10422
- return fetch(url, {
10423
- method: 'POST',
10424
- credentials: 'include',
10425
- headers: {
10426
- Accept: 'application/json, text/plain, */*',
10427
- 'Content-Type': 'application/json;'
10428
- },
10429
- body: JSON.stringify(params)
10430
- }).then(function (response) {
10431
- return response.json();
10432
- }).then(function (_ref) {
10433
- var success = _ref.success,
10434
- data = _ref.data;
10435
- if (!success || !data) {
10436
- return Promise.reject();
10437
- }
10438
- return Promise.resolve(data);
10439
- }).catch(function () {});
10660
+ return getPlanbookInsuranceVerifyData(params).catch(function () {});
10440
10661
  }, function (params) {
10441
10662
  return QS.stringify(params);
10442
10663
  });
@@ -10447,10 +10668,10 @@ function getElementVerifyFromProductVerify(verify, insurances, option) {
10447
10668
  var insuranceInfo = {};
10448
10669
  insurances.forEach(function (ins) {
10449
10670
  if (['common', option.insuranceKey].includes(ins.key)) {
10450
- insuranceInfo = _objectSpread$3(_objectSpread$3({}, insuranceInfo), convertEleOrderListToObj(ins));
10671
+ insuranceInfo = _objectSpread$2(_objectSpread$2({}, insuranceInfo), convertEleOrderListToObj(ins));
10451
10672
  }
10452
10673
  });
10453
- insuranceInfo = _objectSpread$3(_objectSpread$3({}, insuranceInfo), option);
10674
+ insuranceInfo = _objectSpread$2(_objectSpread$2({}, insuranceInfo), option);
10454
10675
  var temp = verify;
10455
10676
  var hasElementKey = verify.key === option.elementKey;
10456
10677
  while (temp && temp.key && temp.key !== option.elementKey) {
@@ -10641,7 +10862,7 @@ function setGroupInsurance(prodData) {
10641
10862
  }
10642
10863
  }
10643
10864
  }
10644
- var index = mulInsOrderList.findLastIndex(function (ins) {
10865
+ var index = findLastIndex(mulInsOrderList, function (ins) {
10645
10866
  return ins.groupKey === k;
10646
10867
  });
10647
10868
  if (index >= 0) {
@@ -10663,21 +10884,21 @@ function setGroupInsurance(prodData) {
10663
10884
  * @author Lizhao <lz@winbaoxian.com>
10664
10885
  * @date 2022-04-26
10665
10886
  * @param {IPbProduct} prodData 必传。产品数据(单个)
10666
- * @param {object} productVerifyData 必传。产品限制条件(单个)
10887
+ * @param {object} prodVerifyData 必传。产品限制条件(单个)
10667
10888
  * @param {IPbPerson} personOrderList 必传。转换后的人员信息,包括被保人、投保人、投保人配偶
10668
10889
  * @returns {object} 产品数据(单个)
10669
10890
  */
10670
- function isHideProduct(prodData, productVerifyData, personOrderList) {
10891
+ function isHideProduct(prodData, prodVerifyData, personOrderList) {
10671
10892
  var ageRangeProd = {};
10672
- if (prodData && productVerifyData && Object.keys(productVerifyData).length && personOrderList) {
10893
+ if (prodData && prodVerifyData && Object.keys(prodVerifyData).length && personOrderList) {
10673
10894
  if (prodData.mulInsOrderList) {
10674
10895
  // 产品中是否有必选险种且有费率
10675
10896
  var hasRequiredIns = prodData.mulInsOrderList.some(function (ins) {
10676
- return !!ins.required && productVerifyData[ins.key];
10897
+ return !!ins.required && prodVerifyData[ins.key];
10677
10898
  });
10678
10899
  prodData.mulInsOrderList.forEach(function (ins) {
10679
10900
  // 当前险种的限制条件
10680
- var insuranceVerifyData = productVerifyData[ins.key];
10901
+ var insuranceVerifyData = prodVerifyData[ins.key];
10681
10902
  if (insuranceVerifyData) {
10682
10903
  // 产品年龄范围取各险种最大范围
10683
10904
  if ((!ins.huomian || ins.huomian == 'beiHuomian') && (!hasRequiredIns || hasRequiredIns && ins.required)) {
@@ -10689,11 +10910,11 @@ function isHideProduct(prodData, productVerifyData, personOrderList) {
10689
10910
  }
10690
10911
  });
10691
10912
  }
10692
- var _ref2 = personOrderList.find(function (p) {
10913
+ var _ref = personOrderList.find(function (p) {
10693
10914
  return p.key === 'insuredInfo';
10694
10915
  }),
10695
- sex = _ref2.sex,
10696
- age = _ref2.age;
10916
+ sex = _ref.sex,
10917
+ age = _ref.age;
10697
10918
  if (ageRangeProd[sex] && age >= ageRangeProd[sex][0] && age <= ageRangeProd[sex][1]) {
10698
10919
  prodData.hide = false;
10699
10920
  } else {
@@ -10719,11 +10940,11 @@ function isHideProduct(prodData, productVerifyData, personOrderList) {
10719
10940
  * @param {IInsElement} params.eleData 可不传。元素数据,当前交互的元素(如:用户修改了该险种的交费期间)
10720
10941
  * @returns {string} 校验结果。空表示校验通过
10721
10942
  */
10722
- function verifyProductRules(_ref3) {
10723
- var personData = _ref3.personData,
10724
- productData = _ref3.productData,
10725
- insData = _ref3.insData,
10726
- eleData = _ref3.eleData;
10943
+ function verifyProductRules(_ref2) {
10944
+ var personData = _ref2.personData,
10945
+ productData = _ref2.productData,
10946
+ insData = _ref2.insData,
10947
+ eleData = _ref2.eleData;
10727
10948
  var errorMsg = '';
10728
10949
  var personOrderList = convertPersonData(personData, personData.personOrderList.map(function (p) {
10729
10950
  return p.key;
@@ -10769,11 +10990,11 @@ function verifyProductRules(_ref3) {
10769
10990
  * @param {eleData} params.eleData 可不传。元素数据,当前交互的元素(如:用户修改了该险种的交费期间)
10770
10991
  * @returns {string} 校验结果。空表示校验通过
10771
10992
  */
10772
- function restrictInsurancesInProduct(_ref4) {
10773
- var personOrderList = _ref4.personOrderList,
10774
- productData = _ref4.productData,
10775
- insData = _ref4.insData,
10776
- eleData = _ref4.eleData;
10993
+ function restrictInsurancesInProduct(_ref3) {
10994
+ var personOrderList = _ref3.personOrderList,
10995
+ productData = _ref3.productData,
10996
+ insData = _ref3.insData,
10997
+ eleData = _ref3.eleData;
10777
10998
  var errorMsg = '';
10778
10999
  var restrictList = productData.restrictList;
10779
11000
  if (restrictList && restrictList.length) {
@@ -10782,16 +11003,16 @@ function restrictInsurancesInProduct(_ref4) {
10782
11003
  return p.key === 'insuredInfo';
10783
11004
  });
10784
11005
  var productInfo = convertProductData(productData);
10785
- var prodVerifyData = {
11006
+ var evalVerifyMap = {
10786
11007
  age: insuredInfo.age,
10787
11008
  sex: insuredInfo.sex,
10788
11009
  common: productInfo.common
10789
11010
  };
10790
11011
  productInfo.mulInsOrderList.forEach(function (ins) {
10791
- prodVerifyData['i' + ins.key] = ins;
11012
+ evalVerifyMap['i' + ins.key] = ins;
10792
11013
  });
10793
- restrict.rCondition = restrict.rCondition.replace(/(%)(\d+)(\.*\w*)(%)/g, 'prodVerifyData.i$2$3');
10794
- restrict.rCondition = restrict.rCondition.replace(/(%)(\w*\.*\w*)(%)/g, 'prodVerifyData.$2');
11014
+ restrict.rCondition = restrict.rCondition.replace(/(%)(\d+)(\.*\w*)(%)/g, 'evalVerifyMap.i$2$3');
11015
+ restrict.rCondition = restrict.rCondition.replace(/(%)(\w*\.*\w*)(%)/g, 'evalVerifyMap.$2');
10795
11016
  var curIns = productData.mulInsOrderList.find(function (ins) {
10796
11017
  return ins.key === restrict.rInsKey;
10797
11018
  });
@@ -10841,8 +11062,8 @@ function restrictInsurancesInProduct(_ref4) {
10841
11062
  var rangeSelect = eval(restrict.rCondition);
10842
11063
  if (rangeSelect !== undefined && rangeSelect !== null) {
10843
11064
  curEle.opts.forEach(function (opt) {
10844
- var optNum = getNumberFromYear(opt.val, prodVerifyData.age);
10845
- var rangeSelectNum = rangeSelect.constructor === Array ? [rangeSelect[0] && getNumberFromYear(rangeSelect[0], prodVerifyData.age), rangeSelect[1] && getNumberFromYear(rangeSelect[1], prodVerifyData.age)] : getNumberFromYear(rangeSelect, prodVerifyData.age);
11065
+ var optNum = getNumberFromYear(opt.val, evalVerifyMap.age);
11066
+ var rangeSelectNum = rangeSelect.constructor === Array ? [rangeSelect[0] && getNumberFromYear(rangeSelect[0], evalVerifyMap.age), rangeSelect[1] && getNumberFromYear(rangeSelect[1], evalVerifyMap.age)] : getNumberFromYear(rangeSelect, evalVerifyMap.age);
10846
11067
  if (rangeSelect) {
10847
11068
  if (rangeSelect.constructor === Array) {
10848
11069
  opt.isHide = rangeSelect[0] && optNum < rangeSelectNum[0] || rangeSelect[1] && optNum > rangeSelectNum[1];
@@ -10869,7 +11090,7 @@ function restrictInsurancesInProduct(_ref4) {
10869
11090
  case 3:
10870
11091
  {
10871
11092
  // 全局校验、或者点击的是约束元素、或者点击的是目标元素时,触发校验
10872
- if (!insData && !eleData || restrict.rInsKey === insData.key && restrict.rEleKey === eleData.key || restrict.rCondition.search("prodVerifyData.i".concat(insData.key, ".").concat(eleData.key)) !== -1) {
11093
+ if (!insData && !eleData || restrict.rInsKey === insData.key && restrict.rEleKey === eleData.key || restrict.rCondition.search("evalVerifyMap.i".concat(insData.key, ".").concat(eleData.key)) !== -1) {
10873
11094
  var rangeVal = eval(restrict.rCondition);
10874
11095
  if (rangeVal !== undefined && rangeVal !== null) {
10875
11096
  if (rangeVal.constructor === Array) {
@@ -10912,7 +11133,7 @@ function convertProductData(prodData) {
10912
11133
  if (!prodData.mulInsOrderList) {
10913
11134
  return prodData;
10914
11135
  }
10915
- var productData = _objectSpread$3(_objectSpread$3({}, prodData), {}, {
11136
+ var productData = _objectSpread$2(_objectSpread$2({}, prodData), {}, {
10916
11137
  common: {},
10917
11138
  mulInsOrderList: []
10918
11139
  });
@@ -10938,7 +11159,7 @@ function convertProductData(prodData) {
10938
11159
  checkedInsData[ele.key] = insuranceData[ele.key];
10939
11160
  }
10940
11161
  });
10941
- productData.mulInsOrderList.push(deepCopy(checkedInsData));
11162
+ productData.mulInsOrderList.push(cloneDeep(checkedInsData));
10942
11163
  }
10943
11164
  });
10944
11165
  return;
@@ -10957,32 +11178,28 @@ function convertProductData(prodData) {
10957
11178
  * @returns {IPbProduct} 产品数据
10958
11179
  */
10959
11180
  function clearAddAndTakeAndAdjustBaoeData(productData) {
10960
- if (!productData) {
10961
- return productData;
10962
- }
10963
- if (!productData.mulInsOrderList) {
10964
- return productData;
10965
- }
10966
- productData.adjustBaoeData = null;
10967
- productData.mulInsOrderList.forEach(function (ins) {
10968
- if (ins.accountData && ins.accountData.addAndTakeData) {
10969
- ins.accountData.addAndTakeData.forEach(function (aat) {
10970
- aat.adjustData = [];
10971
- });
10972
- }
10973
- if (ins.reduceBaof) {
10974
- if (ins.reduceBaofData) {
10975
- ins.reduceBaofData.addAndTakeData.forEach(function (aat) {
11181
+ if (productData && Array.isArray(productData.mulInsOrderList)) {
11182
+ productData.adjustBaoeData = null;
11183
+ productData.mulInsOrderList.forEach(function (ins) {
11184
+ if (ins.accountData && ins.accountData.addAndTakeData) {
11185
+ ins.accountData.addAndTakeData.forEach(function (aat) {
10976
11186
  aat.adjustData = [];
10977
11187
  });
10978
11188
  }
10979
- if (ins.duplicateReduceBaofData) {
10980
- ins.duplicateReduceBaofData.addAndTakeData.forEach(function (aat) {
10981
- aat.adjustData = [];
10982
- });
11189
+ if (ins.reduceBaof) {
11190
+ if (ins.reduceBaofData) {
11191
+ ins.reduceBaofData.addAndTakeData.forEach(function (aat) {
11192
+ aat.adjustData = [];
11193
+ });
11194
+ }
11195
+ if (ins.duplicateReduceBaofData) {
11196
+ ins.duplicateReduceBaofData.addAndTakeData.forEach(function (aat) {
11197
+ aat.adjustData = [];
11198
+ });
11199
+ }
10983
11200
  }
10984
- }
10985
- });
11201
+ });
11202
+ }
10986
11203
  return productData;
10987
11204
  }
10988
11205
 
@@ -10995,7 +11212,6 @@ const planbook = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
10995
11212
  convertEleOrderListToObj,
10996
11213
  convertPersonData,
10997
11214
  convertProductData,
10998
- deepCopy,
10999
11215
  enableLizhaoDebug,
11000
11216
  executeElementRule,
11001
11217
  formatNumberToThousand,
@@ -11011,6 +11227,7 @@ const planbook = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
11011
11227
  initProductData,
11012
11228
  insuranceDataHandler,
11013
11229
  isHideProduct,
11230
+ multipleInsuredHandler,
11014
11231
  personDataHandler,
11015
11232
  productDataHandler,
11016
11233
  restrictElementsInInsurance,
@@ -11139,6 +11356,7 @@ function normalizeComponent$1(template, style, script, scopeId, isFunctionalTemp
11139
11356
 
11140
11357
  /* script */
11141
11358
  var __vue_script__$S = script$P;
11359
+
11142
11360
  /* template */
11143
11361
  var __vue_render__$S = function __vue_render__() {
11144
11362
  var _vm = this;
@@ -12437,6 +12655,7 @@ const script$N = {
12437
12655
 
12438
12656
  /* script */
12439
12657
  var __vue_script__$Q = script$N;
12658
+
12440
12659
  /* template */
12441
12660
  var __vue_render__$Q = function __vue_render__() {
12442
12661
  var _vm = this;
@@ -13754,9 +13973,24 @@ function Watch(path, options) {
13754
13973
  });
13755
13974
  }
13756
13975
 
13976
+ function validateAdjustBaoe(params) {
13977
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13978
+ return request({
13979
+ url: "/planBook/".concat(options.publicPbUuid ? 'public' : 'V2', "/validateAccount/-1/low"),
13980
+ method: 'post',
13981
+ data: QS.stringify({
13982
+ jd: JSON.stringify(params)
13983
+ }),
13984
+ headers: {
13985
+ Accept: 'application/json, text/plain, */*',
13986
+ 'Content-Type': 'application/x-www-form-urlencoded'
13987
+ }
13988
+ });
13989
+ }
13990
+
13757
13991
  var _dec$7, _dec2$7, _dec3$7, _dec4$6, _dec5$5, _dec6$5, _class$7, _class2$7, _descriptor$7, _descriptor2$7, _descriptor3$6, _descriptor4$4;
13758
- function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13759
- function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
13992
+ function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13993
+ function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
13760
13994
  function _callSuper$7(t, o, e) { return o = _getPrototypeOf$1(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$8() ? Reflect.construct(o, e || [], _getPrototypeOf$1(t).constructor) : o.apply(t, e)); }
13761
13995
  function _isNativeReflectConstruct$8() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$8 = function _isNativeReflectConstruct() { return !!t; })(); }
13762
13996
  Vue.use(_Toast);
@@ -13840,7 +14074,7 @@ var AdjustBaoe = (_dec$7 = Component({}), _dec2$7 = Prop({
13840
14074
  if (!(productData && productData.mulInsOrderList && productData.mulInsOrderList.length)) {
13841
14075
  return null;
13842
14076
  }
13843
- var options = [_objectSpread$2({
14077
+ var options = [_objectSpread$1({
13844
14078
  year: '年度',
13845
14079
  age: '年龄'
13846
14080
  }, adjustBaoeInsTitles)];
@@ -13860,7 +14094,7 @@ var AdjustBaoe = (_dec$7 = Component({}), _dec2$7 = Prop({
13860
14094
  }
13861
14095
  }
13862
14096
  }
13863
- options.push(_objectSpread$2(_objectSpread$2({}, adjustRecord || defaultAdjustRecord), {}, {
14097
+ options.push(_objectSpread$1(_objectSpread$1({}, adjustRecord || defaultAdjustRecord), {}, {
13864
14098
  year: options.length,
13865
14099
  age: k
13866
14100
  }));
@@ -13969,44 +14203,27 @@ var AdjustBaoe = (_dec$7 = Component({}), _dec2$7 = Prop({
13969
14203
  delete ins[ele];
13970
14204
  });
13971
14205
  });
13972
- var url = "".concat(PLANBOOK_API_HOSTNAME, "/planBook/").concat(params.publicPbUuid ? 'public' : 'V2', "/validateAccount/-1/low");
13973
- return fetch(url, {
13974
- method: 'POST',
13975
- credentials: 'include',
13976
- headers: {
13977
- Accept: 'application/json, text/plain, */*',
13978
- 'Content-Type': 'application/x-www-form-urlencoded'
14206
+ return validateAdjustBaoe({
14207
+ insuranceTypeId: params.planbookId * 1,
14208
+ publicPbUuid: params.publicPbUuid,
14209
+ personData: {
14210
+ personOrderList: convertPersonData(personData, personData.personOrderList.map(function (p) {
14211
+ return p.key;
14212
+ }))
13979
14213
  },
13980
- body: QS.stringify({
13981
- jd: JSON.stringify({
13982
- insuranceTypeId: params.planbookId * 1,
13983
- publicPbUuid: params.publicPbUuid,
13984
- personData: {
13985
- personOrderList: convertPersonData(personData, personData.personOrderList.map(function (p) {
13986
- return p.key;
13987
- }))
13988
- },
13989
- productGroupList: [{
13990
- key: params.groupKey,
13991
- prodOrderList: [_objectSpread$2(_objectSpread$2({}, cloneProductData), {}, {
13992
- adjustBaoeData: this.adjustBaoeData
13993
- })]
13994
- }]
13995
- })
13996
- })
13997
- }).then(function (response) {
13998
- return response.json();
13999
- }).then(function (_ref) {
14000
- var success = _ref.success,
14001
- data = _ref.data,
14002
- info = _ref.info;
14003
- if (!success || !data || data === -1) {
14004
- _this5.adjustBaoeData = cloneAdjustBaoeData;
14005
- _this5.$toast(info);
14006
- return Promise.reject();
14007
- }
14008
- return Promise.resolve(data);
14214
+ productGroupList: [{
14215
+ key: params.groupKey,
14216
+ prodOrderList: [_objectSpread$1(_objectSpread$1({}, cloneProductData), {}, {
14217
+ adjustBaoeData: this.adjustBaoeData
14218
+ })]
14219
+ }]
14220
+ }, {
14221
+ publicPbUuid: params.publicPbUuid
14009
14222
  }).catch(function (err) {
14223
+ _this5.adjustBaoeData = cloneAdjustBaoeData;
14224
+ if (err) {
14225
+ _this5.$toast(err);
14226
+ }
14010
14227
  console.log(err);
14011
14228
  });
14012
14229
  }
@@ -14054,7 +14271,7 @@ var AdjustBaoe = (_dec$7 = Component({}), _dec2$7 = Prop({
14054
14271
  if (index === 0) {
14055
14272
  return;
14056
14273
  }
14057
- var temp = _objectSpread$2({}, item);
14274
+ var temp = _objectSpread$1({}, item);
14058
14275
  delete temp.year;
14059
14276
  for (var k in temp) {
14060
14277
  if (!['age'].includes(k)) {
@@ -14400,6 +14617,7 @@ var BusinessCard = (_dec$6 = Component({}), _dec2$6 = Prop({
14400
14617
 
14401
14618
  /* script */
14402
14619
  var __vue_script__$M = BusinessCard;
14620
+
14403
14621
  /* template */
14404
14622
  var __vue_render__$M = function __vue_render__() {
14405
14623
  var _vm = this;
@@ -14681,6 +14899,7 @@ var CanvasPoster = (_dec$5 = Component({}), _dec2$5 = Prop({
14681
14899
 
14682
14900
  /* script */
14683
14901
  var __vue_script__$L = CanvasPoster;
14902
+
14684
14903
  /* template */
14685
14904
  var __vue_render__$L = function __vue_render__() {
14686
14905
  var _vm = this;
@@ -14717,6 +14936,71 @@ var __vue_component__$L = /*#__PURE__*/normalizeComponent$1({
14717
14936
  staticRenderFns: __vue_staticRenderFns__$L
14718
14937
  }, __vue_inject_styles__$L, __vue_script__$L);
14719
14938
 
14939
+ function createMd5Token(reqData, obj) {
14940
+ var personList = reqData.personData.personOrderList;
14941
+ var signInfo = {};
14942
+ if (reqData.insuranceTypeId !== null) {
14943
+ signInfo.insuranceTypeId = reqData.insuranceTypeId;
14944
+ }
14945
+ var insuredInfo = personList.filter(function (p) {
14946
+ return p.key === 'insuredInfo';
14947
+ })[0];
14948
+ var applicantInfo = personList.filter(function (p) {
14949
+ return p.key === 'applicantInfo';
14950
+ })[0];
14951
+ signInfo.insuredAge = insuredInfo.age * 1;
14952
+ signInfo.insuredSex = insuredInfo.sex * 1;
14953
+ if (applicantInfo) {
14954
+ signInfo.applicantAge = isNaN(applicantInfo.age * 1) ? 0 : applicantInfo.age * 1;
14955
+ signInfo.applicantSex = isNaN(applicantInfo.sex * 1) ? 0 : applicantInfo.sex * 1;
14956
+ }
14957
+ var productKeys = [];
14958
+ var insuranceKeys = [];
14959
+ var productGroup = reqData.productGroupList.filter(function (group) {
14960
+ return group.key === obj.groupDataKey;
14961
+ })[0];
14962
+ var prodOrderList = productGroup.prodOrderList.slice();
14963
+ prodOrderList && prodOrderList.map(function (prod) {
14964
+ productKeys.push(prod.key);
14965
+ prod.mulInsOrderList.map(function (ins) {
14966
+ insuranceKeys.push(ins.key);
14967
+ });
14968
+ });
14969
+ signInfo.product = '';
14970
+ signInfo.insurance = '';
14971
+ productKeys.sort(function (a, b) {
14972
+ return a - b;
14973
+ });
14974
+ productKeys.map(function (ele) {
14975
+ signInfo.product += "p=".concat(ele, ";");
14976
+ });
14977
+ insuranceKeys.sort(function (a, b) {
14978
+ return a - b;
14979
+ });
14980
+ insuranceKeys.map(function (ele) {
14981
+ signInfo.insurance += "i=".concat(ele, ";");
14982
+ });
14983
+ signInfo.params = JSON.stringify(reqData);
14984
+ var signInfoTx = '';
14985
+ for (var k in signInfo) {
14986
+ signInfoTx += "".concat(k, "=").concat(signInfo[k], "&");
14987
+ }
14988
+ delete signInfo.params;
14989
+
14990
+ // console.log(signInfoTx)
14991
+ // console.log(MD5(signInfoTx))
14992
+ // console.log(JSON.stringify({
14993
+ // ...signInfo,
14994
+ // signMd5: MD5(signInfoTx)
14995
+ // }))
14996
+
14997
+ signInfo.signMd5 = MD5(signInfoTx);
14998
+ return CryptoJS.AES.encrypt(JSON.stringify(signInfo), CryptoJS.enc.Utf8.parse('67u3Dg5fcc06UntP'), {
14999
+ mode: CryptoJS.mode.ECB,
15000
+ padding: CryptoJS.pad.Pkcs7
15001
+ }).toString() || MD5(signInfoTx) || '20190929';
15002
+ }
15003
+
14720
15004
  /**转换时间字符串
14721
15005
  * @Author Lizh
14722
15006
  * @DateTime 2020-04-16
@@ -14759,6 +15043,73 @@ function parseTime(time, cFormat) {
14759
15043
  });
14760
15044
  return timeStr;
14761
15045
  }
15046
+ function getSecurityToken(data) {
15047
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
15048
+ return createMd5Token(JSON.parse(data), options);
15049
+ }
15050
+
15051
+ function getCommonCurrentUser(params) {
15052
+ return request({
15053
+ url: '/planBook/common/currentUser',
15054
+ method: 'get',
15055
+ params: params,
15056
+ isIgnoreLoading: false
15057
+ });
15058
+ }
15059
+
15060
+ /**
15061
+ * C 端地区码(POST `…/api/product/data/getAreaCode`)
15062
+ * @param {object} data 如 `{ pageType, productId }`
15063
+ * @param {string} [userUuid] 有则拼到 query(与原先 `getApiUrl(getAreaCodeApi)` 行为一致)
15064
+ */
15065
+ function getAddress(data, userUuid) {
15066
+ var url = "".concat(INSURANCE2A_API_HOSTNAME, "/api/product/data/getAreaCode");
15067
+ if (userUuid && url.indexOf('userUuid') === -1) {
15068
+ if (url.indexOf('?') === -1) {
15069
+ url += "?userUuid=".concat(encodeURIComponent(userUuid));
15070
+ } else {
15071
+ url += "&userUuid=".concat(encodeURIComponent(userUuid));
15072
+ }
15073
+ }
15074
+ return request({
15075
+ url: url,
15076
+ method: 'post',
15077
+ data: data,
15078
+ headers: {
15079
+ Accept: 'application/json, text/plain, */*',
15080
+ 'Content-Type': 'application/json'
15081
+ },
15082
+ isIgnoreLoading: false,
15083
+ returnFullResponse: true
15084
+ });
15085
+ }
15086
+
15087
+ /**
15088
+ * 险种保费试算 `/api/product/data/calculate`
15089
+ */
15090
+ function postProductDataCalculate(urlParams, postParams) {
15091
+ var path = '/api/product/data/calculate';
15092
+ if (urlParams && urlParams.uuid) {
15093
+ path += "?userUuid=".concat(encodeURIComponent(urlParams.uuid));
15094
+ } else if (urlParams && urlParams.openId) {
15095
+ path += "?userUuid=".concat(encodeURIComponent(urlParams.openId));
15096
+ }
15097
+ if (urlParams && urlParams.appid) {
15098
+ path += path.includes('?') ? "&appId=".concat(encodeURIComponent(urlParams.appid)) : "?appId=".concat(encodeURIComponent(urlParams.appid));
15099
+ }
15100
+ return request({
15101
+ baseURL: INSURANCE2A_API_HOSTNAME,
15102
+ url: path,
15103
+ method: 'post',
15104
+ data: postParams,
15105
+ headers: {
15106
+ Accept: 'application/json, text/plain, */*',
15107
+ 'Content-Type': 'application/json'
15108
+ },
15109
+ isIgnoreLoading: false,
15110
+ returnFullResponse: true
15111
+ });
15112
+ }
14762
15113
 
14763
15114
  /*!
14764
15115
  * better-normal-scroll v1.15.2
@@ -19769,7 +20120,7 @@ Schema.warning = warning;
19769
20120
  Schema.messages = messages;
19770
20121
  Schema.validators = validators;
19771
20122
 
19772
- /*! bxs-vue-ui v4.2.1 */
20123
+ /*! bxs-vue-ui v4.2.4 */
19773
20124
 
19774
20125
  var fails = function (exec) {
19775
20126
  try {
@@ -19953,9 +20304,9 @@ var inspectSource = shared('inspectSource', function (it) {
19953
20304
  return functionToString.call(it);
19954
20305
  });
19955
20306
 
19956
- var WeakMap$1 = global_1.WeakMap;
20307
+ var WeakMap = global_1.WeakMap;
19957
20308
 
19958
- var nativeWeakMap = typeof WeakMap$1 === 'function' && /native code/.test(inspectSource(WeakMap$1));
20309
+ var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
19959
20310
 
19960
20311
  var hasOwnProperty = {}.hasOwnProperty;
19961
20312
 
@@ -19978,7 +20329,7 @@ var sharedKey = function (key) {
19978
20329
 
19979
20330
  var hiddenKeys = {};
19980
20331
 
19981
- var WeakMap$1$1 = global_1.WeakMap;
20332
+ var WeakMap$1 = global_1.WeakMap;
19982
20333
  var set, get, has$1;
19983
20334
 
19984
20335
  var enforce = function (it) {
@@ -19995,7 +20346,7 @@ var getterFor = function (TYPE) {
19995
20346
  };
19996
20347
 
19997
20348
  if (nativeWeakMap) {
19998
- var store$1 = new WeakMap$1$1();
20349
+ var store$1 = new WeakMap$1();
19999
20350
  var wmget = store$1.get;
20000
20351
  var wmhas = store$1.has;
20001
20352
  var wmset = store$1.set;
@@ -21850,14 +22201,14 @@ var objectGetOwnPropertySymbols = {
21850
22201
  };
21851
22202
 
21852
22203
  // all object keys, includes non-enumerable and symbols
21853
- var ownKeys$2 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
22204
+ var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
21854
22205
  var keys = objectGetOwnPropertyNames.f(anObject$1(it));
21855
22206
  var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
21856
22207
  return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
21857
22208
  };
21858
22209
 
21859
22210
  var copyConstructorProperties = function (target, source) {
21860
- var keys = ownKeys$2(source);
22211
+ var keys = ownKeys$1(source);
21861
22212
  var defineProperty = objectDefineProperty$1.f;
21862
22213
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor$1.f;
21863
22214
  for (var i = 0; i < keys.length; i++) {
@@ -39110,12 +39461,21 @@ var TASK_STATUS = {
39110
39461
  FAILED: '上传失败'
39111
39462
  }; // 本地开发环境上传代理
39112
39463
 
39113
- var PROXY_URL = 'http://192.168.180.194:9673/oss/upload';
39464
+ var PROXY_URL = 'http://192.168.180.194:9673/oss/upload'; // 科技侧 OSS 鉴权(含 cppoc POC 环境:在 hostname 加 cppoc- 前缀)
39465
+
39466
+ var OSS_TECH_AUTH = {
39467
+ authUrlTest: 'https://management.winbaoxian.cn/oss/getAuthInfo',
39468
+ authUrlProd: 'https://management.winbaoxian.com/oss/getAuthInfo'
39469
+ };
39470
+ var OSS_TECH_AUTH_CPPOC = {
39471
+ authUrlTest: 'https://cppoc-management.zytst.cn/oss/getAuthInfo',
39472
+ authUrlProd: 'https://cppoc-management.zytst.com/oss/getAuthInfo'
39473
+ };
39114
39474
  var OSS_INFO_LIST = [{
39115
39475
  type: 1,
39116
39476
  // 微易科技
39117
- authUrlTest: 'https://test.winbaoxian.com/management/oss/getAuthInfo',
39118
- authUrlProd: 'https://management.winbaoxian.com/oss/getAuthInfo'
39477
+ authUrlTest: OSS_TECH_AUTH.authUrlTest,
39478
+ authUrlProd: OSS_TECH_AUTH.authUrlProd
39119
39479
  }, {
39120
39480
  type: 2,
39121
39481
  // 微易保险经纪
@@ -40088,22 +40448,29 @@ var script$J = create({
40088
40448
  }) || {};
40089
40449
  },
40090
40450
  authUrl: function authUrl() {
40451
+ var _context;
40452
+
40091
40453
  var hostName = window.location.hostname;
40454
+ var isProd = /^.*\.com$/.test(hostName) && hostName !== 'test.winbaoxian.com' || /^.*\.net$/.test(hostName); // 访问域名含 cppoc 时统一走科技侧鉴权(带 cppoc- 前缀),与 ossType 无关
40092
40455
 
40093
- if (/^.*\.com$/.test(hostName) && hostName !== 'test.winbaoxian.com' || /^.*\.net$/.test(hostName)) {
40456
+ if (indexOf$4(_context = window.location.href).call(_context, 'cppoc') > -1) {
40457
+ return isProd ? OSS_TECH_AUTH_CPPOC.authUrlProd : OSS_TECH_AUTH_CPPOC.authUrlTest;
40458
+ }
40459
+
40460
+ if (isProd) {
40094
40461
  return this.ossInfo.authUrlProd;
40095
40462
  }
40096
40463
 
40097
40464
  return this.ossInfo.authUrlTest;
40098
40465
  },
40099
40466
  message: function message() {
40100
- var _context;
40467
+ var _context2;
40101
40468
 
40102
40469
  if (this.errorMessage) {
40103
40470
  return this.errorMessage;
40104
40471
  }
40105
40472
 
40106
- var failedImages = filter$2(_context = this.images).call(_context, function (item) {
40473
+ var failedImages = filter$2(_context2 = this.images).call(_context2, function (item) {
40107
40474
  return item.status === TASK_STATUS.FAILED;
40108
40475
  });
40109
40476
 
@@ -40491,9 +40858,9 @@ var script$J = create({
40491
40858
 
40492
40859
  this.addTasks(files);
40493
40860
  this.getAuthInfo().then(function (authInfo) {
40494
- var _context2;
40861
+ var _context3;
40495
40862
 
40496
- forEach$2(_context2 = _this6.tasks).call(_context2, function (task) {
40863
+ forEach$2(_context3 = _this6.tasks).call(_context3, function (task) {
40497
40864
  if (task.status === TASK_STATUS.READY) {
40498
40865
  _this6.taskStart(task);
40499
40866
 
@@ -40564,7 +40931,7 @@ var script$J = create({
40564
40931
  task.host = authInfo.host;
40565
40932
  var file = this.handleFile ? task.newFile : this.getBlobByDataURI(task);
40566
40933
  this.getSuffix(task.file.name, file).then(function (suffix) {
40567
- var _context3;
40934
+ var _context4;
40568
40935
 
40569
40936
  var key = "" + authInfo.dir + new Date().getTime() + "_" + _this8.randomString(15) + suffix;
40570
40937
  var formData = new FormData();
@@ -40573,7 +40940,7 @@ var script$J = create({
40573
40940
  formData.append('policy', authInfo.policy);
40574
40941
  formData.append('OSSAccessKeyId', authInfo.accessid);
40575
40942
  formData.append('key', key);
40576
- var protocol = indexOf$4(_context3 = authInfo.cdnMediaHost).call(_context3, '//') === 0 ? 'https:' : '';
40943
+ var protocol = indexOf$4(_context4 = authInfo.cdnMediaHost).call(_context4, '//') === 0 ? 'https:' : '';
40577
40944
  task.imageUrl = protocol + authInfo.cdnMediaHost + key;
40578
40945
  formData.append('file', file);
40579
40946
  task.formData = formData;
@@ -40740,9 +41107,9 @@ var script$J = create({
40740
41107
  image.content = null;
40741
41108
  this.$set(this.images, index, image);
40742
41109
  } else {
40743
- var _context4;
41110
+ var _context5;
40744
41111
 
40745
- splice$2(_context4 = this.images).call(_context4, index, 1);
41112
+ splice$2(_context5 = this.images).call(_context5, index, 1);
40746
41113
  }
40747
41114
 
40748
41115
  this.$emit('delete', {
@@ -43158,110 +43525,6 @@ if (typeof window !== 'undefined' && window.Vue) {
43158
43525
  install$1$1(window.Vue);
43159
43526
  }
43160
43527
 
43161
- // 创建axios实例
43162
- var service = axios.create({
43163
- baseURL: APP_HOSTNAME,
43164
- withCredentials: true,
43165
- timeout: 10000,
43166
- // 请求超时时间
43167
- headers: {
43168
- 'X-Requested-With': 'XMLHttpRequest'
43169
- }
43170
- });
43171
- var loadingTimer = null;
43172
- var loading = function loading(show) {
43173
- if (show) {
43174
- showLoading();
43175
- } else {
43176
- hideLoading();
43177
- }
43178
- };
43179
-
43180
- // request拦截器
43181
- service.interceptors.request.use(function (config) {
43182
- if (loadingTimer) clearTimeout(loadingTimer);
43183
- loadingTimer = setTimeout(function () {
43184
- loading(true);
43185
- }, 300);
43186
- return config;
43187
- }, function (error) {
43188
- // Do something with request error
43189
- console.log(error); // for debug
43190
- Promise.reject(error);
43191
- });
43192
-
43193
- // respone拦截器
43194
- service.interceptors.response.use(function (response) {
43195
- if (loadingTimer) clearTimeout(loadingTimer);
43196
- loading(false);
43197
- var res = response.data;
43198
- if (res.code === 401 || res.status === 401) {
43199
- // gotoLogin()
43200
- return Promise.reject('login');
43201
- }
43202
- return res;
43203
- }, function (error) {
43204
- if (loadingTimer) clearTimeout(loadingTimer);
43205
- loading(false);
43206
- if (error.response && error.response.status == 401) {
43207
- // gotoLogin()
43208
- return Promise.reject('login');
43209
- }
43210
- console.log('err' + error); // for debug
43211
- return Promise.reject(error);
43212
- });
43213
-
43214
- var baseURL = "https://insurance2a-api.wyins.net".concat(IS_PRODUCT_ENV ? '' : '.cn');
43215
-
43216
- /**
43217
- * **获取地址信息**
43218
- * @ignore
43219
- * @author watson
43220
- * @date 2022-04-26
43221
- * @param {string} fetchUrl api url
43222
- * @param {object} data 接口传参
43223
- * @returns {object} addressData
43224
- */
43225
- function getAddress(fetchUrl, data) {
43226
- return new Promise(function (resolve, reject) {
43227
- service({
43228
- baseURL: fetchUrl,
43229
- url: undefined,
43230
- method: 'POST',
43231
- urlParams: undefined,
43232
- data: data
43233
- }).then(function (res) {
43234
- resolve(res);
43235
- }).catch(function (err) {
43236
- reject(err);
43237
- });
43238
- });
43239
- }
43240
-
43241
- /**
43242
- * **获取用户信息**
43243
- * @ignore
43244
- * @author watson
43245
- * @date 2022-04-26
43246
- * @param {string} fetchUrl api url
43247
- * @returns {promise}
43248
- */
43249
- function getUuid(fetchUrl) {
43250
- return new Promise(function (resolve, reject) {
43251
- service({
43252
- baseURL: fetchUrl,
43253
- url: undefined,
43254
- method: 'GET',
43255
- urlParams: undefined,
43256
- data: null
43257
- }).then(function (res) {
43258
- resolve(res);
43259
- }).catch(function (err) {
43260
- reject(err);
43261
- });
43262
- });
43263
- }
43264
-
43265
43528
  /**
43266
43529
  * **计划书初始化参数**
43267
43530
  * @ignore
@@ -43479,55 +43742,31 @@ function insureCalculate(urlParams, postParams, planParams) {
43479
43742
  if (postParams && !postParams.scenario) {
43480
43743
  postParams.scenario = 'h5Widget';
43481
43744
  }
43482
- var url = '/api/product/data/calculate';
43483
- if (urlParams && urlParams.uuid) {
43484
- url += "?userUuid=".concat(urlParams.uuid);
43485
- } else if (urlParams && urlParams.openId) {
43486
- url += "?userUuid=".concat(urlParams.openId);
43487
- }
43488
- if (urlParams && urlParams.appid) {
43489
- if (url.indexOf('?') > -1) {
43490
- url += "&appId=".concat(urlParams.appid);
43491
- } else {
43492
- url += "?appId=".concat(urlParams.appid);
43493
- }
43494
- }
43495
43745
  if (hasPlanParams(planParams) && postParams.current_data) {
43496
43746
  postParams.current_data = tranlateCurrentData(postParams.current_data, planParams);
43497
43747
  }
43498
- return new Promise(function (resolve, reject) {
43499
- service({
43500
- baseURL: baseURL,
43501
- url: url,
43502
- method: 'POST',
43503
- urlParams: urlParams,
43504
- data: postParams
43505
- }).then(function (res) {
43506
- if (res.code === 200) {
43507
- var data = JSON.parse(JSON.stringify(res.data));
43508
- if (hasPlanParams(planParams)) {
43509
- var widgets = data.widgets;
43510
- var currentData = data.current_data;
43511
- translatePlanData(widgets, currentData, planParams);
43512
- }
43513
- var cData = {
43514
- widgets: data.widgets,
43515
- total_premium: data.total_premium,
43516
- terms: data.terms,
43517
- product_id: data.product_id,
43518
- current_data: data.current_data,
43519
- risk_premiums: data.risk_premiums
43520
- };
43521
- resolve({
43522
- code: 200,
43523
- data: cData
43524
- });
43525
- } else {
43526
- reject(res);
43527
- }
43528
- }).catch(function (err) {
43529
- reject(err);
43530
- });
43748
+ return postProductDataCalculate(urlParams, postParams).then(function (res) {
43749
+ if (res.code === 200) {
43750
+ var data = JSON.parse(JSON.stringify(res.data));
43751
+ if (hasPlanParams(planParams)) {
43752
+ var widgets = data.widgets;
43753
+ var currentData = data.current_data;
43754
+ translatePlanData(widgets, currentData, planParams);
43755
+ }
43756
+ var cData = {
43757
+ widgets: data.widgets,
43758
+ total_premium: data.total_premium,
43759
+ terms: data.terms,
43760
+ product_id: data.product_id,
43761
+ current_data: data.current_data,
43762
+ risk_premiums: data.risk_premiums
43763
+ };
43764
+ return {
43765
+ code: 200,
43766
+ data: cData
43767
+ };
43768
+ }
43769
+ return Promise.reject(res);
43531
43770
  });
43532
43771
  }
43533
43772
 
@@ -43608,47 +43847,17 @@ function checkInsureCalculateIn(urlParams, postParams, planParams) {
43608
43847
  if (postParams && !postParams.scenario) {
43609
43848
  postParams.scenario = 'h5Widget';
43610
43849
  }
43611
- var url = '/api/product/data/calculate';
43612
- if (urlParams && urlParams.uuid) {
43613
- url += "?userUuid=".concat(urlParams.uuid);
43614
- } else if (urlParams && urlParams.openId) {
43615
- url += "?userUuid=".concat(urlParams.openId);
43616
- }
43617
- if (urlParams && urlParams.appid) {
43618
- if (url.indexOf('?') > -1) {
43619
- url += "&appId=".concat(urlParams.appid);
43620
- } else {
43621
- url += "?appId=".concat(urlParams.appid);
43622
- }
43623
- }
43624
43850
  if (hasPlanParams(planParams) && postParams.current_data) {
43625
43851
  postParams.current_data = tranlateCurrentData(postParams.current_data, planParams);
43626
43852
  }
43627
- return new Promise(function (resolve, reject) {
43628
- service({
43629
- baseURL: baseURL,
43630
- url: url,
43631
- method: 'POST',
43632
- urlParams: urlParams,
43633
- data: postParams
43634
- }).then(function (res) {
43635
- if (res.code === 200) {
43636
- // if (postParams && !postParams.current_data) {
43637
- // let data = JSON.parse(JSON.stringify(res.data));
43638
- // postParams.current_data = data.current_data
43639
- // // 重新试算
43640
- // checkInsureCalculate(urlParams, postParams, planParams)
43641
- // }
43642
- resolve({
43643
- code: 200,
43644
- data: res.data
43645
- });
43646
- } else {
43647
- reject(res);
43648
- }
43649
- }).catch(function (err) {
43650
- reject(err);
43651
- });
43853
+ return postProductDataCalculate(urlParams, postParams).then(function (res) {
43854
+ if (res.code === 200) {
43855
+ return {
43856
+ code: 200,
43857
+ data: res.data
43858
+ };
43859
+ }
43860
+ return Promise.reject(res);
43652
43861
  });
43653
43862
  }
43654
43863
 
@@ -43656,8 +43865,6 @@ const trade = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
43656
43865
  __proto__: null,
43657
43866
  checkInsureCalculate,
43658
43867
  checkInsureCalculateIn,
43659
- getAddress,
43660
- getUuid,
43661
43868
  hasPlanParams,
43662
43869
  insureCalculate
43663
43870
  }, Symbol.toStringTag, { value: 'Module' }));
@@ -43667,9 +43874,9 @@ const index$1 = {
43667
43874
  trade: trade
43668
43875
  };
43669
43876
 
43670
- var _dec$4, _dec2$4, _dec3$4, _dec4$4, _dec5$4, _dec6$4, _dec7$2, _dec8$1, _dec9$1, _dec0$1, _dec1$1, _dec10$1, _dec11, _class$4, _class2$4, _descriptor$4, _descriptor2$4, _descriptor3$4, _descriptor4$3, _descriptor5$3, _descriptor6$2, _descriptor7$1, _descriptor8$1, _descriptor9$1, _descriptor0$1, _descriptor1, _descriptor10;
43671
- function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
43672
- function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
43877
+ var _dec$4, _dec2$4, _dec3$4, _dec4$4, _dec5$4, _dec6$4, _dec7$3, _dec8$2, _dec9$1, _dec0$1, _dec1$1, _dec10$1, _dec11, _class$4, _class2$4, _descriptor$4, _descriptor2$4, _descriptor3$4, _descriptor4$3, _descriptor5$3, _descriptor6$3, _descriptor7$2, _descriptor8$1, _descriptor9$1, _descriptor0$1, _descriptor1, _descriptor10;
43878
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
43879
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
43673
43880
  function _callSuper$4(t, o, e) { return o = _getPrototypeOf$1(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$4() ? Reflect.construct(o, e || [], _getPrototypeOf$1(t).constructor) : o.apply(t, e)); }
43674
43881
  function _isNativeReflectConstruct$4() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$4 = function _isNativeReflectConstruct() { return !!t; })(); }
43675
43882
  Vue.use(_Toast);
@@ -43726,9 +43933,9 @@ var InsureCalculate = (_dec$4 = Component({
43726
43933
  }
43727
43934
  }), _dec6$4 = Prop({
43728
43935
  default: 10
43729
- }), _dec7$2 = Prop({
43936
+ }), _dec7$3 = Prop({
43730
43937
  default: undefined
43731
- }), _dec8$1 = Prop({
43938
+ }), _dec8$2 = Prop({
43732
43939
  default: undefined
43733
43940
  }), _dec9$1 = Prop({
43734
43941
  default: undefined
@@ -43750,9 +43957,6 @@ var InsureCalculate = (_dec$4 = Component({
43750
43957
  args[_key] = arguments[_key];
43751
43958
  }
43752
43959
  _this = _callSuper$4(this, InsureCalculate, [].concat(args));
43753
- _defineProperty$1(_this, "getCalculateApi", '');
43754
- _defineProperty$1(_this, "getAreaCodeApi", '');
43755
- _defineProperty$1(_this, "getUuidApi", '');
43756
43960
  _defineProperty$1(_this, "widgets", []);
43757
43961
  _defineProperty$1(_this, "originData", {});
43758
43962
  _defineProperty$1(_this, "hasCalculateData", false);
@@ -43785,9 +43989,9 @@ var InsureCalculate = (_dec$4 = Component({
43785
43989
  // 是否本地缓存
43786
43990
  _initializerDefineProperty(_this, "lsTime", _descriptor5$3, _this);
43787
43991
  // 产品ID
43788
- _initializerDefineProperty(_this, "productId", _descriptor6$2, _this);
43992
+ _initializerDefineProperty(_this, "productId", _descriptor6$3, _this);
43789
43993
  // 当前用户userUuid
43790
- _initializerDefineProperty(_this, "uuid", _descriptor7$1, _this);
43994
+ _initializerDefineProperty(_this, "uuid", _descriptor7$2, _this);
43791
43995
  // 当前环境
43792
43996
  _initializerDefineProperty(_this, "isDev", _descriptor8$1, _this);
43793
43997
  // 计划书给的默认参数
@@ -43822,7 +44026,7 @@ var InsureCalculate = (_dec$4 = Component({
43822
44026
  }
43823
44027
  _context.prev = 1;
43824
44028
  _context.next = 2;
43825
- return getUuid(vm.getUuidApi);
44029
+ return getCommonCurrentUser();
43826
44030
  case 2:
43827
44031
  userInfo = _context.sent;
43828
44032
  if (userInfo && userInfo.data && userInfo.data.uuid) {
@@ -43990,7 +44194,7 @@ var InsureCalculate = (_dec$4 = Component({
43990
44194
  key: "showAddress",
43991
44195
  value: function () {
43992
44196
  var _showAddress = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(item) {
43993
- var vm, url, data, addressData, _t2;
44197
+ var vm, data, addressData, _t2;
43994
44198
  return _regeneratorRuntime.wrap(function (_context2) {
43995
44199
  while (1) switch (_context2.prev = _context2.next) {
43996
44200
  case 0:
@@ -44000,13 +44204,12 @@ var InsureCalculate = (_dec$4 = Component({
44000
44204
  vm.returnClassify = item.values ? JSON.parse(item.values) : [];
44001
44205
  _context2.prev = 1;
44002
44206
  // 获取地址信息
44003
- url = vm.getApiUrl(vm.getAreaCodeApi);
44004
44207
  data = {
44005
44208
  pageType: 'detail',
44006
44209
  productId: String(vm.productId)
44007
44210
  };
44008
44211
  _context2.next = 2;
44009
- return getAddress(url, data);
44212
+ return getAddress(data, vm.getU());
44010
44213
  case 2:
44011
44214
  addressData = _context2.sent;
44012
44215
  if (addressData && addressData.code === 200) {
@@ -44432,7 +44635,7 @@ var InsureCalculate = (_dec$4 = Component({
44432
44635
  vm.getArea(item.children, tempDes, res);
44433
44636
  } else {
44434
44637
  var _tempDes = "".concat(des).concat(item.areaName);
44435
- res.push(_objectSpread$1(_objectSpread$1({}, item), {}, {
44638
+ res.push(_objectSpread(_objectSpread({}, item), {}, {
44436
44639
  des: _tempDes
44437
44640
  }));
44438
44641
  }
@@ -44564,19 +44767,6 @@ var InsureCalculate = (_dec$4 = Component({
44564
44767
  value: function getU() {
44565
44768
  return this.uuid || this.uuidFromApi;
44566
44769
  }
44567
- }, {
44568
- key: "getApiUrl",
44569
- value: function getApiUrl(url) {
44570
- var u = url;
44571
- if (this.getU() && u.indexOf('userUuid') === -1) {
44572
- if (u.indexOf('?') === -1) {
44573
- u += "?userUuid=".concat(this.getU());
44574
- } else {
44575
- u += "&userUuid=".concat(this.getU());
44576
- }
44577
- }
44578
- return u;
44579
- }
44580
44770
  }, {
44581
44771
  key: "setIsDevelop",
44582
44772
  value: function setIsDevelop() {
@@ -44588,15 +44778,6 @@ var InsureCalculate = (_dec$4 = Component({
44588
44778
  if (this.isDev === true || this.isDev === false) {
44589
44779
  this.isDevelop = this.isDev;
44590
44780
  }
44591
- if (this.isDevelop) {
44592
- this.getCalculateApi = 'https://insurance2a-api.wyins.net.cn/api/product/data/calculate';
44593
- this.getAreaCodeApi = 'https://insurance2a-api.wyins.net.cn/api/product/data/getAreaCode';
44594
- this.getUuidApi = "".concat(PLANBOOK_API_HOSTNAME, "/planBook/common/currentUser");
44595
- } else {
44596
- this.getCalculateApi = 'https://insurance2a-api.wyins.net/api/product/data/calculate';
44597
- this.getAreaCodeApi = 'https://insurance2a-api.wyins.net/api/product/data/getAreaCode';
44598
- this.getUuidApi = "".concat(PLANBOOK_API_HOSTNAME, "/planBook/common/currentUser");
44599
- }
44600
44781
  }
44601
44782
  }]);
44602
44783
  }(Vue), _descriptor$4 = _applyDecoratedDescriptor(_class2$4.prototype, "showHeader", [_dec2$4], {
@@ -44624,12 +44805,12 @@ var InsureCalculate = (_dec$4 = Component({
44624
44805
  enumerable: true,
44625
44806
  writable: true,
44626
44807
  initializer: null
44627
- }), _descriptor6$2 = _applyDecoratedDescriptor(_class2$4.prototype, "productId", [_dec7$2], {
44808
+ }), _descriptor6$3 = _applyDecoratedDescriptor(_class2$4.prototype, "productId", [_dec7$3], {
44628
44809
  configurable: true,
44629
44810
  enumerable: true,
44630
44811
  writable: true,
44631
44812
  initializer: null
44632
- }), _descriptor7$1 = _applyDecoratedDescriptor(_class2$4.prototype, "uuid", [_dec8$1], {
44813
+ }), _descriptor7$2 = _applyDecoratedDescriptor(_class2$4.prototype, "uuid", [_dec8$2], {
44633
44814
  configurable: true,
44634
44815
  enumerable: true,
44635
44816
  writable: true,
@@ -45057,7 +45238,7 @@ var __vue_component__$8 = /*#__PURE__*/normalizeComponent$1({
45057
45238
  staticRenderFns: __vue_staticRenderFns__$8
45058
45239
  }, __vue_inject_styles__$8, __vue_script__$8);
45059
45240
 
45060
- var _dec$3, _dec2$3, _dec3$3, _dec4$3, _dec5$3, _dec6$3, _dec7$1, _dec8, _dec9, _dec0, _dec1, _dec10, _class$3, _class2$3, _descriptor$3, _descriptor2$3, _descriptor3$3, _descriptor4$2, _descriptor5$2, _descriptor6$1, _descriptor7, _descriptor8, _descriptor9, _descriptor0;
45241
+ var _dec$3, _dec2$3, _dec3$3, _dec4$3, _dec5$3, _dec6$3, _dec7$2, _dec8$1, _dec9, _dec0, _dec1, _dec10, _class$3, _class2$3, _descriptor$3, _descriptor2$3, _descriptor3$3, _descriptor4$2, _descriptor5$2, _descriptor6$2, _descriptor7$1, _descriptor8, _descriptor9, _descriptor0;
45061
45242
  function _callSuper$3(t, o, e) { return o = _getPrototypeOf$1(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? Reflect.construct(o, e || [], _getPrototypeOf$1(t).constructor) : o.apply(t, e)); }
45062
45243
  function _isNativeReflectConstruct$3() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$3 = function _isNativeReflectConstruct() { return !!t; })(); }
45063
45244
  var BxtTitleItem = (_dec$3 = Component({
@@ -45072,9 +45253,9 @@ var BxtTitleItem = (_dec$3 = Component({
45072
45253
  default: ''
45073
45254
  }), _dec6$3 = Prop({
45074
45255
  default: ''
45075
- }), _dec7$1 = Prop({
45256
+ }), _dec7$2 = Prop({
45076
45257
  default: ''
45077
- }), _dec8 = Prop({
45258
+ }), _dec8$1 = Prop({
45078
45259
  default: ''
45079
45260
  }), _dec9 = Prop({
45080
45261
  default: ''
@@ -45099,8 +45280,8 @@ var BxtTitleItem = (_dec$3 = Component({
45099
45280
  _initializerDefineProperty(_this, "isShowCrmPerson", _descriptor3$3, _this);
45100
45281
  _initializerDefineProperty(_this, "label", _descriptor4$2, _this);
45101
45282
  _initializerDefineProperty(_this, "code", _descriptor5$2, _this);
45102
- _initializerDefineProperty(_this, "huomianTag", _descriptor6$1, _this);
45103
- _initializerDefineProperty(_this, "statusTag", _descriptor7, _this);
45283
+ _initializerDefineProperty(_this, "huomianTag", _descriptor6$2, _this);
45284
+ _initializerDefineProperty(_this, "statusTag", _descriptor7$1, _this);
45104
45285
  _initializerDefineProperty(_this, "huomianTips", _descriptor8, _this);
45105
45286
  _initializerDefineProperty(_this, "disabled", _descriptor9, _this);
45106
45287
  _initializerDefineProperty(_this, "dataStatId", _descriptor0, _this);
@@ -45162,12 +45343,12 @@ var BxtTitleItem = (_dec$3 = Component({
45162
45343
  enumerable: true,
45163
45344
  writable: true,
45164
45345
  initializer: null
45165
- }), _descriptor6$1 = _applyDecoratedDescriptor(_class2$3.prototype, "huomianTag", [_dec7$1], {
45346
+ }), _descriptor6$2 = _applyDecoratedDescriptor(_class2$3.prototype, "huomianTag", [_dec7$2], {
45166
45347
  configurable: true,
45167
45348
  enumerable: true,
45168
45349
  writable: true,
45169
45350
  initializer: null
45170
- }), _descriptor7 = _applyDecoratedDescriptor(_class2$3.prototype, "statusTag", [_dec8], {
45351
+ }), _descriptor7$1 = _applyDecoratedDescriptor(_class2$3.prototype, "statusTag", [_dec8$1], {
45171
45352
  configurable: true,
45172
45353
  enumerable: true,
45173
45354
  writable: true,
@@ -45273,29 +45454,6 @@ var __vue_component__$7 = /*#__PURE__*/normalizeComponent$1({
45273
45454
  staticRenderFns: __vue_staticRenderFns__$7
45274
45455
  }, __vue_inject_styles__$7, __vue_script__$7);
45275
45456
 
45276
- //
45277
- //
45278
- //
45279
- //
45280
- //
45281
- //
45282
- //
45283
- //
45284
- //
45285
- //
45286
- //
45287
- //
45288
- //
45289
- //
45290
- //
45291
- //
45292
- //
45293
- //
45294
- //
45295
- //
45296
- //
45297
- //
45298
-
45299
45457
  function initPickerConfig() {
45300
45458
  return {
45301
45459
  visible: false,
@@ -45404,6 +45562,7 @@ const script$3 = {
45404
45562
 
45405
45563
  /* script */
45406
45564
  var __vue_script__$6 = script$3;
45565
+
45407
45566
  /* template */
45408
45567
  var __vue_render__$6 = function __vue_render__() {
45409
45568
  var _vm = this;
@@ -45575,6 +45734,7 @@ const script$2 = {
45575
45734
 
45576
45735
  /* script */
45577
45736
  var __vue_script__$5 = script$2;
45737
+
45578
45738
  /* template */
45579
45739
  var __vue_render__$5 = function __vue_render__() {
45580
45740
  var _vm = this;
@@ -45760,6 +45920,7 @@ const script$1 = {
45760
45920
 
45761
45921
  /* script */
45762
45922
  var __vue_script__$4 = script$1;
45923
+
45763
45924
  /* template */
45764
45925
  var __vue_render__$4 = function __vue_render__() {
45765
45926
  var _vm = this;
@@ -45850,7 +46011,7 @@ var BxtCrmPersonPop = (_dec$2 = Component({
45850
46011
  _this = _callSuper$2(this, BxtCrmPersonPop, [].concat(args));
45851
46012
  _defineProperty$1(_this, "title", '');
45852
46013
  _defineProperty$1(_this, "currentValue", false);
45853
- _defineProperty$1(_this, "currentPersonData", deepCopy(_this.personData));
46014
+ _defineProperty$1(_this, "currentPersonData", cloneDeep(_this.personData));
45854
46015
  _defineProperty$1(_this, "canImportCrm", !!(window.appBridge && window.appBridge.checkAppFeature('CRM_IMPORT')));
45855
46016
  _initializerDefineProperty(_this, "value", _descriptor$2, _this);
45856
46017
  _initializerDefineProperty(_this, "personData", _descriptor2$2, _this);
@@ -45949,7 +46110,7 @@ var BxtCrmPersonPop = (_dec$2 = Component({
45949
46110
  key: "setCrmPersonData",
45950
46111
  value: function setCrmPersonData(info) {
45951
46112
  var self = this;
45952
- var copyPersonData = deepCopy(self.currentPersonData);
46113
+ var copyPersonData = cloneDeep(self.currentPersonData);
45953
46114
  var isImportSuccess = true;
45954
46115
  copyPersonData.cid = info.cid;
45955
46116
  copyPersonData.eleOrderList.map(function (ele) {
@@ -46214,7 +46375,7 @@ var __vue_component__$3 = /*#__PURE__*/normalizeComponent$1({
46214
46375
  staticRenderFns: __vue_staticRenderFns__$3
46215
46376
  }, __vue_inject_styles__$3, __vue_script__$3);
46216
46377
 
46217
- var _dec$1, _dec2$1, _dec3$1, _dec4$1, _dec5$1, _dec6$1, _class$1, _class2$1, _descriptor$1, _descriptor2$1, _descriptor3$1, _descriptor4$1, _descriptor5$1;
46378
+ var _dec$1, _dec2$1, _dec3$1, _dec4$1, _dec5$1, _dec6$1, _dec7$1, _class$1, _class2$1, _descriptor$1, _descriptor2$1, _descriptor3$1, _descriptor4$1, _descriptor5$1, _descriptor6$1;
46218
46379
  function _callSuper$1(t, o, e) { return o = _getPrototypeOf$1(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? Reflect.construct(o, e || [], _getPrototypeOf$1(t).constructor) : o.apply(t, e)); }
46219
46380
  function _isNativeReflectConstruct$1() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { return !!t; })(); }
46220
46381
  var BxtPersonInfo = (_dec$1 = Component({
@@ -46243,6 +46404,10 @@ var BxtPersonInfo = (_dec$1 = Component({
46243
46404
  return {};
46244
46405
  }
46245
46406
  }), _dec6$1 = Prop({
46407
+ default: function _default() {
46408
+ return {};
46409
+ }
46410
+ }), _dec7$1 = Prop({
46246
46411
  default: false
46247
46412
  }), _dec$1(_class$1 = (_class2$1 = /*#__PURE__*/function (_Vue) {
46248
46413
  function BxtPersonInfo() {
@@ -46253,11 +46418,12 @@ var BxtPersonInfo = (_dec$1 = Component({
46253
46418
  }
46254
46419
  _this = _callSuper$1(this, BxtPersonInfo, [].concat(args));
46255
46420
  _defineProperty$1(_this, "isShowCrmPersonPop", false);
46256
- _initializerDefineProperty(_this, "inputData", _descriptor$1, _this);
46257
- _initializerDefineProperty(_this, "verifyData", _descriptor2$1, _this);
46258
- _initializerDefineProperty(_this, "personData", _descriptor3$1, _this);
46259
- _initializerDefineProperty(_this, "params", _descriptor4$1, _this);
46260
- _initializerDefineProperty(_this, "isShowCrmPerson", _descriptor5$1, _this);
46421
+ _initializerDefineProperty(_this, "user", _descriptor$1, _this);
46422
+ _initializerDefineProperty(_this, "inputData", _descriptor2$1, _this);
46423
+ _initializerDefineProperty(_this, "verifyData", _descriptor3$1, _this);
46424
+ _initializerDefineProperty(_this, "personData", _descriptor4$1, _this);
46425
+ _initializerDefineProperty(_this, "params", _descriptor5$1, _this);
46426
+ _initializerDefineProperty(_this, "isShowCrmPerson", _descriptor6$1, _this);
46261
46427
  return _this;
46262
46428
  }
46263
46429
  _inherits(BxtPersonInfo, _Vue);
@@ -46313,18 +46479,13 @@ var BxtPersonInfo = (_dec$1 = Component({
46313
46479
  var ele,
46314
46480
  inputData,
46315
46481
  personData,
46316
- verifyData,
46317
- params,
46318
46482
  allPersonsData,
46319
- productGroupList,
46320
- eventTarget,
46321
- promises,
46322
46483
  _args = arguments;
46323
46484
  return _regeneratorRuntime.wrap(function (_context) {
46324
46485
  while (1) switch (_context.prev = _context.next) {
46325
46486
  case 0:
46326
46487
  ele = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
46327
- inputData = this.inputData, personData = this.personData, verifyData = this.verifyData, params = this.params;
46488
+ inputData = this.inputData, personData = this.personData;
46328
46489
  if (inputData) {
46329
46490
  _context.next = 1;
46330
46491
  break;
@@ -46332,41 +46493,19 @@ var BxtPersonInfo = (_dec$1 = Component({
46332
46493
  return _context.abrupt("return");
46333
46494
  case 1:
46334
46495
  allPersonsData = inputData.personData;
46335
- productGroupList = inputData.productGroupList || [];
46336
- eventTarget = {
46337
- personKey: personData.key,
46338
- elementKey: ele.key
46339
- };
46340
- if (!allPersonsData) {
46341
- _context.next = 2;
46342
- break;
46343
- }
46344
- personDataHandler(allPersonsData);
46345
- if (personData.key === 'applicantInfo') {
46346
- if (ele.key === 'applicantAndInsuredSame' && !ele.value) {
46347
- personData.cid = null;
46496
+ if (allPersonsData) {
46497
+ personDataHandler(allPersonsData);
46498
+ if (personData.key === 'applicantInfo') {
46499
+ if (ele.key === 'applicantAndInsuredSame' && !ele.value) {
46500
+ personData.cid = null;
46501
+ }
46348
46502
  }
46349
46503
  }
46350
- promises = [];
46351
- productGroupList.filter(function (g) {
46352
- return g.prodOrderList;
46353
- }).forEach(function (g) {
46354
- g.prodOrderList.map(function (p) {
46355
- clearAddAndTakeAndAdjustBaoeData(p);
46356
- promises.push(productDataHandler(p, get$3(verifyData, "[".concat(p.key, "]")), allPersonsData, {
46357
- planbookId: get$3(params, 'planbookId'),
46358
- eventTarget: eventTarget
46359
- }));
46360
- });
46361
- });
46362
- _context.next = 2;
46363
- return Promise.all(promises);
46364
- case 2:
46365
46504
  if (personData.key && ele.key && !['age'].includes(ele.key)) {
46366
46505
  window.WeiyiStatSDK && window.WeiyiStatSDK.submit("".concat(personData.key, "_").concat(ele.key));
46367
46506
  }
46368
46507
  this.$emit('change', personData, ele);
46369
- case 3:
46508
+ case 2:
46370
46509
  case "end":
46371
46510
  return _context.stop();
46372
46511
  }
@@ -46408,27 +46547,32 @@ var BxtPersonInfo = (_dec$1 = Component({
46408
46547
  return false;
46409
46548
  }
46410
46549
  }]);
46411
- }(Vue), _descriptor$1 = _applyDecoratedDescriptor(_class2$1.prototype, "inputData", [_dec2$1], {
46550
+ }(Vue), _descriptor$1 = _applyDecoratedDescriptor(_class2$1.prototype, "user", [_dec2$1], {
46551
+ configurable: true,
46552
+ enumerable: true,
46553
+ writable: true,
46554
+ initializer: null
46555
+ }), _descriptor2$1 = _applyDecoratedDescriptor(_class2$1.prototype, "inputData", [_dec3$1], {
46412
46556
  configurable: true,
46413
46557
  enumerable: true,
46414
46558
  writable: true,
46415
46559
  initializer: null
46416
- }), _descriptor2$1 = _applyDecoratedDescriptor(_class2$1.prototype, "verifyData", [_dec3$1], {
46560
+ }), _descriptor3$1 = _applyDecoratedDescriptor(_class2$1.prototype, "verifyData", [_dec4$1], {
46417
46561
  configurable: true,
46418
46562
  enumerable: true,
46419
46563
  writable: true,
46420
46564
  initializer: null
46421
- }), _descriptor3$1 = _applyDecoratedDescriptor(_class2$1.prototype, "personData", [_dec4$1], {
46565
+ }), _descriptor4$1 = _applyDecoratedDescriptor(_class2$1.prototype, "personData", [_dec5$1], {
46422
46566
  configurable: true,
46423
46567
  enumerable: true,
46424
46568
  writable: true,
46425
46569
  initializer: null
46426
- }), _descriptor4$1 = _applyDecoratedDescriptor(_class2$1.prototype, "params", [_dec5$1], {
46570
+ }), _descriptor5$1 = _applyDecoratedDescriptor(_class2$1.prototype, "params", [_dec6$1], {
46427
46571
  configurable: true,
46428
46572
  enumerable: true,
46429
46573
  writable: true,
46430
46574
  initializer: null
46431
- }), _descriptor5$1 = _applyDecoratedDescriptor(_class2$1.prototype, "isShowCrmPerson", [_dec6$1], {
46575
+ }), _descriptor6$1 = _applyDecoratedDescriptor(_class2$1.prototype, "isShowCrmPerson", [_dec7$1], {
46432
46576
  configurable: true,
46433
46577
  enumerable: true,
46434
46578
  writable: true,
@@ -46437,6 +46581,7 @@ var BxtPersonInfo = (_dec$1 = Component({
46437
46581
 
46438
46582
  /* script */
46439
46583
  var __vue_script__$2 = BxtPersonInfo;
46584
+
46440
46585
  /* template */
46441
46586
  var __vue_render__$2 = function __vue_render__() {
46442
46587
  var _vm = this;
@@ -46674,140 +46819,110 @@ var __vue_component__$2 = /*#__PURE__*/normalizeComponent$1({
46674
46819
  staticRenderFns: __vue_staticRenderFns__$2
46675
46820
  }, __vue_inject_styles__$2, __vue_script__$2);
46676
46821
 
46677
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
46678
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
46679
- function createMd5Token(reqData, obj) {
46680
- var personList = reqData.personData.personOrderList;
46681
- var signInfo = {};
46682
- if (reqData.insuranceTypeId !== null) {
46683
- signInfo.insuranceTypeId = reqData.insuranceTypeId;
46684
- }
46685
- var insuredInfo = personList.find(function (p) {
46686
- return p.key === 'insuredInfo';
46687
- });
46688
- var applicantInfo = personList.find(function (p) {
46689
- return p.key === 'applicantInfo';
46690
- });
46691
- signInfo.insuredAge = insuredInfo.age * 1;
46692
- signInfo.insuredSex = insuredInfo.sex * 1;
46693
- if (applicantInfo) {
46694
- signInfo.applicantAge = isNaN(applicantInfo.age * 1) ? 0 : applicantInfo.age * 1;
46695
- signInfo.applicantSex = isNaN(applicantInfo.sex * 1) ? 0 : applicantInfo.sex * 1;
46696
- }
46697
- var productKeys = [];
46698
- var insuranceKeys = [];
46699
- var productGroup = reqData.productGroupList.filter(function (group) {
46700
- return group.key === obj.groupDataKey;
46701
- })[0];
46702
- var prodOrderList = productGroup.prodOrderList.slice();
46703
- prodOrderList && prodOrderList.map(function (prod) {
46704
- productKeys.push(prod.key);
46705
- prod.mulInsOrderList.map(function (ins) {
46706
- insuranceKeys.push(ins.key);
46707
- });
46708
- });
46709
- signInfo.product = '';
46710
- signInfo.insurance = '';
46711
- productKeys.sort(function (a, b) {
46712
- return a - b;
46713
- });
46714
- productKeys.map(function (ele) {
46715
- signInfo.product += "p=".concat(ele, ";");
46716
- });
46717
- insuranceKeys.sort(function (a, b) {
46718
- return a - b;
46719
- });
46720
- insuranceKeys.map(function (ele) {
46721
- signInfo.insurance += "i=".concat(ele, ";");
46722
- });
46723
- signInfo.params = JSON.stringify(reqData);
46724
- var signInfoTx = '';
46725
- for (var k in signInfo) {
46726
- signInfoTx += "".concat(k, "=").concat(signInfo[k], "&");
46727
- }
46728
- delete signInfo.params;
46729
-
46730
- // console.log(signInfoTx)
46731
- // console.log(MD5(signInfoTx))
46732
- // console.log(JSON.stringify({
46733
- // ...signInfo,
46734
- // signMd5: MD5(signInfoTx)
46735
- // }))
46736
-
46737
- return CryptoJS.AES.encrypt(JSON.stringify(_objectSpread(_objectSpread({}, signInfo), {}, {
46738
- signMd5: MD5(signInfoTx)
46739
- })), CryptoJS.enc.Utf8.parse('67u3Dg5fcc06UntP'), {
46740
- mode: CryptoJS.mode.ECB,
46741
- padding: CryptoJS.pad.Pkcs7
46742
- }).toString() || MD5(signInfoTx) || '20190929';
46822
+ function createdProductDataToCalc(_x2) {
46823
+ return _createdProductDataToCalc.apply(this, arguments);
46743
46824
  }
46744
-
46745
- function createdProductDataToCalc(inputData) {
46746
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
46747
- if (inputData && inputData.personData && inputData.productGroupList && inputData.productGroupList.length) {
46748
- var productData = getProductFromInputData(inputData, {
46749
- groupKey: options.groupKey,
46750
- productKey: options.productKey
46751
- });
46752
- var tempProductForm = convertProductData(productData);
46753
- // 过滤一些不必要的数据
46754
- var productForm = {};
46755
- for (var k in tempProductForm) {
46756
- if (!['hadChoice', 'hide', 'totalBaof', 'insShowArr', 'autoImport'].includes(k)) {
46757
- productForm[k] = tempProductForm[k];
46758
- }
46759
- }
46760
- if (productForm.mulInsOrderList) {
46761
- productForm.mulInsOrderList = productForm.mulInsOrderList.map(function (ins) {
46762
- var tempIns = {};
46763
- for (var _k2 in ins) {
46764
- if (!['isFollowing', 'pPeriodDesc', 'baoeDesc', 'baofDesc', 'iDurationDesc', 'accountData', 'reduceBaofData', 'duplicateReduceBaofData', 'isCheckbox', 'groupKey', 'groupName', 'customVariableExp', 'calcResultExp', 'revalidateFlag'].includes(_k2)) {
46765
- tempIns[_k2] = ins[_k2];
46825
+ function _createdProductDataToCalc() {
46826
+ _createdProductDataToCalc = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(inputData) {
46827
+ var options,
46828
+ productData,
46829
+ tempProductForm,
46830
+ productForm,
46831
+ k,
46832
+ errorMsg,
46833
+ reqData,
46834
+ reqDataStr,
46835
+ signature,
46836
+ _args2 = arguments;
46837
+ return _regeneratorRuntime.wrap(function (_context2) {
46838
+ while (1) switch (_context2.prev = _context2.next) {
46839
+ case 0:
46840
+ options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
46841
+ if (!(inputData && inputData.personData && inputData.productGroupList && inputData.productGroupList.length)) {
46842
+ _context2.next = 5;
46843
+ break;
46844
+ }
46845
+ productData = getProductFromInputData(inputData, {
46846
+ groupKey: options.groupKey,
46847
+ productKey: options.productKey
46848
+ });
46849
+ tempProductForm = convertProductData(productData); // 过滤一些不必要的数据
46850
+ productForm = {};
46851
+ for (k in tempProductForm) {
46852
+ if (!['hadChoice', 'hide', 'totalBaof', 'insShowArr', 'autoImport', 'restrictList', 'resultImport', 'adjustBaoeData'].includes(k)) {
46853
+ productForm[k] = tempProductForm[k];
46854
+ }
46855
+ }
46856
+ if (productForm.mulInsOrderList) {
46857
+ productForm.mulInsOrderList = productForm.mulInsOrderList.map(function (ins) {
46858
+ var tempIns = {};
46859
+ for (var _k2 in ins) {
46860
+ if (!['isFollowing', 'pPeriodDesc', 'baoeDesc', 'baofDesc', 'iDurationDesc', 'payModeDesc', 'payModePremiumDesc', 'accountData', 'reduceBaofData', 'duplicateReduceBaofData', 'isCheckbox', 'groupKey', 'groupName', 'shmInsData', 'totalBaof', 'customVariableExp',
46861
+ // 'calcResultExp', // 不能删除,后面有依赖
46862
+ 'revalidateFlag'].includes(_k2)) {
46863
+ tempIns[_k2] = ins[_k2];
46864
+ }
46865
+ }
46866
+ return tempIns;
46867
+ });
46766
46868
  }
46767
- }
46768
- return tempIns;
46769
- });
46770
- }
46771
-
46772
- // 产品是否有选中的险种
46773
- if (productForm && productForm.mulInsOrderList && productForm.mulInsOrderList.length) {
46774
- var errorMsg = verifyProductRules({
46775
- personData: inputData.personData,
46776
- productData: productData
46777
- });
46778
46869
 
46779
- // 清除产品中的一些不必要的险种数据
46780
- productForm.mulInsOrderList.forEach(function (ins) {
46781
- if (ins.shmInsData) {
46782
- delete ins.shmInsData;
46783
- }
46784
- });
46785
- var reqData = {
46786
- publicPbUuid: options.publicPbUuid || null,
46787
- insuranceTypeId: options.planbookId ? options.planbookId * 1 : null,
46788
- personData: {
46789
- personOrderList: convertPersonData(inputData.personData, inputData.personData.personOrderList.map(function (p) {
46790
- return p.key;
46791
- }))
46792
- },
46793
- productGroupList: [{
46794
- key: options.groupKey,
46795
- prodOrderList: [productForm] //转换后的产品数据
46796
- }]
46797
- };
46798
- return Promise.resolve({
46799
- errorMsg: errorMsg,
46800
- jd: JSON.stringify(reqData),
46801
- signature: createMd5Token(reqData, {
46802
- groupDataKey: options.groupKey
46803
- })
46804
- });
46805
- } else {
46806
- return Promise.reject('请选择险种');
46807
- }
46808
- } else {
46809
- return Promise.reject('请填写投保数据');
46810
- }
46870
+ // 产品是否有选中的险种
46871
+ if (!(productForm && productForm.policyType === 'online_trade')) {
46872
+ _context2.next = 1;
46873
+ break;
46874
+ }
46875
+ return _context2.abrupt("return", Promise.resolve({}));
46876
+ case 1:
46877
+ if (!(productForm && productForm.mulInsOrderList && productForm.mulInsOrderList.length)) {
46878
+ _context2.next = 3;
46879
+ break;
46880
+ }
46881
+ errorMsg = verifyProductRules({
46882
+ personData: inputData.personData,
46883
+ productData: productData
46884
+ });
46885
+ reqData = {
46886
+ publicPbUuid: options.publicPbUuid || null,
46887
+ insuranceTypeId: options.planbookId ? options.planbookId * 1 : null,
46888
+ personData: {
46889
+ personOrderList: convertPersonData(inputData.personData, inputData.personData.personOrderList.map(function (p) {
46890
+ return p.key;
46891
+ }))
46892
+ },
46893
+ productGroupList: [{
46894
+ key: options.groupKey,
46895
+ prodOrderList: [productForm] //转换后的产品数据
46896
+ }]
46897
+ };
46898
+ reqDataStr = JSON.stringify(reqData);
46899
+ _context2.next = 2;
46900
+ return getSecurityToken(reqDataStr, {
46901
+ groupDataKey: options.groupKey
46902
+ });
46903
+ case 2:
46904
+ signature = _context2.sent;
46905
+ return _context2.abrupt("return", Promise.resolve({
46906
+ errorMsg: errorMsg,
46907
+ jd: reqDataStr,
46908
+ signature: signature,
46909
+ clientVersion: appVersion,
46910
+ isIos: isIos$2
46911
+ }));
46912
+ case 3:
46913
+ return _context2.abrupt("return", Promise.reject('请选择险种'));
46914
+ case 4:
46915
+ _context2.next = 6;
46916
+ break;
46917
+ case 5:
46918
+ return _context2.abrupt("return", Promise.reject('请填写投保数据'));
46919
+ case 6:
46920
+ case "end":
46921
+ return _context2.stop();
46922
+ }
46923
+ }, _callee2);
46924
+ }));
46925
+ return _createdProductDataToCalc.apply(this, arguments);
46811
46926
  }
46812
46927
  function getProductFromInputData(inputData) {
46813
46928
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -46823,7 +46938,7 @@ function getProductFromInputData(inputData) {
46823
46938
  return product;
46824
46939
  }
46825
46940
 
46826
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
46941
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
46827
46942
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: true } : { done: false, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = true, u = false; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = true, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
46828
46943
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
46829
46944
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
@@ -46846,12 +46961,16 @@ var BxtProductInfo = (_dec = Component({
46846
46961
  return {};
46847
46962
  }
46848
46963
  }), _dec4 = Prop({
46849
- default: null
46964
+ default: function _default() {
46965
+ return {};
46966
+ }
46850
46967
  }), _dec5 = Prop({
46851
46968
  default: null
46852
46969
  }), _dec6 = Prop({
46853
- default: true
46970
+ default: null
46854
46971
  }), _dec7 = Prop({
46972
+ default: true
46973
+ }), _dec8 = Prop({
46855
46974
  default: function _default() {
46856
46975
  return {};
46857
46976
  }
@@ -46868,12 +46987,13 @@ var BxtProductInfo = (_dec = Component({
46868
46987
  _defineProperty$1(_this, "recommendValues", {});
46869
46988
  _defineProperty$1(_this, "recommendValuesCache", {});
46870
46989
  _defineProperty$1(_this, "isShowCustomValueTips", true);
46871
- _initializerDefineProperty(_this, "inputData", _descriptor, _this);
46872
- _initializerDefineProperty(_this, "verifyData", _descriptor2, _this);
46873
- _initializerDefineProperty(_this, "groupKey", _descriptor3, _this);
46874
- _initializerDefineProperty(_this, "productKey", _descriptor4, _this);
46875
- _initializerDefineProperty(_this, "showRecommendValue", _descriptor5, _this);
46876
- _initializerDefineProperty(_this, "params", _descriptor6, _this);
46990
+ _initializerDefineProperty(_this, "user", _descriptor, _this);
46991
+ _initializerDefineProperty(_this, "inputData", _descriptor2, _this);
46992
+ _initializerDefineProperty(_this, "verifyData", _descriptor3, _this);
46993
+ _initializerDefineProperty(_this, "groupKey", _descriptor4, _this);
46994
+ _initializerDefineProperty(_this, "productKey", _descriptor5, _this);
46995
+ _initializerDefineProperty(_this, "showRecommendValue", _descriptor6, _this);
46996
+ _initializerDefineProperty(_this, "params", _descriptor7, _this);
46877
46997
  return _this;
46878
46998
  }
46879
46999
  _inherits(BxtProductInfo, _Vue);
@@ -47017,11 +47137,11 @@ var BxtProductInfo = (_dec = Component({
47017
47137
  value: function () {
47018
47138
  var _changeProduct = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(productData, options) {
47019
47139
  var _this5 = this;
47020
- var $listeners, inputData, verifyData, personData, groupKey, productKey, params, type, insData, eleData, planbookId, publicPbUuid, productVerifyData, eventTarget, errorMsg;
47140
+ var $listeners, user, inputData, verifyData, personData, groupKey, productKey, params, type, insData, eleData, planbookId, publicPbUuid, productVerifyData, eventTarget, errorMsg;
47021
47141
  return _regeneratorRuntime.wrap(function (_context4) {
47022
47142
  while (1) switch (_context4.prev = _context4.next) {
47023
47143
  case 0:
47024
- $listeners = this.$listeners, inputData = this.inputData, verifyData = this.verifyData, personData = this.personData, groupKey = this.groupKey, productKey = this.productKey, params = this.params;
47144
+ $listeners = this.$listeners, user = this.user, inputData = this.inputData, verifyData = this.verifyData, personData = this.personData, groupKey = this.groupKey, productKey = this.productKey, params = this.params;
47025
47145
  type = options.type, insData = options.insData, eleData = options.eleData;
47026
47146
  planbookId = get$3(params, 'planbookId');
47027
47147
  publicPbUuid = get$3(params, 'publicPbUuid');
@@ -47031,12 +47151,14 @@ var BxtProductInfo = (_dec = Component({
47031
47151
  insuranceCode: get$3(insData, 'code') || null,
47032
47152
  elementKey: get$3(eleData, 'key') || null
47033
47153
  };
47034
- if (type === 'change') {
47035
- clearAddAndTakeAndAdjustBaoeData(productData);
47154
+ if (productData.multipleInsured) {
47155
+ multipleInsuredHandler(productData, personData);
47036
47156
  }
47037
47157
  _context4.next = 1;
47038
47158
  return productDataHandler(productData, productVerifyData, personData, {
47159
+ user: user,
47039
47160
  planbookId: planbookId,
47161
+ executeSource: 'userAction',
47040
47162
  eventTarget: eventTarget
47041
47163
  });
47042
47164
  case 1:
@@ -47071,10 +47193,12 @@ var BxtProductInfo = (_dec = Component({
47071
47193
  _context3.next = 1;
47072
47194
  return new Promise(function (resolve, reject) {
47073
47195
  _this5.$emit('reCalculate', inputData, {
47196
+ user: user,
47074
47197
  planbookId: planbookId,
47075
47198
  publicPbUuid: publicPbUuid,
47076
47199
  groupKey: groupKey,
47077
47200
  productKey: productKey,
47201
+ executeSource: 'userAction',
47078
47202
  isIgnoreError: true,
47079
47203
  eventTarget: eventTarget
47080
47204
  }, resolve, reject);
@@ -47084,7 +47208,9 @@ var BxtProductInfo = (_dec = Component({
47084
47208
  case 1:
47085
47209
  _context3.next = 2;
47086
47210
  return productDataHandler(productData, productVerifyData, personData, {
47211
+ user: user,
47087
47212
  planbookId: planbookId,
47213
+ executeSource: 'userAction',
47088
47214
  eventTarget: eventTarget
47089
47215
  });
47090
47216
  case 2:
@@ -47292,7 +47418,7 @@ var BxtProductInfo = (_dec = Component({
47292
47418
  }, {
47293
47419
  key: "getRecommendValues",
47294
47420
  value: function getRecommendValues(ins, ele) {
47295
- if (!['baoe', 'baof'].includes(ele.key)) {
47421
+ if (!['baoe', 'baof'].includes(ele.key) || ele.isDisabled) {
47296
47422
  return null;
47297
47423
  }
47298
47424
  var insurance = convertEleOrderListToObj(ins);
@@ -47302,7 +47428,7 @@ var BxtProductInfo = (_dec = Component({
47302
47428
  key: "requiestRecommendValues",
47303
47429
  value: function () {
47304
47430
  var _requiestRecommendValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
47305
- var self, showRecommendValue, recommendValuesCache, inputData, groupData, productData, url, calcData, reqParams, calcInputData, calcProductData;
47431
+ var self, showRecommendValue, recommendValuesCache, inputData, groupData, productData, requestDataToCalc, reqParams, inputDataToCalc, mulInsOrderList;
47306
47432
  return _regeneratorRuntime.wrap(function (_context6) {
47307
47433
  while (1) switch (_context6.prev = _context6.next) {
47308
47434
  case 0:
@@ -47314,26 +47440,23 @@ var BxtProductInfo = (_dec = Component({
47314
47440
  }
47315
47441
  return _context6.abrupt("return");
47316
47442
  case 1:
47317
- url = "".concat(PLANBOOK_API_HOSTNAME, "/planBook/input/calculate/recommend");
47318
47443
  _context6.next = 2;
47319
47444
  return createdProductDataToCalc(inputData, {
47320
47445
  groupKey: groupData.key,
47321
47446
  productKey: productData.key
47322
47447
  }).catch(function () {});
47323
47448
  case 2:
47324
- calcData = _context6.sent;
47449
+ requestDataToCalc = _context6.sent;
47325
47450
  reqParams = [];
47326
- calcInputData = calcData && JSON.parse(calcData.jd);
47327
- calcProductData = calcInputData && calcInputData.productGroupList[0].prodOrderList[0];
47328
- if (calcProductData && calcProductData.mulInsOrderList) {
47329
- calcProductData.mulInsOrderList.forEach(function (ins) {
47330
- reqParams.push({
47331
- insuranceId: ins.key,
47332
- period: ins.pPeriod,
47333
- calMethod: ins.calMethod || ins.feeType || ins.feeBaseType
47334
- });
47451
+ inputDataToCalc = requestDataToCalc && JSON.parse(requestDataToCalc.jd);
47452
+ mulInsOrderList = get$3(inputDataToCalc, 'productGroupList[0].prodOrderList[0].mulInsOrderList') || [];
47453
+ mulInsOrderList.forEach(function (ins) {
47454
+ reqParams.push({
47455
+ insuranceId: ins.key,
47456
+ period: ins.pPeriod,
47457
+ calMethod: ins.calMethod || ins.feeType || ins.feeBaseType
47335
47458
  });
47336
- }
47459
+ });
47337
47460
  if (!recommendValuesCache[JSON.stringify(reqParams)]) {
47338
47461
  _context6.next = 3;
47339
47462
  break;
@@ -47341,30 +47464,13 @@ var BxtProductInfo = (_dec = Component({
47341
47464
  self.recommendValues = recommendValuesCache[JSON.stringify(reqParams)];
47342
47465
  return _context6.abrupt("return");
47343
47466
  case 3:
47344
- return _context6.abrupt("return", fetch(url, {
47345
- method: 'POST',
47346
- credentials: 'include',
47347
- headers: {
47348
- Accept: 'application/json, text/plain, */*',
47349
- 'Content-Type': 'application/json;'
47350
- },
47351
- body: JSON.stringify(reqParams)
47352
- }).then(function (response) {
47353
- return response.json();
47354
- }).then(function (_ref4) {
47355
- var success = _ref4.success,
47356
- data = _ref4.data,
47357
- info = _ref4.info;
47358
- if (!success || !data) {
47359
- self.$toast(info);
47360
- return Promise.reject();
47361
- }
47467
+ return _context6.abrupt("return", getPlanbookRecommendData(reqParams).then(function (data) {
47362
47468
  var recommendValues = data.reduce(function (obj, ele) {
47363
47469
  return Object.assign(obj, _defineProperty$1({}, ele.insuranceId, ele.valueList));
47364
47470
  }, {});
47365
47471
 
47366
47472
  // 推荐金额,根据最小值和最大值进行过滤。From hyw
47367
- var mulInsOrderList = productData && productData.mulInsOrderList ? productData.mulInsOrderList : [];
47473
+ var mulInsOrderList = get$3(productData, 'mulInsOrderList') || [];
47368
47474
  mulInsOrderList.filter(function (ins) {
47369
47475
  return ins.eleOrderList && ins.eleOrderList.length;
47370
47476
  }).filter(function (ins) {
@@ -47390,8 +47496,9 @@ var BxtProductInfo = (_dec = Component({
47390
47496
  });
47391
47497
  self.recommendValues = recommendValues;
47392
47498
  recommendValuesCache[JSON.stringify(reqParams)] = recommendValues;
47393
- }).catch(function (error) {
47394
- console.log(error);
47499
+ }).catch(function (info) {
47500
+ self.$toast(info);
47501
+ console.log(info);
47395
47502
  }));
47396
47503
  case 4:
47397
47504
  case "end":
@@ -47484,32 +47591,37 @@ var BxtProductInfo = (_dec = Component({
47484
47591
  });
47485
47592
  }
47486
47593
  }]);
47487
- }(Vue), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "inputData", [_dec2], {
47594
+ }(Vue), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "user", [_dec2], {
47595
+ configurable: true,
47596
+ enumerable: true,
47597
+ writable: true,
47598
+ initializer: null
47599
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "inputData", [_dec3], {
47488
47600
  configurable: true,
47489
47601
  enumerable: true,
47490
47602
  writable: true,
47491
47603
  initializer: null
47492
- }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "verifyData", [_dec3], {
47604
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "verifyData", [_dec4], {
47493
47605
  configurable: true,
47494
47606
  enumerable: true,
47495
47607
  writable: true,
47496
47608
  initializer: null
47497
- }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "groupKey", [_dec4], {
47609
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "groupKey", [_dec5], {
47498
47610
  configurable: true,
47499
47611
  enumerable: true,
47500
47612
  writable: true,
47501
47613
  initializer: null
47502
- }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "productKey", [_dec5], {
47614
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "productKey", [_dec6], {
47503
47615
  configurable: true,
47504
47616
  enumerable: true,
47505
47617
  writable: true,
47506
47618
  initializer: null
47507
- }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "showRecommendValue", [_dec6], {
47619
+ }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "showRecommendValue", [_dec7], {
47508
47620
  configurable: true,
47509
47621
  enumerable: true,
47510
47622
  writable: true,
47511
47623
  initializer: null
47512
- }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "params", [_dec7], {
47624
+ }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "params", [_dec8], {
47513
47625
  configurable: true,
47514
47626
  enumerable: true,
47515
47627
  writable: true,
@@ -48350,7 +48462,7 @@ if (typeof window !== 'undefined' && window.Vue) {
48350
48462
  install(window.Vue);
48351
48463
  }
48352
48464
  const index = {
48353
- version: '3.2.0',
48465
+ version: '3.3.0',
48354
48466
  install: install
48355
48467
  };
48356
48468