bxs-tools-ui 1.3.4 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/add-and-take/index.js +6 -7
- package/lib/adjust-baoe/index.js +6 -7
- package/lib/bxs-utils/index.js +464 -465
- package/lib/index.js +68 -43
- package/lib/insure-calculate/index.js +946 -947
- package/lib/person-info/index.js +1290 -1264
- package/lib/product-info/index.js +489 -469
- package/package.json +1 -1
- package/packages/bxs-utils/planbook/person.ts +2 -3
- package/packages/components/form-item/title-item.vue +14 -1
- package/packages/person-info/index.vue +16 -6
- package/packages/product-info/index.vue +1 -2
package/lib/person-info/index.js
CHANGED
|
@@ -563,7 +563,7 @@ module.exports = _typeof, module.exports.__esModule = true, module.exports["defa
|
|
|
563
563
|
|
|
564
564
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "z", function() { return _product__WEBPACK_IMPORTED_MODULE_2__["j"]; });
|
|
565
565
|
|
|
566
|
-
/* harmony import */ var _insurance__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
566
|
+
/* harmony import */ var _insurance__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
|
|
567
567
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "m", function() { return _insurance__WEBPACK_IMPORTED_MODULE_3__["a"]; });
|
|
568
568
|
|
|
569
569
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "n", function() { return _insurance__WEBPACK_IMPORTED_MODULE_3__["b"]; });
|
|
@@ -600,7 +600,7 @@ if (document && document.cookie && document.cookie.match('LIZHAO_DEBUG_CONSOLE_F
|
|
|
600
600
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
601
601
|
/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
|
|
602
602
|
/* harmony import */ var _person__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
|
|
603
|
-
/* harmony import */ var _insurance__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
603
|
+
/* harmony import */ var _insurance__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
|
|
604
604
|
|
|
605
605
|
|
|
606
606
|
|
|
@@ -1263,8 +1263,8 @@ try {
|
|
|
1263
1263
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1264
1264
|
|
|
1265
1265
|
"use strict";
|
|
1266
|
-
/* harmony import */ var
|
|
1267
|
-
/* harmony import */ var
|
|
1266
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_title_item_vue_vue_type_style_index_0_id_dade21e2_prod_lang_postcss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95);
|
|
1267
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_title_item_vue_vue_type_style_index_0_id_dade21e2_prod_lang_postcss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_title_item_vue_vue_type_style_index_0_id_dade21e2_prod_lang_postcss___WEBPACK_IMPORTED_MODULE_0__);
|
|
1268
1268
|
/* unused harmony reexport * */
|
|
1269
1269
|
|
|
1270
1270
|
|
|
@@ -2119,8 +2119,8 @@ function isPromise(obj) {
|
|
|
2119
2119
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2120
2120
|
|
|
2121
2121
|
"use strict";
|
|
2122
|
-
/* harmony import */ var
|
|
2123
|
-
/* harmony import */ var
|
|
2122
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_271e5864_prod_lang_postcss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(185);
|
|
2123
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_271e5864_prod_lang_postcss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_271e5864_prod_lang_postcss___WEBPACK_IMPORTED_MODULE_0__);
|
|
2124
2124
|
/* unused harmony reexport * */
|
|
2125
2125
|
|
|
2126
2126
|
|
|
@@ -2237,7 +2237,7 @@ module.exports = function buildURL(url, params, paramsSerializer) {
|
|
|
2237
2237
|
// ESM COMPAT FLAG
|
|
2238
2238
|
__webpack_require__.r(__webpack_exports__);
|
|
2239
2239
|
|
|
2240
|
-
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--1!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/vue-loader/lib??vue-loader-options!./packages/person-info/index.vue?vue&type=template&id=
|
|
2240
|
+
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--1!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/vue-loader/lib??vue-loader-options!./packages/person-info/index.vue?vue&type=template&id=271e5864&
|
|
2241
2241
|
var render = function render() {
|
|
2242
2242
|
var _vm = this,
|
|
2243
2243
|
_c = _vm._self._c,
|
|
@@ -2454,7 +2454,7 @@ var render = function render() {
|
|
|
2454
2454
|
|
|
2455
2455
|
var staticRenderFns = [];
|
|
2456
2456
|
|
|
2457
|
-
// CONCATENATED MODULE: ./packages/person-info/index.vue?vue&type=template&id=
|
|
2457
|
+
// CONCATENATED MODULE: ./packages/person-info/index.vue?vue&type=template&id=271e5864&
|
|
2458
2458
|
|
|
2459
2459
|
// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js
|
|
2460
2460
|
var tslib_es6 = __webpack_require__(0);
|
|
@@ -2464,7 +2464,7 @@ var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(
|
|
|
2464
2464
|
var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default = /*#__PURE__*/__webpack_require__.n(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_);
|
|
2465
2465
|
|
|
2466
2466
|
// EXTERNAL MODULE: ./packages/bxs-utils/index.ts + 3 modules
|
|
2467
|
-
var bxs_utils = __webpack_require__(
|
|
2467
|
+
var bxs_utils = __webpack_require__(6);
|
|
2468
2468
|
|
|
2469
2469
|
// EXTERNAL MODULE: ./node_modules/vue-property-decorator/lib/vue-property-decorator.js + 1 modules
|
|
2470
2470
|
var vue_property_decorator = __webpack_require__(2);
|
|
@@ -3122,26 +3122,34 @@ var person_infovue_type_script_lang_ts_BxtPersonInfo = (function (_super) {
|
|
|
3122
3122
|
inputDom.focus();
|
|
3123
3123
|
};
|
|
3124
3124
|
BxtPersonInfo.prototype.change = function (ele) {
|
|
3125
|
-
var _this = this;
|
|
3126
3125
|
if (ele === void 0) { ele = {}; }
|
|
3127
|
-
var
|
|
3128
|
-
|
|
3126
|
+
var _a = this, inputData = _a.inputData, personData = _a.personData, verifyData = _a.verifyData;
|
|
3127
|
+
if (!inputData) {
|
|
3128
|
+
return;
|
|
3129
|
+
}
|
|
3130
|
+
var allPersonsData = inputData.personData;
|
|
3131
|
+
var productGroupList = inputData.productGroupList;
|
|
3129
3132
|
if (allPersonsData) {
|
|
3130
3133
|
Object(bxs_utils["personDataHandler"])(allPersonsData);
|
|
3134
|
+
if (personData.key === 'applicantInfo') {
|
|
3135
|
+
if (ele.key === 'applicantAndInsuredSame' && !ele.value) {
|
|
3136
|
+
personData.cid = null;
|
|
3137
|
+
}
|
|
3138
|
+
}
|
|
3131
3139
|
if (productGroupList) {
|
|
3132
3140
|
productGroupList.forEach(function (g) {
|
|
3133
3141
|
g.prodOrderList &&
|
|
3134
3142
|
g.prodOrderList.map(function (p) {
|
|
3135
3143
|
Object(bxs_utils["clearAddAndTakeAndAdjustBaoeData"])(p);
|
|
3136
|
-
Object(bxs_utils["productDataHandler"])(p,
|
|
3144
|
+
Object(bxs_utils["productDataHandler"])(p, verifyData && verifyData[p.key], allPersonsData);
|
|
3137
3145
|
});
|
|
3138
3146
|
});
|
|
3139
3147
|
}
|
|
3140
3148
|
}
|
|
3141
|
-
if (
|
|
3142
|
-
window.WeiyiStatSDK && window.WeiyiStatSDK.submit(
|
|
3149
|
+
if (personData.key && ele.key && !['age'].includes(ele.key)) {
|
|
3150
|
+
window.WeiyiStatSDK && window.WeiyiStatSDK.submit(personData.key + "_" + ele.key);
|
|
3143
3151
|
}
|
|
3144
|
-
this.$emit('change',
|
|
3152
|
+
this.$emit('change', personData, ele);
|
|
3145
3153
|
};
|
|
3146
3154
|
BxtPersonInfo.prototype.validate = function () {
|
|
3147
3155
|
var _this = this;
|
|
@@ -3221,8 +3229,8 @@ var person_infovue_type_script_lang_ts_BxtPersonInfo = (function (_super) {
|
|
|
3221
3229
|
|
|
3222
3230
|
// CONCATENATED MODULE: ./packages/person-info/index.vue?vue&type=script&lang=ts&
|
|
3223
3231
|
/* harmony default export */ var packages_person_infovue_type_script_lang_ts_ = (person_infovue_type_script_lang_ts_);
|
|
3224
|
-
// EXTERNAL MODULE: ./packages/person-info/index.vue?vue&type=style&index=0&id=
|
|
3225
|
-
var
|
|
3232
|
+
// EXTERNAL MODULE: ./packages/person-info/index.vue?vue&type=style&index=0&id=271e5864&prod&lang=postcss&
|
|
3233
|
+
var person_infovue_type_style_index_0_id_271e5864_prod_lang_postcss_ = __webpack_require__(209);
|
|
3226
3234
|
|
|
3227
3235
|
// CONCATENATED MODULE: ./packages/person-info/index.vue
|
|
3228
3236
|
|
|
@@ -4942,1433 +4950,1433 @@ module.exports = function dispatchRequest(config) {
|
|
|
4942
4950
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4943
4951
|
|
|
4944
4952
|
"use strict";
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return initElementValidateRules; });
|
|
4948
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return restrictElementsInInsurance; });
|
|
4949
|
-
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
4950
|
-
/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
|
|
4953
|
+
// ESM COMPAT FLAG
|
|
4954
|
+
__webpack_require__.r(__webpack_exports__);
|
|
4951
4955
|
|
|
4956
|
+
// EXPORTS
|
|
4957
|
+
__webpack_require__.d(__webpack_exports__, "convertEleOrderListToObj", function() { return /* reexport */ planbook["d" /* convertEleOrderListToObj */]; });
|
|
4958
|
+
__webpack_require__.d(__webpack_exports__, "calcTotalBaof", function() { return /* reexport */ planbook["a" /* calcTotalBaof */]; });
|
|
4959
|
+
__webpack_require__.d(__webpack_exports__, "getHuomianPeriodValue", function() { return /* reexport */ planbook["j" /* getHuomianPeriodValue */]; });
|
|
4960
|
+
__webpack_require__.d(__webpack_exports__, "getNumberFromYear", function() { return /* reexport */ planbook["l" /* getNumberFromYear */]; });
|
|
4961
|
+
__webpack_require__.d(__webpack_exports__, "converUnit10000", function() { return /* reexport */ planbook["c" /* converUnit10000 */]; });
|
|
4962
|
+
__webpack_require__.d(__webpack_exports__, "deepCopy", function() { return /* reexport */ planbook["g" /* deepCopy */]; });
|
|
4963
|
+
__webpack_require__.d(__webpack_exports__, "getAgeFromBirth", function() { return /* reexport */ planbook["h" /* getAgeFromBirth */]; });
|
|
4964
|
+
__webpack_require__.d(__webpack_exports__, "initPersonData", function() { return /* reexport */ planbook["o" /* initPersonData */]; });
|
|
4965
|
+
__webpack_require__.d(__webpack_exports__, "personDataHandler", function() { return /* reexport */ planbook["s" /* personDataHandler */]; });
|
|
4966
|
+
__webpack_require__.d(__webpack_exports__, "getInsuredAgeRange", function() { return /* reexport */ planbook["k" /* getInsuredAgeRange */]; });
|
|
4967
|
+
__webpack_require__.d(__webpack_exports__, "setPersonAgeOptions", function() { return /* reexport */ planbook["y" /* setPersonAgeOptions */]; });
|
|
4968
|
+
__webpack_require__.d(__webpack_exports__, "convertPersonData", function() { return /* reexport */ planbook["e" /* convertPersonData */]; });
|
|
4969
|
+
__webpack_require__.d(__webpack_exports__, "initProductData", function() { return /* reexport */ planbook["p" /* initProductData */]; });
|
|
4970
|
+
__webpack_require__.d(__webpack_exports__, "productDataHandler", function() { return /* reexport */ planbook["t" /* productDataHandler */]; });
|
|
4971
|
+
__webpack_require__.d(__webpack_exports__, "getElementVerifyFromProductVerify", function() { return /* reexport */ planbook["i" /* getElementVerifyFromProductVerify */]; });
|
|
4972
|
+
__webpack_require__.d(__webpack_exports__, "setCommonInfo", function() { return /* reexport */ planbook["w" /* setCommonInfo */]; });
|
|
4973
|
+
__webpack_require__.d(__webpack_exports__, "setGroupInsurance", function() { return /* reexport */ planbook["x" /* setGroupInsurance */]; });
|
|
4974
|
+
__webpack_require__.d(__webpack_exports__, "isHideProduct", function() { return /* reexport */ planbook["r" /* isHideProduct */]; });
|
|
4975
|
+
__webpack_require__.d(__webpack_exports__, "verifyProductRules", function() { return /* reexport */ planbook["z" /* verifyProductRules */]; });
|
|
4976
|
+
__webpack_require__.d(__webpack_exports__, "restrictInsurancesInProduct", function() { return /* reexport */ planbook["v" /* restrictInsurancesInProduct */]; });
|
|
4977
|
+
__webpack_require__.d(__webpack_exports__, "convertProductData", function() { return /* reexport */ planbook["f" /* convertProductData */]; });
|
|
4978
|
+
__webpack_require__.d(__webpack_exports__, "clearAddAndTakeAndAdjustBaoeData", function() { return /* reexport */ planbook["b" /* clearAddAndTakeAndAdjustBaoeData */]; });
|
|
4979
|
+
__webpack_require__.d(__webpack_exports__, "initInsuranceData", function() { return /* reexport */ planbook["n" /* initInsuranceData */]; });
|
|
4980
|
+
__webpack_require__.d(__webpack_exports__, "insuranceDataHandler", function() { return /* reexport */ planbook["q" /* insuranceDataHandler */]; });
|
|
4981
|
+
__webpack_require__.d(__webpack_exports__, "initElementValidateRules", function() { return /* reexport */ planbook["m" /* initElementValidateRules */]; });
|
|
4982
|
+
__webpack_require__.d(__webpack_exports__, "restrictElementsInInsurance", function() { return /* reexport */ planbook["u" /* restrictElementsInInsurance */]; });
|
|
4983
|
+
__webpack_require__.d(__webpack_exports__, "getAddress", function() { return /* reexport */ getAddress; });
|
|
4984
|
+
__webpack_require__.d(__webpack_exports__, "getUuid", function() { return /* reexport */ getUuid; });
|
|
4985
|
+
__webpack_require__.d(__webpack_exports__, "hasPlanParams", function() { return /* reexport */ hasPlanParams; });
|
|
4986
|
+
__webpack_require__.d(__webpack_exports__, "insureCalculate", function() { return /* reexport */ insureCalculate; });
|
|
4987
|
+
__webpack_require__.d(__webpack_exports__, "checkInsureCalculate", function() { return /* reexport */ checkInsureCalculate; });
|
|
4988
|
+
__webpack_require__.d(__webpack_exports__, "checkInsureCalculateIn", function() { return /* reexport */ checkInsureCalculateIn; });
|
|
4952
4989
|
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4990
|
+
// EXTERNAL MODULE: ./packages/bxs-utils/planbook/index.ts
|
|
4991
|
+
var planbook = __webpack_require__(12);
|
|
4992
|
+
|
|
4993
|
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
|
|
4994
|
+
var asyncToGenerator = __webpack_require__(30);
|
|
4995
|
+
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
4996
|
+
|
|
4997
|
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/typeof.js
|
|
4998
|
+
var helpers_typeof = __webpack_require__(11);
|
|
4999
|
+
var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof);
|
|
5000
|
+
|
|
5001
|
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js
|
|
5002
|
+
var regenerator = __webpack_require__(17);
|
|
5003
|
+
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
|
|
5004
|
+
|
|
5005
|
+
// EXTERNAL MODULE: ./node_modules/axios/index.js
|
|
5006
|
+
var axios = __webpack_require__(31);
|
|
5007
|
+
var axios_default = /*#__PURE__*/__webpack_require__.n(axios);
|
|
5008
|
+
|
|
5009
|
+
// CONCATENATED MODULE: ./src/js/request.js
|
|
5010
|
+
// import { gotoLogin } from './utils.js'
|
|
5011
|
+
|
|
5012
|
+
var BASE_API = function () {
|
|
5013
|
+
var env = null;
|
|
5014
|
+
|
|
5015
|
+
if (location.hostname.search(/pbf\.winbaoxian\.com/) !== -1) {
|
|
5016
|
+
env = 'https://app.winbaoxian.com';
|
|
5017
|
+
} else if (location.hostname.search(/pbf\.winbaoxian\.cn/) !== -1) {
|
|
5018
|
+
env = 'https://app.winbaoxian.cn';
|
|
5019
|
+
} else if (location.hostname.search(/127\.0\.0\.1|192\.168|localhost/) !== -1) {
|
|
5020
|
+
env = 'https://app.winbaoxian.cn';
|
|
5021
|
+
}
|
|
5022
|
+
|
|
5023
|
+
return env;
|
|
5024
|
+
}(); // 创建axios实例
|
|
5025
|
+
|
|
5026
|
+
|
|
5027
|
+
var service = axios_default.a.create({
|
|
5028
|
+
baseURL: BASE_API,
|
|
5029
|
+
withCredentials: true,
|
|
5030
|
+
timeout: 10000,
|
|
5031
|
+
// 请求超时时间
|
|
5032
|
+
headers: {
|
|
5033
|
+
'X-Requested-With': 'XMLHttpRequest'
|
|
5034
|
+
}
|
|
5035
|
+
});
|
|
5036
|
+
var loadingTimer = null;
|
|
5037
|
+
|
|
5038
|
+
var loading = function loading(show) {
|
|
5039
|
+
if (window.appBridge && appBridge.showLoading) {
|
|
5040
|
+
if (show) {
|
|
5041
|
+
appBridge.showLoading();
|
|
5042
|
+
} else {
|
|
5043
|
+
appBridge.hideLoading();
|
|
4982
5044
|
}
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5045
|
+
}
|
|
5046
|
+
}; // request拦截器
|
|
5047
|
+
|
|
5048
|
+
|
|
5049
|
+
service.interceptors.request.use(function (config) {
|
|
5050
|
+
if (loadingTimer) clearTimeout(loadingTimer);
|
|
5051
|
+
loadingTimer = setTimeout(function () {
|
|
5052
|
+
loading(true);
|
|
5053
|
+
}, 300);
|
|
5054
|
+
return config;
|
|
5055
|
+
}, function (error) {
|
|
5056
|
+
// Do something with request error
|
|
5057
|
+
console.log(error); // for debug
|
|
5058
|
+
|
|
5059
|
+
Promise.reject(error);
|
|
5060
|
+
}); // respone拦截器
|
|
5061
|
+
|
|
5062
|
+
service.interceptors.response.use(function (response) {
|
|
5063
|
+
if (loadingTimer) clearTimeout(loadingTimer);
|
|
5064
|
+
loading(false);
|
|
5065
|
+
var res = response.data;
|
|
5066
|
+
|
|
5067
|
+
if (res.code === 401 || res.status === 401) {
|
|
5068
|
+
// gotoLogin()
|
|
5069
|
+
return Promise.reject('login');
|
|
5070
|
+
}
|
|
5071
|
+
|
|
5072
|
+
return res;
|
|
5073
|
+
}, function (error) {
|
|
5074
|
+
if (loadingTimer) clearTimeout(loadingTimer);
|
|
5075
|
+
loading(false);
|
|
5076
|
+
|
|
5077
|
+
if (error.response && error.response.status == 401) {
|
|
5078
|
+
// gotoLogin()
|
|
5079
|
+
return Promise.reject('login');
|
|
5080
|
+
}
|
|
5081
|
+
|
|
5082
|
+
console.log('err' + error); // for debug
|
|
5083
|
+
|
|
5084
|
+
return Promise.reject(error);
|
|
5085
|
+
});
|
|
5086
|
+
/* harmony default export */ var request = (service);
|
|
5087
|
+
// CONCATENATED MODULE: ./packages/bxs-utils/trade/insureCalculate.js
|
|
5088
|
+
|
|
5089
|
+
|
|
5090
|
+
|
|
5091
|
+
|
|
5092
|
+
/**
|
|
5093
|
+
* @Author: watson
|
|
5094
|
+
* @Date: 2020-12-23
|
|
5095
|
+
* @LastEditors: watson
|
|
5096
|
+
* @description: 保费试算
|
|
5097
|
+
* @param {*} params: 必传
|
|
5098
|
+
* @return {*} 试算结果
|
|
5099
|
+
*/
|
|
5100
|
+
|
|
5101
|
+
|
|
5102
|
+
var baseURL = function () {
|
|
5103
|
+
var env = null;
|
|
5104
|
+
|
|
5105
|
+
if (location.hostname.search(/pbf\.winbaoxian\.com/) !== -1) {
|
|
5106
|
+
env = 'https://insurance2a-api.wyins.net';
|
|
5107
|
+
} else if (location.hostname.search(/pbf\.winbaoxian\.cn/) !== -1) {
|
|
5108
|
+
env = '//insurance2a-api.wyins.net.cn';
|
|
5109
|
+
} else if (location.hostname.search(/127\.0\.0\.1|192\.168|localhost|0\.0\.0\.0/) !== -1) {
|
|
5110
|
+
env = '//insurance2a-api.wyins.net.cn';
|
|
5111
|
+
}
|
|
5112
|
+
|
|
5113
|
+
return env;
|
|
5114
|
+
}();
|
|
5115
|
+
/**
|
|
5116
|
+
* **获取地址信息**
|
|
5117
|
+
* @ignore
|
|
5118
|
+
* @author watson
|
|
5119
|
+
* @date 2022-04-26
|
|
5120
|
+
* @param {string} fetchUrl api url
|
|
5121
|
+
* @param {object} data 接口传参
|
|
5122
|
+
* @returns {object} addressData
|
|
5123
|
+
*/
|
|
5124
|
+
|
|
5125
|
+
|
|
5126
|
+
function getAddress(fetchUrl, data) {
|
|
5127
|
+
return new Promise(function (resolve, reject) {
|
|
5128
|
+
request({
|
|
5129
|
+
baseURL: fetchUrl,
|
|
5130
|
+
url: undefined,
|
|
5131
|
+
method: 'POST',
|
|
5132
|
+
urlParams: undefined,
|
|
5133
|
+
data: data
|
|
5134
|
+
}).then(function (res) {
|
|
5135
|
+
resolve(res);
|
|
5136
|
+
}).catch(function (err) {
|
|
5137
|
+
reject(err);
|
|
5009
5138
|
});
|
|
5139
|
+
});
|
|
5010
5140
|
}
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5141
|
+
/**
|
|
5142
|
+
* **获取用户信息**
|
|
5143
|
+
* @ignore
|
|
5144
|
+
* @author watson
|
|
5145
|
+
* @date 2022-04-26
|
|
5146
|
+
* @param {string} fetchUrl api url
|
|
5147
|
+
* @returns {promise}
|
|
5148
|
+
*/
|
|
5149
|
+
|
|
5150
|
+
function getUuid(fetchUrl) {
|
|
5151
|
+
return new Promise(function (resolve, reject) {
|
|
5152
|
+
request({
|
|
5153
|
+
baseURL: fetchUrl,
|
|
5154
|
+
url: undefined,
|
|
5155
|
+
method: 'GET',
|
|
5156
|
+
urlParams: undefined,
|
|
5157
|
+
data: null
|
|
5158
|
+
}).then(function (res) {
|
|
5159
|
+
resolve(res);
|
|
5160
|
+
}).catch(function (err) {
|
|
5161
|
+
reject(err);
|
|
5023
5162
|
});
|
|
5024
|
-
|
|
5025
|
-
var baoe = insData.eleOrderList.find(function (e) { return e.key === 'baoe'; });
|
|
5026
|
-
var baof = insData.eleOrderList.find(function (e) { return e.key === 'baof'; });
|
|
5027
|
-
var plan = insData.eleOrderList.find(function (e) { return e.key === 'plan'; });
|
|
5028
|
-
if (!calMethod && baoe && plan) {
|
|
5029
|
-
insData.showPlanDesc = !!baoe.isHide;
|
|
5030
|
-
}
|
|
5031
|
-
if (calMethod && baoe && baof) {
|
|
5032
|
-
baoe.isHide = calMethod.value !== 'baoe2baof';
|
|
5033
|
-
baof.isHide = calMethod.value === 'baoe2baof';
|
|
5034
|
-
}
|
|
5035
|
-
return insData;
|
|
5036
|
-
}
|
|
5037
|
-
function initElementValidateRules(ele, productData) {
|
|
5038
|
-
var rules = [];
|
|
5039
|
-
if (['cmCommonInput'].indexOf(String(ele.componentName)) !== -1) {
|
|
5040
|
-
rules = [
|
|
5041
|
-
{
|
|
5042
|
-
required: ele.required !== false,
|
|
5043
|
-
message: "\u8BF7\u8F93\u5165" + (ele.labelName || '') + "\u503C"
|
|
5044
|
-
},
|
|
5045
|
-
{
|
|
5046
|
-
pattern: ele.regExp ? eval(String(ele.regExp)) : /^\d*$/,
|
|
5047
|
-
message: ele.regExpMessage || (ele.regExp ? '输入不合法,请重新输入' : '请输入整数值')
|
|
5048
|
-
}
|
|
5049
|
-
];
|
|
5050
|
-
}
|
|
5051
|
-
var min = 0;
|
|
5052
|
-
var max = 0;
|
|
5053
|
-
if (ele.min && !isNaN(Number(ele.min))) {
|
|
5054
|
-
min = ele.min;
|
|
5055
|
-
}
|
|
5056
|
-
if (ele.max && !isNaN(Number(ele.max))) {
|
|
5057
|
-
max = ele.max;
|
|
5058
|
-
}
|
|
5059
|
-
if (min || max) {
|
|
5060
|
-
var message = '';
|
|
5061
|
-
if (min && max) {
|
|
5062
|
-
message = "\u8BF7\u8F93\u5165" + Object(_common__WEBPACK_IMPORTED_MODULE_1__[/* converUnit10000 */ "b"])(min) + "~" + Object(_common__WEBPACK_IMPORTED_MODULE_1__[/* converUnit10000 */ "b"])(max) + "\u4E4B\u95F4\u7684\u6570\u503C";
|
|
5063
|
-
}
|
|
5064
|
-
else if (!min) {
|
|
5065
|
-
message = "\u8BF7\u8F93\u5165\u4E0D\u5927\u4E8E" + Object(_common__WEBPACK_IMPORTED_MODULE_1__[/* converUnit10000 */ "b"])(max) + "\u7684\u6570\u503C";
|
|
5066
|
-
}
|
|
5067
|
-
else if (!max) {
|
|
5068
|
-
message = "\u8BF7\u8F93\u5165\u4E0D\u5C0F\u4E8E" + Object(_common__WEBPACK_IMPORTED_MODULE_1__[/* converUnit10000 */ "b"])(min) + "\u7684\u6570\u503C";
|
|
5069
|
-
}
|
|
5070
|
-
rules.push({
|
|
5071
|
-
type: 'number',
|
|
5072
|
-
min: min || -Infinity,
|
|
5073
|
-
max: max || Infinity,
|
|
5074
|
-
message: message,
|
|
5075
|
-
validator: function (rule, value) {
|
|
5076
|
-
return !value || (value >= rule.min && value <= rule.max);
|
|
5077
|
-
}
|
|
5078
|
-
});
|
|
5079
|
-
}
|
|
5080
|
-
if (ele.multi && !isNaN(Number(ele.multi))) {
|
|
5081
|
-
rules.push({
|
|
5082
|
-
multiple: ele.multi,
|
|
5083
|
-
message: "\u8BF7\u8F93\u5165" + ele.multi + "\u500D\u6570",
|
|
5084
|
-
validator: function (rule, value) {
|
|
5085
|
-
return !value || !(value % rule.multiple);
|
|
5086
|
-
}
|
|
5087
|
-
});
|
|
5088
|
-
}
|
|
5089
|
-
if (ele.compareItem &&
|
|
5090
|
-
ele.compareItem.length &&
|
|
5091
|
-
ele.compareItem.length >= 3 &&
|
|
5092
|
-
productData &&
|
|
5093
|
-
productData.mulInsOrderList) {
|
|
5094
|
-
var item1_1 = ele.compareItem[0].match(/(.{1,})\.(.{1,})/);
|
|
5095
|
-
var item2_1 = ele.compareItem[2].match(/(.{1,})\.(.{1,})/);
|
|
5096
|
-
var insurance1 = void 0, insurance2 = void 0, insTitle1 = void 0, insTitle2 = void 0, itemValue1 = void 0, itemValue2 = void 0;
|
|
5097
|
-
if (item1_1 && item2_1) {
|
|
5098
|
-
insurance1 = productData.mulInsOrderList.find(function (ins) { return ins.key + '' === item1_1[1]; });
|
|
5099
|
-
insurance2 = productData.mulInsOrderList.find(function (ins) { return ins.key + '' === item2_1[1]; });
|
|
5100
|
-
}
|
|
5101
|
-
if (insurance1 && insurance1.eleOrderList) {
|
|
5102
|
-
insTitle1 = insurance1.eleOrderList.find(function (e) { return e.key === 'title'; });
|
|
5103
|
-
if (insTitle1 && insTitle1.value) {
|
|
5104
|
-
itemValue1 = insurance1.eleOrderList.find(function (e) { return e.key === item1_1[2]; });
|
|
5105
|
-
}
|
|
5106
|
-
}
|
|
5107
|
-
if (insurance2 && insurance2.eleOrderList) {
|
|
5108
|
-
insTitle2 = insurance2.eleOrderList.find(function (e) { return e.key === 'title'; });
|
|
5109
|
-
if (insTitle2 && insTitle2.value) {
|
|
5110
|
-
itemValue2 = insurance2.eleOrderList.find(function (e) { return e.key === item2_1[2]; });
|
|
5111
|
-
}
|
|
5112
|
-
}
|
|
5113
|
-
if (itemValue1 && itemValue1.value && itemValue2 && itemValue2.value && ele.compareItem[1]) {
|
|
5114
|
-
rules.push({
|
|
5115
|
-
value1: itemValue1.value,
|
|
5116
|
-
value2: itemValue2.value,
|
|
5117
|
-
operator: ele.compareItem[1],
|
|
5118
|
-
message: ele.compareItem[3] || '数据输入有误',
|
|
5119
|
-
validator: function (rule) {
|
|
5120
|
-
var bool = false;
|
|
5121
|
-
var value1 = rule.value1;
|
|
5122
|
-
var value2 = rule.value2;
|
|
5123
|
-
var operator = rule.operator;
|
|
5124
|
-
switch (operator) {
|
|
5125
|
-
case '<=':
|
|
5126
|
-
bool = value1 <= value2;
|
|
5127
|
-
break;
|
|
5128
|
-
case '>=':
|
|
5129
|
-
bool = value1 >= value2;
|
|
5130
|
-
break;
|
|
5131
|
-
case '<':
|
|
5132
|
-
bool = value1 < value2;
|
|
5133
|
-
break;
|
|
5134
|
-
case '>':
|
|
5135
|
-
bool = value1 > value2;
|
|
5136
|
-
break;
|
|
5137
|
-
default:
|
|
5138
|
-
bool = value1 <= value2;
|
|
5139
|
-
}
|
|
5140
|
-
return bool;
|
|
5141
|
-
}
|
|
5142
|
-
});
|
|
5143
|
-
}
|
|
5144
|
-
}
|
|
5145
|
-
return rules;
|
|
5146
|
-
}
|
|
5147
|
-
function restrictElementsInInsurance(_a) {
|
|
5148
|
-
var personOrderList = _a.personOrderList, insData = _a.insData, eleData = _a.eleData;
|
|
5149
|
-
var errorMsg = '';
|
|
5150
|
-
if (insData && eleData && eleData.restrictions) {
|
|
5151
|
-
var insuredInfo = personOrderList && personOrderList.find(function (p) { return p.key === 'insuredInfo'; });
|
|
5152
|
-
var insuranceInfo = Object(_common__WEBPACK_IMPORTED_MODULE_1__[/* convertEleOrderListToObj */ "c"])(insData);
|
|
5153
|
-
var verifyData_1;
|
|
5154
|
-
if (insuredInfo) {
|
|
5155
|
-
verifyData_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({ sex: insuredInfo.sex, age: insuredInfo.age }, insuranceInfo);
|
|
5156
|
-
}
|
|
5157
|
-
var eleRestricts = eleData.restrictions.filter(function (restrict) {
|
|
5158
|
-
return Object.keys(restrict).every(function (ele) {
|
|
5159
|
-
return ((ele === 'age' &&
|
|
5160
|
-
verifyData_1[ele] &&
|
|
5161
|
-
verifyData_1[ele] >= restrict[ele][0] &&
|
|
5162
|
-
verifyData_1[ele] <= restrict[ele][1]) ||
|
|
5163
|
-
ele === eleData.key ||
|
|
5164
|
-
((restrict[ele].constructor === String || restrict[ele].constructor === Number) &&
|
|
5165
|
-
verifyData_1[ele] == restrict[ele]) ||
|
|
5166
|
-
(restrict[ele].constructor === Array && restrict[ele].find(function (r) { return r == verifyData_1[ele]; })));
|
|
5167
|
-
});
|
|
5168
|
-
});
|
|
5169
|
-
var valRange_1 = eleRestricts && eleRestricts[0] && eleRestricts[0][eleData.key];
|
|
5170
|
-
if (valRange_1 && valRange_1.length) {
|
|
5171
|
-
if (eleData.opts) {
|
|
5172
|
-
eleData.opts.forEach(function (o) {
|
|
5173
|
-
if (!valRange_1.find(function (v) { return v.val === o.val; })) {
|
|
5174
|
-
o.isInvalid = true;
|
|
5175
|
-
}
|
|
5176
|
-
});
|
|
5177
|
-
if (!eleData.opts.find(function (opt) { return !opt.isHide && !opt.isDisabled && !opt.isInvalid && opt.val == eleData.value; })) {
|
|
5178
|
-
var opt = eleData.opts.find(function (o) { return o.val == eleData.value; });
|
|
5179
|
-
errorMsg = "\u5F53\u524D\u6761\u4EF6\u4E0B, \u6CA1\u6709" + eleData.labelName + (opt ? opt.desc : '') + "\u9009\u9879, \u5DF2\u81EA\u52A8\u5207\u6362";
|
|
5180
|
-
}
|
|
5181
|
-
}
|
|
5182
|
-
else if (valRange_1[0] || valRange_1[1]) {
|
|
5183
|
-
var rangeMsg = "\u5F53\u524D\u6761\u4EF6\u4E0B, " + insData.name + "\u7684" + eleData.labelName + "\u503C";
|
|
5184
|
-
var minMsg = "\u4E0D\u5F97\u5C0F\u4E8E" + Object(_common__WEBPACK_IMPORTED_MODULE_1__[/* converUnit10000 */ "b"])(valRange_1[0]);
|
|
5185
|
-
var maxMsg = "\u4E0D\u5F97\u5927\u4E8E" + Object(_common__WEBPACK_IMPORTED_MODULE_1__[/* converUnit10000 */ "b"])(valRange_1[1]);
|
|
5186
|
-
if (valRange_1[0] && valRange_1[1] && (eleData.value < valRange_1[0] || eleData.value > valRange_1[1])) {
|
|
5187
|
-
errorMsg = "" + rangeMsg + minMsg + "\u4E14" + maxMsg;
|
|
5188
|
-
}
|
|
5189
|
-
else if (valRange_1[0] && eleData.value < valRange_1[0]) {
|
|
5190
|
-
errorMsg = "" + rangeMsg + minMsg;
|
|
5191
|
-
}
|
|
5192
|
-
else if (valRange_1[1] && eleData.value > valRange_1[1]) {
|
|
5193
|
-
errorMsg = "" + rangeMsg + maxMsg;
|
|
5194
|
-
}
|
|
5195
|
-
}
|
|
5196
|
-
}
|
|
5197
|
-
}
|
|
5198
|
-
return errorMsg;
|
|
5163
|
+
});
|
|
5199
5164
|
}
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
/***/ }),
|
|
5203
|
-
|
|
5204
|
-
/***/ 60:
|
|
5205
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
5206
|
-
|
|
5207
|
-
"use strict";
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
var utils = __webpack_require__(5);
|
|
5211
|
-
|
|
5212
5165
|
/**
|
|
5213
|
-
*
|
|
5214
|
-
*
|
|
5215
|
-
* @
|
|
5216
|
-
* @
|
|
5217
|
-
* @param {
|
|
5218
|
-
* @
|
|
5166
|
+
* **计划书初始化参数**
|
|
5167
|
+
* @ignore
|
|
5168
|
+
* @author watson
|
|
5169
|
+
* @date 2022-04-26
|
|
5170
|
+
* @param {any} planParams 计划书初始化参数
|
|
5171
|
+
* @param {any} planParams.detail_age 被保人生日
|
|
5172
|
+
* @param {any} planParams.detail_sex 被保人性别
|
|
5173
|
+
* @param {any} planParams.detail_relation 投被保人关系
|
|
5174
|
+
* @param {any} planParams.detail_applicant_age 投保人生日
|
|
5175
|
+
* @param {any} planParams.detail_applicant_sex 投保人性别
|
|
5176
|
+
* @returns {boolean} 是否有计划书参数
|
|
5219
5177
|
*/
|
|
5220
|
-
module.exports = function transformData(data, headers, fns) {
|
|
5221
|
-
/*eslint no-param-reassign:0*/
|
|
5222
|
-
utils.forEach(fns, function transform(fn) {
|
|
5223
|
-
data = fn(data, headers);
|
|
5224
|
-
});
|
|
5225
|
-
|
|
5226
|
-
return data;
|
|
5227
|
-
};
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
/***/ }),
|
|
5231
5178
|
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
// shim for using process in browser
|
|
5236
|
-
var process = module.exports = {};
|
|
5237
|
-
|
|
5238
|
-
// cached from whatever global is present so that test runners that stub it
|
|
5239
|
-
// don't break things. But we need to wrap it in a try catch in case it is
|
|
5240
|
-
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
|
5241
|
-
// function because try/catches deoptimize in certain engines.
|
|
5179
|
+
function hasPlanParams(planParams) {
|
|
5180
|
+
var type = false;
|
|
5242
5181
|
|
|
5243
|
-
|
|
5244
|
-
|
|
5182
|
+
if (planParams && (planParams.detail_age || planParams.detail_sex || planParams.detail_relation || planParams.detail_applicant_age || planParams.detail_applicant_sex)) {
|
|
5183
|
+
type = true;
|
|
5184
|
+
}
|
|
5245
5185
|
|
|
5246
|
-
|
|
5247
|
-
throw new Error('setTimeout has not been defined');
|
|
5248
|
-
}
|
|
5249
|
-
function defaultClearTimeout () {
|
|
5250
|
-
throw new Error('clearTimeout has not been defined');
|
|
5186
|
+
return type;
|
|
5251
5187
|
}
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
try {
|
|
5263
|
-
if (typeof clearTimeout === 'function') {
|
|
5264
|
-
cachedClearTimeout = clearTimeout;
|
|
5265
|
-
} else {
|
|
5266
|
-
cachedClearTimeout = defaultClearTimeout;
|
|
5267
|
-
}
|
|
5268
|
-
} catch (e) {
|
|
5269
|
-
cachedClearTimeout = defaultClearTimeout;
|
|
5270
|
-
}
|
|
5271
|
-
} ())
|
|
5272
|
-
function runTimeout(fun) {
|
|
5273
|
-
if (cachedSetTimeout === setTimeout) {
|
|
5274
|
-
//normal enviroments in sane situations
|
|
5275
|
-
return setTimeout(fun, 0);
|
|
5276
|
-
}
|
|
5277
|
-
// if setTimeout wasn't available but was latter defined
|
|
5278
|
-
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
5279
|
-
cachedSetTimeout = setTimeout;
|
|
5280
|
-
return setTimeout(fun, 0);
|
|
5281
|
-
}
|
|
5282
|
-
try {
|
|
5283
|
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
5284
|
-
return cachedSetTimeout(fun, 0);
|
|
5285
|
-
} catch(e){
|
|
5286
|
-
try {
|
|
5287
|
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
5288
|
-
return cachedSetTimeout.call(null, fun, 0);
|
|
5289
|
-
} catch(e){
|
|
5290
|
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
|
5291
|
-
return cachedSetTimeout.call(this, fun, 0);
|
|
5292
|
-
}
|
|
5293
|
-
}
|
|
5188
|
+
/**
|
|
5189
|
+
* **转换计划书数据**
|
|
5190
|
+
* @ignore
|
|
5191
|
+
* @author watson
|
|
5192
|
+
* @date 2022-04-26
|
|
5193
|
+
* @param {array} widgets 页面渲染数据
|
|
5194
|
+
* @param {object} currentData 试算参数
|
|
5195
|
+
* @param {object} planParams 计划书初始化参数
|
|
5196
|
+
* @returns {void}
|
|
5197
|
+
*/
|
|
5294
5198
|
|
|
5199
|
+
function translatePlanData(widgets, currentData, planParams) {
|
|
5200
|
+
widgets.forEach(function (item) {
|
|
5201
|
+
var current; // 增加current字段,保存current_data的数据
|
|
5295
5202
|
|
|
5296
|
-
|
|
5297
|
-
function
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
cachedClearTimeout = clearTimeout;
|
|
5305
|
-
return clearTimeout(marker);
|
|
5306
|
-
}
|
|
5307
|
-
try {
|
|
5308
|
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
5309
|
-
return cachedClearTimeout(marker);
|
|
5310
|
-
} catch (e){
|
|
5311
|
-
try {
|
|
5312
|
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
5313
|
-
return cachedClearTimeout.call(null, marker);
|
|
5314
|
-
} catch (e){
|
|
5315
|
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
|
5316
|
-
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
5317
|
-
return cachedClearTimeout.call(this, marker);
|
|
5318
|
-
}
|
|
5203
|
+
if (item.duty) {
|
|
5204
|
+
current = currentData.find(function (it) {
|
|
5205
|
+
return it.k === item.key && it.risk === item.riskCode && item.duty === it.d;
|
|
5206
|
+
});
|
|
5207
|
+
} else {
|
|
5208
|
+
current = currentData.find(function (it) {
|
|
5209
|
+
return it.k === item.key && it.risk === item.riskCode;
|
|
5210
|
+
});
|
|
5319
5211
|
}
|
|
5320
5212
|
|
|
5213
|
+
if (planParams) {
|
|
5214
|
+
// 被保人生日 / 年龄
|
|
5215
|
+
if (planParams.detail_age && item.key === 'detail_age') {
|
|
5216
|
+
if (/-/.test(planParams.detail_age)) {
|
|
5217
|
+
// 被保人生日
|
|
5218
|
+
item.type = 'v-text';
|
|
5219
|
+
item.name = planParams.detail_age;
|
|
5220
|
+
current.v = planParams.detail_age;
|
|
5221
|
+
} else if (/岁/.test(planParams.detail_age)) {
|
|
5222
|
+
// 被保人年龄
|
|
5223
|
+
item.type = 'v-text';
|
|
5224
|
+
item.name = planParams.detail_age;
|
|
5225
|
+
item.label = item.label + '(年龄)';
|
|
5226
|
+
current.v = planParams.detail_age.replace('周', '').replace('岁', '').replace('Y', '') + 'Y';
|
|
5227
|
+
}
|
|
5228
|
+
} // 被保人性别
|
|
5321
5229
|
|
|
5322
5230
|
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5231
|
+
if (planParams.detail_sex && item.key === 'detail_sex') {
|
|
5232
|
+
item.type = 'v-text';
|
|
5233
|
+
item.name = planParams.detail_sex === '1' ? '男' : '女';
|
|
5234
|
+
current.v = planParams.detail_sex;
|
|
5235
|
+
} // 投被保人关系
|
|
5236
|
+
// 初始化
|
|
5237
|
+
// if (
|
|
5238
|
+
// item.key === 'detail_relation' &&
|
|
5239
|
+
// planParams.detail_sex &&
|
|
5240
|
+
// planParams.detail_applicant_sex &&
|
|
5241
|
+
// String(planParams.detail_sex) ===
|
|
5242
|
+
// String(planParams.detail_applicant_sex)
|
|
5243
|
+
// ) {
|
|
5244
|
+
// let otemp = [];
|
|
5245
|
+
// item.opts[item.key].forEach(i => {
|
|
5246
|
+
// if (
|
|
5247
|
+
// String(planParams.detail_sex) === '1' &&
|
|
5248
|
+
// String(planParams.detail_applicant_sex) === '1'
|
|
5249
|
+
// ) {
|
|
5250
|
+
// // 投被保人 - 男 1
|
|
5251
|
+
// if (['1', '14', '16', '18'].includes(String(i.value))) {
|
|
5252
|
+
// otemp.push(i);
|
|
5253
|
+
// }
|
|
5254
|
+
// } else if (
|
|
5255
|
+
// String(planParams.detail_sex) === '2' &&
|
|
5256
|
+
// String(planParams.detail_applicant_sex) === '2'
|
|
5257
|
+
// ) {
|
|
5258
|
+
// // 投被保人 - 女 2
|
|
5259
|
+
// if (['1', '15', '17', '19'].includes(String(i.value))) {
|
|
5260
|
+
// otemp.push(i);
|
|
5261
|
+
// }
|
|
5262
|
+
// }
|
|
5263
|
+
// });
|
|
5264
|
+
// item.opts[item.key] = otemp;
|
|
5265
|
+
// console.log('otemp', otemp);
|
|
5266
|
+
// }
|
|
5328
5267
|
|
|
5329
|
-
function cleanUpNextTick() {
|
|
5330
|
-
if (!draining || !currentQueue) {
|
|
5331
|
-
return;
|
|
5332
|
-
}
|
|
5333
|
-
draining = false;
|
|
5334
|
-
if (currentQueue.length) {
|
|
5335
|
-
queue = currentQueue.concat(queue);
|
|
5336
|
-
} else {
|
|
5337
|
-
queueIndex = -1;
|
|
5338
|
-
}
|
|
5339
|
-
if (queue.length) {
|
|
5340
|
-
drainQueue();
|
|
5341
|
-
}
|
|
5342
|
-
}
|
|
5343
5268
|
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5269
|
+
if (planParams.detail_relation && item.key === 'detail_relation') {
|
|
5270
|
+
// 条件检索
|
|
5271
|
+
if (planParams.detail_relation === '-1' || planParams.detail_relation === -1) {
|
|
5272
|
+
// 非本人
|
|
5273
|
+
var temp = [];
|
|
5274
|
+
item.opts[item.key].forEach(function (i) {
|
|
5275
|
+
if (String(i.value) != '1') {
|
|
5276
|
+
temp.push(i);
|
|
5277
|
+
}
|
|
5278
|
+
});
|
|
5279
|
+
item.name = temp[0] && temp[0].name ? temp[0].name : '';
|
|
5280
|
+
item.opts[item.key] = temp;
|
|
5281
|
+
} else if (planParams.detail_relation) {
|
|
5282
|
+
// 指定人 - 本人 其他人
|
|
5283
|
+
item.type = 'v-text';
|
|
5284
|
+
current.v = planParams.detail_relation;
|
|
5285
|
+
var _temp = [];
|
|
5286
|
+
item.opts[item.key].forEach(function (i) {
|
|
5287
|
+
if (String(i.value) === String(planParams.detail_relation)) {
|
|
5288
|
+
_temp.push(i);
|
|
5350
5289
|
|
|
5351
|
-
|
|
5352
|
-
while(len) {
|
|
5353
|
-
currentQueue = queue;
|
|
5354
|
-
queue = [];
|
|
5355
|
-
while (++queueIndex < len) {
|
|
5356
|
-
if (currentQueue) {
|
|
5357
|
-
currentQueue[queueIndex].run();
|
|
5290
|
+
item.name = i.name;
|
|
5358
5291
|
}
|
|
5292
|
+
});
|
|
5293
|
+
item.opts[item.key] = _temp;
|
|
5359
5294
|
}
|
|
5360
|
-
|
|
5361
|
-
len = queue.length;
|
|
5362
|
-
}
|
|
5363
|
-
currentQueue = null;
|
|
5364
|
-
draining = false;
|
|
5365
|
-
runClearTimeout(timeout);
|
|
5366
|
-
}
|
|
5295
|
+
} // 投保人出生日期
|
|
5367
5296
|
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5297
|
+
|
|
5298
|
+
if (planParams.detail_applicant_age && item.key === 'detail_applicant_age') {
|
|
5299
|
+
if (/-/.test(planParams.detail_applicant_age)) {
|
|
5300
|
+
// 被保人生日
|
|
5301
|
+
item.type = 'v-text';
|
|
5302
|
+
item.name = planParams.detail_applicant_age;
|
|
5303
|
+
current.v = planParams.detail_applicant_age;
|
|
5304
|
+
} else if (/岁/.test(planParams.detail_applicant_age)) {
|
|
5305
|
+
// 被保人年龄
|
|
5306
|
+
item.type = 'v-text';
|
|
5307
|
+
item.name = planParams.detail_applicant_age;
|
|
5308
|
+
item.label = item.label + '(年龄)';
|
|
5309
|
+
current.v = planParams.detail_applicant_age.replace('周', '').replace('岁', '').replace('Y', '') + 'Y';
|
|
5373
5310
|
}
|
|
5374
|
-
|
|
5375
|
-
queue.push(new Item(fun, args));
|
|
5376
|
-
if (queue.length === 1 && !draining) {
|
|
5377
|
-
runTimeout(drainQueue);
|
|
5378
|
-
}
|
|
5379
|
-
};
|
|
5311
|
+
} // 投保人性别
|
|
5380
5312
|
|
|
5381
|
-
// v8 likes predictible objects
|
|
5382
|
-
function Item(fun, array) {
|
|
5383
|
-
this.fun = fun;
|
|
5384
|
-
this.array = array;
|
|
5385
|
-
}
|
|
5386
|
-
Item.prototype.run = function () {
|
|
5387
|
-
this.fun.apply(null, this.array);
|
|
5388
|
-
};
|
|
5389
|
-
process.title = 'browser';
|
|
5390
|
-
process.browser = true;
|
|
5391
|
-
process.env = {};
|
|
5392
|
-
process.argv = [];
|
|
5393
|
-
process.version = ''; // empty string to avoid regexp issues
|
|
5394
|
-
process.versions = {};
|
|
5395
5313
|
|
|
5396
|
-
|
|
5314
|
+
if (planParams.detail_applicant_sex && item.key === 'detail_applicant_sex') {
|
|
5315
|
+
item.type = 'v-text';
|
|
5316
|
+
item.name = planParams.detail_applicant_sex === '1' ? '男' : '女';
|
|
5317
|
+
current.v = planParams.detail_applicant_sex;
|
|
5318
|
+
}
|
|
5319
|
+
}
|
|
5320
|
+
});
|
|
5321
|
+
}
|
|
5322
|
+
/**
|
|
5323
|
+
* **试算参数转化**
|
|
5324
|
+
* @ignore
|
|
5325
|
+
* @author watson
|
|
5326
|
+
* @date 2022-04-26
|
|
5327
|
+
* @param {object} currentData
|
|
5328
|
+
* @param {object} planParams
|
|
5329
|
+
* @returns {object}
|
|
5330
|
+
*/
|
|
5397
5331
|
|
|
5398
|
-
process.on = noop;
|
|
5399
|
-
process.addListener = noop;
|
|
5400
|
-
process.once = noop;
|
|
5401
|
-
process.off = noop;
|
|
5402
|
-
process.removeListener = noop;
|
|
5403
|
-
process.removeAllListeners = noop;
|
|
5404
|
-
process.emit = noop;
|
|
5405
|
-
process.prependListener = noop;
|
|
5406
|
-
process.prependOnceListener = noop;
|
|
5407
5332
|
|
|
5408
|
-
|
|
5333
|
+
function tranlateCurrentData(currentData, planParams) {
|
|
5334
|
+
var currentDataCopy = JSON.parse(JSON.stringify(currentData));
|
|
5335
|
+
currentDataCopy.forEach(function (item) {
|
|
5336
|
+
var current = item;
|
|
5409
5337
|
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5338
|
+
if (planParams) {
|
|
5339
|
+
if (planParams.detail_age && item.k === 'detail_age') {
|
|
5340
|
+
if (/-/.test(planParams.detail_age)) {
|
|
5341
|
+
// 被保人生日
|
|
5342
|
+
current.v = planParams.detail_age;
|
|
5343
|
+
} else if (/岁/.test(planParams.detail_age)) {
|
|
5344
|
+
// 被保人年龄
|
|
5345
|
+
current.v = planParams.detail_age.replace('周', '').replace('岁', '').replace('Y', '') + 'Y';
|
|
5346
|
+
}
|
|
5347
|
+
} // 被保人性别
|
|
5413
5348
|
|
|
5414
|
-
process.cwd = function () { return '/' };
|
|
5415
|
-
process.chdir = function (dir) {
|
|
5416
|
-
throw new Error('process.chdir is not supported');
|
|
5417
|
-
};
|
|
5418
|
-
process.umask = function() { return 0; };
|
|
5419
5349
|
|
|
5350
|
+
if (planParams.detail_sex && item.k === 'detail_sex') {
|
|
5351
|
+
current.v = planParams.detail_sex;
|
|
5352
|
+
} // 投被保人关系
|
|
5420
5353
|
|
|
5421
|
-
/***/ }),
|
|
5422
5354
|
|
|
5423
|
-
|
|
5424
|
-
|
|
5355
|
+
if (planParams.detail_relation && item.k === 'detail_relation') {
|
|
5356
|
+
if (planParams.detail_relation != -1 || planParams.detail_relation != '-1') {
|
|
5357
|
+
current.v = planParams.detail_relation;
|
|
5358
|
+
}
|
|
5359
|
+
} // 投保人出生日期
|
|
5425
5360
|
|
|
5426
|
-
"use strict";
|
|
5427
5361
|
|
|
5362
|
+
if (planParams.detail_applicant_age && item.k === 'detail_applicant_age') {
|
|
5363
|
+
if (/-/.test(planParams.detail_applicant_age)) {
|
|
5364
|
+
// 被保人生日
|
|
5365
|
+
current.v = planParams.detail_applicant_age;
|
|
5366
|
+
} else if (/岁/.test(planParams.detail_applicant_age)) {
|
|
5367
|
+
// 被保人年龄
|
|
5368
|
+
current.v = planParams.detail_applicant_age.replace('周', '').replace('岁', '').replace('Y', '') + 'Y';
|
|
5369
|
+
}
|
|
5370
|
+
} // 投保人性别
|
|
5428
5371
|
|
|
5429
|
-
var utils = __webpack_require__(5);
|
|
5430
5372
|
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
headers[normalizedName] = value;
|
|
5435
|
-
delete headers[name];
|
|
5373
|
+
if (planParams.detail_applicant_sex && item.k === 'detail_applicant_sex') {
|
|
5374
|
+
current.v = planParams.detail_applicant_sex;
|
|
5375
|
+
}
|
|
5436
5376
|
}
|
|
5437
5377
|
});
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
/***/ }),
|
|
5442
|
-
|
|
5443
|
-
/***/ 63:
|
|
5444
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
5445
|
-
|
|
5446
|
-
"use strict";
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
var createError = __webpack_require__(27);
|
|
5450
|
-
|
|
5378
|
+
return currentDataCopy;
|
|
5379
|
+
}
|
|
5451
5380
|
/**
|
|
5452
|
-
*
|
|
5453
|
-
*
|
|
5454
|
-
* @
|
|
5455
|
-
* @param {
|
|
5456
|
-
* @param {object}
|
|
5381
|
+
* 险种计算
|
|
5382
|
+
* @author watson
|
|
5383
|
+
* @date 2022-04-26
|
|
5384
|
+
* @param {object} urlParams 接口URL上面的参数,c端必传uuid
|
|
5385
|
+
* @param {object} postParams 试算用的参数,product_id, current_data 和 scenario: 'h5Widget'
|
|
5386
|
+
* @param {object} planParams 计划书初始化参数
|
|
5387
|
+
* @returns {promise} 试算结果
|
|
5457
5388
|
*/
|
|
5458
|
-
module.exports = function settle(resolve, reject, response) {
|
|
5459
|
-
var validateStatus = response.config.validateStatus;
|
|
5460
|
-
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
5461
|
-
resolve(response);
|
|
5462
|
-
} else {
|
|
5463
|
-
reject(createError(
|
|
5464
|
-
'Request failed with status code ' + response.status,
|
|
5465
|
-
response.config,
|
|
5466
|
-
null,
|
|
5467
|
-
response.request,
|
|
5468
|
-
response
|
|
5469
|
-
));
|
|
5470
|
-
}
|
|
5471
|
-
};
|
|
5472
|
-
|
|
5473
5389
|
|
|
5474
|
-
/***/ }),
|
|
5475
5390
|
|
|
5476
|
-
|
|
5477
|
-
|
|
5391
|
+
function insureCalculate(urlParams, postParams, planParams) {
|
|
5392
|
+
if (!postParams || typeof_default()(postParams) !== 'object' || !postParams.product_id) {
|
|
5393
|
+
return postParams;
|
|
5394
|
+
}
|
|
5478
5395
|
|
|
5479
|
-
|
|
5396
|
+
if (postParams && !postParams.scenario) {
|
|
5397
|
+
postParams.scenario = 'h5Widget';
|
|
5398
|
+
}
|
|
5480
5399
|
|
|
5400
|
+
var url = '/api/product/data/calculate';
|
|
5481
5401
|
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
* @param {Object} config The config.
|
|
5487
|
-
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
5488
|
-
* @param {Object} [request] The request.
|
|
5489
|
-
* @param {Object} [response] The response.
|
|
5490
|
-
* @returns {Error} The error.
|
|
5491
|
-
*/
|
|
5492
|
-
module.exports = function enhanceError(error, config, code, request, response) {
|
|
5493
|
-
error.config = config;
|
|
5494
|
-
if (code) {
|
|
5495
|
-
error.code = code;
|
|
5402
|
+
if (urlParams && urlParams.uuid) {
|
|
5403
|
+
url += "?userUuid=".concat(urlParams.uuid);
|
|
5404
|
+
} else if (urlParams && urlParams.openId) {
|
|
5405
|
+
url += "?userUuid=".concat(urlParams.openId);
|
|
5496
5406
|
}
|
|
5497
5407
|
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5408
|
+
if (urlParams && urlParams.appid) {
|
|
5409
|
+
if (url.indexOf('?') > -1) {
|
|
5410
|
+
url += "&appId=".concat(urlParams.appid);
|
|
5411
|
+
} else {
|
|
5412
|
+
url += "?appId=".concat(urlParams.appid);
|
|
5413
|
+
}
|
|
5414
|
+
}
|
|
5501
5415
|
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
message: this.message,
|
|
5506
|
-
name: this.name,
|
|
5507
|
-
// Microsoft
|
|
5508
|
-
description: this.description,
|
|
5509
|
-
number: this.number,
|
|
5510
|
-
// Mozilla
|
|
5511
|
-
fileName: this.fileName,
|
|
5512
|
-
lineNumber: this.lineNumber,
|
|
5513
|
-
columnNumber: this.columnNumber,
|
|
5514
|
-
stack: this.stack,
|
|
5515
|
-
// Axios
|
|
5516
|
-
config: this.config,
|
|
5517
|
-
code: this.code
|
|
5518
|
-
};
|
|
5519
|
-
};
|
|
5520
|
-
return error;
|
|
5521
|
-
};
|
|
5416
|
+
if (hasPlanParams(planParams) && postParams.current_data) {
|
|
5417
|
+
postParams.current_data = tranlateCurrentData(postParams.current_data, planParams);
|
|
5418
|
+
}
|
|
5522
5419
|
|
|
5420
|
+
return new Promise(function (resolve, reject) {
|
|
5421
|
+
request({
|
|
5422
|
+
baseURL: baseURL,
|
|
5423
|
+
url: url,
|
|
5424
|
+
method: 'POST',
|
|
5425
|
+
urlParams: urlParams,
|
|
5426
|
+
data: postParams
|
|
5427
|
+
}).then(function (res) {
|
|
5428
|
+
if (res.code === 200) {
|
|
5429
|
+
var data = JSON.parse(JSON.stringify(res.data));
|
|
5523
5430
|
|
|
5524
|
-
|
|
5431
|
+
if (hasPlanParams(planParams)) {
|
|
5432
|
+
var widgets = data.widgets;
|
|
5433
|
+
var currentData = data.current_data;
|
|
5434
|
+
translatePlanData(widgets, currentData, planParams);
|
|
5435
|
+
}
|
|
5525
5436
|
|
|
5526
|
-
|
|
5527
|
-
|
|
5437
|
+
var cData = {
|
|
5438
|
+
widgets: data.widgets,
|
|
5439
|
+
total_premium: data.total_premium,
|
|
5440
|
+
terms: data.terms,
|
|
5441
|
+
product_id: data.product_id,
|
|
5442
|
+
current_data: data.current_data,
|
|
5443
|
+
risk_premiums: data.risk_premiums
|
|
5444
|
+
};
|
|
5445
|
+
resolve({
|
|
5446
|
+
code: 200,
|
|
5447
|
+
data: cData
|
|
5448
|
+
});
|
|
5449
|
+
} else {
|
|
5450
|
+
reject(res);
|
|
5451
|
+
}
|
|
5452
|
+
}).catch(function (err) {
|
|
5453
|
+
reject(err);
|
|
5454
|
+
});
|
|
5455
|
+
});
|
|
5456
|
+
}
|
|
5457
|
+
/**
|
|
5458
|
+
* **检查险种计算**
|
|
5459
|
+
* @author watson
|
|
5460
|
+
* @date 2022-04-26
|
|
5461
|
+
* @param {object} urlParams 接口URL上面的参数,c端必传uuid
|
|
5462
|
+
* @param {object} postParams 试算用的参数,product_id, current_data 和 scenario: 'h5Widget'
|
|
5463
|
+
* @param {object} planParams 计划书初始化参数
|
|
5464
|
+
* @returns {promise} 试算结果
|
|
5465
|
+
*/
|
|
5528
5466
|
|
|
5529
|
-
|
|
5467
|
+
function checkInsureCalculate(_x, _x2, _x3) {
|
|
5468
|
+
return _checkInsureCalculate.apply(this, arguments);
|
|
5469
|
+
}
|
|
5470
|
+
/**
|
|
5471
|
+
* 描述
|
|
5472
|
+
* @ignore
|
|
5473
|
+
* @author watson
|
|
5474
|
+
* @date 2022-04-26
|
|
5475
|
+
* @param {object} urlParams
|
|
5476
|
+
* @param {object} postParams
|
|
5477
|
+
* @param {object} planParams
|
|
5478
|
+
* @returns {promise}
|
|
5479
|
+
*/
|
|
5530
5480
|
|
|
5481
|
+
function _checkInsureCalculate() {
|
|
5482
|
+
_checkInsureCalculate = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee(urlParams, postParams, planParams) {
|
|
5483
|
+
var res, data;
|
|
5484
|
+
return regenerator_default.a.wrap(function _callee$(_context) {
|
|
5485
|
+
while (1) {
|
|
5486
|
+
switch (_context.prev = _context.next) {
|
|
5487
|
+
case 0:
|
|
5488
|
+
_context.next = 2;
|
|
5489
|
+
return checkInsureCalculateIn(urlParams, postParams, planParams);
|
|
5531
5490
|
|
|
5532
|
-
|
|
5491
|
+
case 2:
|
|
5492
|
+
res = _context.sent;
|
|
5533
5493
|
|
|
5534
|
-
|
|
5535
|
-
|
|
5494
|
+
if (!(postParams && !postParams.current_data)) {
|
|
5495
|
+
_context.next = 15;
|
|
5496
|
+
break;
|
|
5497
|
+
}
|
|
5536
5498
|
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
return {
|
|
5540
|
-
write: function write(name, value, expires, path, domain, secure) {
|
|
5541
|
-
var cookie = [];
|
|
5542
|
-
cookie.push(name + '=' + encodeURIComponent(value));
|
|
5499
|
+
data = JSON.parse(JSON.stringify(res.data));
|
|
5500
|
+
postParams.current_data = data.current_data; // 重新试算
|
|
5543
5501
|
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5502
|
+
_context.prev = 6;
|
|
5503
|
+
_context.next = 9;
|
|
5504
|
+
return checkInsureCalculateIn(urlParams, postParams, planParams);
|
|
5547
5505
|
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5506
|
+
case 9:
|
|
5507
|
+
res = _context.sent;
|
|
5508
|
+
_context.next = 15;
|
|
5509
|
+
break;
|
|
5551
5510
|
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5511
|
+
case 12:
|
|
5512
|
+
_context.prev = 12;
|
|
5513
|
+
_context.t0 = _context["catch"](6);
|
|
5514
|
+
res = _context.t0;
|
|
5555
5515
|
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5516
|
+
case 15:
|
|
5517
|
+
if (!(res && res.code === 200)) {
|
|
5518
|
+
_context.next = 19;
|
|
5519
|
+
break;
|
|
5520
|
+
}
|
|
5559
5521
|
|
|
5560
|
-
|
|
5561
|
-
},
|
|
5522
|
+
return _context.abrupt("return", res);
|
|
5562
5523
|
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
return (match ? decodeURIComponent(match[3]) : null);
|
|
5566
|
-
},
|
|
5524
|
+
case 19:
|
|
5525
|
+
return _context.abrupt("return", Promise.reject(res));
|
|
5567
5526
|
|
|
5568
|
-
|
|
5569
|
-
|
|
5527
|
+
case 20:
|
|
5528
|
+
case "end":
|
|
5529
|
+
return _context.stop();
|
|
5570
5530
|
}
|
|
5571
|
-
}
|
|
5572
|
-
})
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
return {
|
|
5577
|
-
write: function write() {},
|
|
5578
|
-
read: function read() { return null; },
|
|
5579
|
-
remove: function remove() {}
|
|
5580
|
-
};
|
|
5581
|
-
})()
|
|
5582
|
-
);
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
/***/ }),
|
|
5586
|
-
|
|
5587
|
-
/***/ 66:
|
|
5588
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
5531
|
+
}
|
|
5532
|
+
}, _callee, null, [[6, 12]]);
|
|
5533
|
+
}));
|
|
5534
|
+
return _checkInsureCalculate.apply(this, arguments);
|
|
5535
|
+
}
|
|
5589
5536
|
|
|
5590
|
-
|
|
5537
|
+
function checkInsureCalculateIn(urlParams, postParams, planParams) {
|
|
5538
|
+
if (!postParams || typeof_default()(postParams) !== 'object' || !postParams.product_id) {
|
|
5539
|
+
return Promise.reject({
|
|
5540
|
+
code: 400,
|
|
5541
|
+
msg: 'postParams参数非法'
|
|
5542
|
+
});
|
|
5543
|
+
}
|
|
5591
5544
|
|
|
5545
|
+
if (postParams && !postParams.scenario) {
|
|
5546
|
+
postParams.scenario = 'h5Widget';
|
|
5547
|
+
}
|
|
5592
5548
|
|
|
5593
|
-
var
|
|
5594
|
-
var combineURLs = __webpack_require__(68);
|
|
5549
|
+
var url = '/api/product/data/calculate';
|
|
5595
5550
|
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
*
|
|
5601
|
-
* @param {string} baseURL The base URL
|
|
5602
|
-
* @param {string} requestedURL Absolute or relative URL to combine
|
|
5603
|
-
* @returns {string} The combined full path
|
|
5604
|
-
*/
|
|
5605
|
-
module.exports = function buildFullPath(baseURL, requestedURL) {
|
|
5606
|
-
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
|
5607
|
-
return combineURLs(baseURL, requestedURL);
|
|
5551
|
+
if (urlParams && urlParams.uuid) {
|
|
5552
|
+
url += "?userUuid=".concat(urlParams.uuid);
|
|
5553
|
+
} else if (urlParams && urlParams.openId) {
|
|
5554
|
+
url += "?userUuid=".concat(urlParams.openId);
|
|
5608
5555
|
}
|
|
5609
|
-
return requestedURL;
|
|
5610
|
-
};
|
|
5611
5556
|
|
|
5557
|
+
if (urlParams && urlParams.appid) {
|
|
5558
|
+
if (url.indexOf('?') > -1) {
|
|
5559
|
+
url += "&appId=".concat(urlParams.appid);
|
|
5560
|
+
} else {
|
|
5561
|
+
url += "?appId=".concat(urlParams.appid);
|
|
5562
|
+
}
|
|
5563
|
+
}
|
|
5612
5564
|
|
|
5613
|
-
|
|
5565
|
+
if (hasPlanParams(planParams) && postParams.current_data) {
|
|
5566
|
+
postParams.current_data = tranlateCurrentData(postParams.current_data, planParams);
|
|
5567
|
+
}
|
|
5614
5568
|
|
|
5615
|
-
|
|
5616
|
-
|
|
5569
|
+
return new Promise(function (resolve, reject) {
|
|
5570
|
+
request({
|
|
5571
|
+
baseURL: baseURL,
|
|
5572
|
+
url: url,
|
|
5573
|
+
method: 'POST',
|
|
5574
|
+
urlParams: urlParams,
|
|
5575
|
+
data: postParams
|
|
5576
|
+
}).then(function (res) {
|
|
5577
|
+
if (res.code === 200) {
|
|
5578
|
+
// if (postParams && !postParams.current_data) {
|
|
5579
|
+
// let data = JSON.parse(JSON.stringify(res.data));
|
|
5580
|
+
// postParams.current_data = data.current_data
|
|
5581
|
+
// // 重新试算
|
|
5582
|
+
// checkInsureCalculate(urlParams, postParams, planParams)
|
|
5583
|
+
// }
|
|
5584
|
+
resolve({
|
|
5585
|
+
code: 200,
|
|
5586
|
+
data: res.data
|
|
5587
|
+
});
|
|
5588
|
+
} else {
|
|
5589
|
+
reject(res);
|
|
5590
|
+
}
|
|
5591
|
+
}).catch(function (err) {
|
|
5592
|
+
reject(err);
|
|
5593
|
+
});
|
|
5594
|
+
});
|
|
5595
|
+
}
|
|
5596
|
+
// CONCATENATED MODULE: ./packages/bxs-utils/trade/index.js
|
|
5617
5597
|
|
|
5618
|
-
|
|
5598
|
+
// CONCATENATED MODULE: ./packages/bxs-utils/index.ts
|
|
5619
5599
|
|
|
5620
5600
|
|
|
5621
|
-
/**
|
|
5622
|
-
* Determines whether the specified URL is absolute
|
|
5623
|
-
*
|
|
5624
|
-
* @param {string} url The URL to test
|
|
5625
|
-
* @returns {boolean} True if the specified URL is absolute, otherwise false
|
|
5626
|
-
*/
|
|
5627
|
-
module.exports = function isAbsoluteURL(url) {
|
|
5628
|
-
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
5629
|
-
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
5630
|
-
// by any combination of letters, digits, plus, period, or hyphen.
|
|
5631
|
-
return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
|
|
5632
|
-
};
|
|
5633
5601
|
|
|
5634
5602
|
|
|
5635
5603
|
/***/ }),
|
|
5636
5604
|
|
|
5637
|
-
/***/
|
|
5605
|
+
/***/ 60:
|
|
5638
5606
|
/***/ (function(module, exports, __webpack_require__) {
|
|
5639
5607
|
|
|
5640
5608
|
"use strict";
|
|
5641
5609
|
|
|
5642
5610
|
|
|
5611
|
+
var utils = __webpack_require__(5);
|
|
5612
|
+
|
|
5643
5613
|
/**
|
|
5644
|
-
*
|
|
5614
|
+
* Transform the data for a request or a response
|
|
5645
5615
|
*
|
|
5646
|
-
* @param {
|
|
5647
|
-
* @param {
|
|
5648
|
-
* @
|
|
5616
|
+
* @param {Object|String} data The data to be transformed
|
|
5617
|
+
* @param {Array} headers The headers for the request or response
|
|
5618
|
+
* @param {Array|Function} fns A single function or Array of functions
|
|
5619
|
+
* @returns {*} The resulting transformed data
|
|
5649
5620
|
*/
|
|
5650
|
-
module.exports = function
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5621
|
+
module.exports = function transformData(data, headers, fns) {
|
|
5622
|
+
/*eslint no-param-reassign:0*/
|
|
5623
|
+
utils.forEach(fns, function transform(fn) {
|
|
5624
|
+
data = fn(data, headers);
|
|
5625
|
+
});
|
|
5626
|
+
|
|
5627
|
+
return data;
|
|
5654
5628
|
};
|
|
5655
5629
|
|
|
5656
5630
|
|
|
5657
5631
|
/***/ }),
|
|
5658
5632
|
|
|
5659
|
-
/***/
|
|
5660
|
-
/***/ (function(module, exports
|
|
5633
|
+
/***/ 61:
|
|
5634
|
+
/***/ (function(module, exports) {
|
|
5661
5635
|
|
|
5662
|
-
|
|
5636
|
+
// shim for using process in browser
|
|
5637
|
+
var process = module.exports = {};
|
|
5663
5638
|
|
|
5639
|
+
// cached from whatever global is present so that test runners that stub it
|
|
5640
|
+
// don't break things. But we need to wrap it in a try catch in case it is
|
|
5641
|
+
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
|
5642
|
+
// function because try/catches deoptimize in certain engines.
|
|
5664
5643
|
|
|
5665
|
-
var
|
|
5644
|
+
var cachedSetTimeout;
|
|
5645
|
+
var cachedClearTimeout;
|
|
5666
5646
|
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5647
|
+
function defaultSetTimout() {
|
|
5648
|
+
throw new Error('setTimeout has not been defined');
|
|
5649
|
+
}
|
|
5650
|
+
function defaultClearTimeout () {
|
|
5651
|
+
throw new Error('clearTimeout has not been defined');
|
|
5652
|
+
}
|
|
5653
|
+
(function () {
|
|
5654
|
+
try {
|
|
5655
|
+
if (typeof setTimeout === 'function') {
|
|
5656
|
+
cachedSetTimeout = setTimeout;
|
|
5657
|
+
} else {
|
|
5658
|
+
cachedSetTimeout = defaultSetTimout;
|
|
5659
|
+
}
|
|
5660
|
+
} catch (e) {
|
|
5661
|
+
cachedSetTimeout = defaultSetTimout;
|
|
5662
|
+
}
|
|
5663
|
+
try {
|
|
5664
|
+
if (typeof clearTimeout === 'function') {
|
|
5665
|
+
cachedClearTimeout = clearTimeout;
|
|
5666
|
+
} else {
|
|
5667
|
+
cachedClearTimeout = defaultClearTimeout;
|
|
5668
|
+
}
|
|
5669
|
+
} catch (e) {
|
|
5670
|
+
cachedClearTimeout = defaultClearTimeout;
|
|
5671
|
+
}
|
|
5672
|
+
} ())
|
|
5673
|
+
function runTimeout(fun) {
|
|
5674
|
+
if (cachedSetTimeout === setTimeout) {
|
|
5675
|
+
//normal enviroments in sane situations
|
|
5676
|
+
return setTimeout(fun, 0);
|
|
5677
|
+
}
|
|
5678
|
+
// if setTimeout wasn't available but was latter defined
|
|
5679
|
+
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
5680
|
+
cachedSetTimeout = setTimeout;
|
|
5681
|
+
return setTimeout(fun, 0);
|
|
5682
|
+
}
|
|
5683
|
+
try {
|
|
5684
|
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
5685
|
+
return cachedSetTimeout(fun, 0);
|
|
5686
|
+
} catch(e){
|
|
5687
|
+
try {
|
|
5688
|
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
5689
|
+
return cachedSetTimeout.call(null, fun, 0);
|
|
5690
|
+
} catch(e){
|
|
5691
|
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
|
5692
|
+
return cachedSetTimeout.call(this, fun, 0);
|
|
5693
|
+
}
|
|
5694
|
+
}
|
|
5675
5695
|
|
|
5676
|
-
/**
|
|
5677
|
-
* Parse headers into an object
|
|
5678
|
-
*
|
|
5679
|
-
* ```
|
|
5680
|
-
* Date: Wed, 27 Aug 2014 08:58:49 GMT
|
|
5681
|
-
* Content-Type: application/json
|
|
5682
|
-
* Connection: keep-alive
|
|
5683
|
-
* Transfer-Encoding: chunked
|
|
5684
|
-
* ```
|
|
5685
|
-
*
|
|
5686
|
-
* @param {String} headers Headers needing to be parsed
|
|
5687
|
-
* @returns {Object} Headers parsed into an object
|
|
5688
|
-
*/
|
|
5689
|
-
module.exports = function parseHeaders(headers) {
|
|
5690
|
-
var parsed = {};
|
|
5691
|
-
var key;
|
|
5692
|
-
var val;
|
|
5693
|
-
var i;
|
|
5694
5696
|
|
|
5695
|
-
|
|
5697
|
+
}
|
|
5698
|
+
function runClearTimeout(marker) {
|
|
5699
|
+
if (cachedClearTimeout === clearTimeout) {
|
|
5700
|
+
//normal enviroments in sane situations
|
|
5701
|
+
return clearTimeout(marker);
|
|
5702
|
+
}
|
|
5703
|
+
// if clearTimeout wasn't available but was latter defined
|
|
5704
|
+
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
5705
|
+
cachedClearTimeout = clearTimeout;
|
|
5706
|
+
return clearTimeout(marker);
|
|
5707
|
+
}
|
|
5708
|
+
try {
|
|
5709
|
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
5710
|
+
return cachedClearTimeout(marker);
|
|
5711
|
+
} catch (e){
|
|
5712
|
+
try {
|
|
5713
|
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
5714
|
+
return cachedClearTimeout.call(null, marker);
|
|
5715
|
+
} catch (e){
|
|
5716
|
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
|
5717
|
+
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
5718
|
+
return cachedClearTimeout.call(this, marker);
|
|
5719
|
+
}
|
|
5720
|
+
}
|
|
5696
5721
|
|
|
5697
|
-
utils.forEach(headers.split('\n'), function parser(line) {
|
|
5698
|
-
i = line.indexOf(':');
|
|
5699
|
-
key = utils.trim(line.substr(0, i)).toLowerCase();
|
|
5700
|
-
val = utils.trim(line.substr(i + 1));
|
|
5701
5722
|
|
|
5702
|
-
|
|
5703
|
-
|
|
5723
|
+
|
|
5724
|
+
}
|
|
5725
|
+
var queue = [];
|
|
5726
|
+
var draining = false;
|
|
5727
|
+
var currentQueue;
|
|
5728
|
+
var queueIndex = -1;
|
|
5729
|
+
|
|
5730
|
+
function cleanUpNextTick() {
|
|
5731
|
+
if (!draining || !currentQueue) {
|
|
5704
5732
|
return;
|
|
5705
|
-
}
|
|
5706
|
-
if (key === 'set-cookie') {
|
|
5707
|
-
parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
|
|
5708
|
-
} else {
|
|
5709
|
-
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
5710
|
-
}
|
|
5711
5733
|
}
|
|
5712
|
-
|
|
5734
|
+
draining = false;
|
|
5735
|
+
if (currentQueue.length) {
|
|
5736
|
+
queue = currentQueue.concat(queue);
|
|
5737
|
+
} else {
|
|
5738
|
+
queueIndex = -1;
|
|
5739
|
+
}
|
|
5740
|
+
if (queue.length) {
|
|
5741
|
+
drainQueue();
|
|
5742
|
+
}
|
|
5743
|
+
}
|
|
5713
5744
|
|
|
5714
|
-
|
|
5745
|
+
function drainQueue() {
|
|
5746
|
+
if (draining) {
|
|
5747
|
+
return;
|
|
5748
|
+
}
|
|
5749
|
+
var timeout = runTimeout(cleanUpNextTick);
|
|
5750
|
+
draining = true;
|
|
5751
|
+
|
|
5752
|
+
var len = queue.length;
|
|
5753
|
+
while(len) {
|
|
5754
|
+
currentQueue = queue;
|
|
5755
|
+
queue = [];
|
|
5756
|
+
while (++queueIndex < len) {
|
|
5757
|
+
if (currentQueue) {
|
|
5758
|
+
currentQueue[queueIndex].run();
|
|
5759
|
+
}
|
|
5760
|
+
}
|
|
5761
|
+
queueIndex = -1;
|
|
5762
|
+
len = queue.length;
|
|
5763
|
+
}
|
|
5764
|
+
currentQueue = null;
|
|
5765
|
+
draining = false;
|
|
5766
|
+
runClearTimeout(timeout);
|
|
5767
|
+
}
|
|
5768
|
+
|
|
5769
|
+
process.nextTick = function (fun) {
|
|
5770
|
+
var args = new Array(arguments.length - 1);
|
|
5771
|
+
if (arguments.length > 1) {
|
|
5772
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
5773
|
+
args[i - 1] = arguments[i];
|
|
5774
|
+
}
|
|
5775
|
+
}
|
|
5776
|
+
queue.push(new Item(fun, args));
|
|
5777
|
+
if (queue.length === 1 && !draining) {
|
|
5778
|
+
runTimeout(drainQueue);
|
|
5779
|
+
}
|
|
5780
|
+
};
|
|
5781
|
+
|
|
5782
|
+
// v8 likes predictible objects
|
|
5783
|
+
function Item(fun, array) {
|
|
5784
|
+
this.fun = fun;
|
|
5785
|
+
this.array = array;
|
|
5786
|
+
}
|
|
5787
|
+
Item.prototype.run = function () {
|
|
5788
|
+
this.fun.apply(null, this.array);
|
|
5715
5789
|
};
|
|
5790
|
+
process.title = 'browser';
|
|
5791
|
+
process.browser = true;
|
|
5792
|
+
process.env = {};
|
|
5793
|
+
process.argv = [];
|
|
5794
|
+
process.version = ''; // empty string to avoid regexp issues
|
|
5795
|
+
process.versions = {};
|
|
5716
5796
|
|
|
5797
|
+
function noop() {}
|
|
5717
5798
|
|
|
5718
|
-
|
|
5799
|
+
process.on = noop;
|
|
5800
|
+
process.addListener = noop;
|
|
5801
|
+
process.once = noop;
|
|
5802
|
+
process.off = noop;
|
|
5803
|
+
process.removeListener = noop;
|
|
5804
|
+
process.removeAllListeners = noop;
|
|
5805
|
+
process.emit = noop;
|
|
5806
|
+
process.prependListener = noop;
|
|
5807
|
+
process.prependOnceListener = noop;
|
|
5719
5808
|
|
|
5720
|
-
|
|
5721
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5809
|
+
process.listeners = function (name) { return [] }
|
|
5722
5810
|
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5811
|
+
process.binding = function (name) {
|
|
5812
|
+
throw new Error('process.binding is not supported');
|
|
5813
|
+
};
|
|
5726
5814
|
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
__webpack_require__.d(__webpack_exports__, "initPersonData", function() { return /* reexport */ planbook["o" /* initPersonData */]; });
|
|
5736
|
-
__webpack_require__.d(__webpack_exports__, "personDataHandler", function() { return /* reexport */ planbook["s" /* personDataHandler */]; });
|
|
5737
|
-
__webpack_require__.d(__webpack_exports__, "getInsuredAgeRange", function() { return /* reexport */ planbook["k" /* getInsuredAgeRange */]; });
|
|
5738
|
-
__webpack_require__.d(__webpack_exports__, "setPersonAgeOptions", function() { return /* reexport */ planbook["y" /* setPersonAgeOptions */]; });
|
|
5739
|
-
__webpack_require__.d(__webpack_exports__, "convertPersonData", function() { return /* reexport */ planbook["e" /* convertPersonData */]; });
|
|
5740
|
-
__webpack_require__.d(__webpack_exports__, "initProductData", function() { return /* reexport */ planbook["p" /* initProductData */]; });
|
|
5741
|
-
__webpack_require__.d(__webpack_exports__, "productDataHandler", function() { return /* reexport */ planbook["t" /* productDataHandler */]; });
|
|
5742
|
-
__webpack_require__.d(__webpack_exports__, "getElementVerifyFromProductVerify", function() { return /* reexport */ planbook["i" /* getElementVerifyFromProductVerify */]; });
|
|
5743
|
-
__webpack_require__.d(__webpack_exports__, "setCommonInfo", function() { return /* reexport */ planbook["w" /* setCommonInfo */]; });
|
|
5744
|
-
__webpack_require__.d(__webpack_exports__, "setGroupInsurance", function() { return /* reexport */ planbook["x" /* setGroupInsurance */]; });
|
|
5745
|
-
__webpack_require__.d(__webpack_exports__, "isHideProduct", function() { return /* reexport */ planbook["r" /* isHideProduct */]; });
|
|
5746
|
-
__webpack_require__.d(__webpack_exports__, "verifyProductRules", function() { return /* reexport */ planbook["z" /* verifyProductRules */]; });
|
|
5747
|
-
__webpack_require__.d(__webpack_exports__, "restrictInsurancesInProduct", function() { return /* reexport */ planbook["v" /* restrictInsurancesInProduct */]; });
|
|
5748
|
-
__webpack_require__.d(__webpack_exports__, "convertProductData", function() { return /* reexport */ planbook["f" /* convertProductData */]; });
|
|
5749
|
-
__webpack_require__.d(__webpack_exports__, "clearAddAndTakeAndAdjustBaoeData", function() { return /* reexport */ planbook["b" /* clearAddAndTakeAndAdjustBaoeData */]; });
|
|
5750
|
-
__webpack_require__.d(__webpack_exports__, "initInsuranceData", function() { return /* reexport */ planbook["n" /* initInsuranceData */]; });
|
|
5751
|
-
__webpack_require__.d(__webpack_exports__, "insuranceDataHandler", function() { return /* reexport */ planbook["q" /* insuranceDataHandler */]; });
|
|
5752
|
-
__webpack_require__.d(__webpack_exports__, "initElementValidateRules", function() { return /* reexport */ planbook["m" /* initElementValidateRules */]; });
|
|
5753
|
-
__webpack_require__.d(__webpack_exports__, "restrictElementsInInsurance", function() { return /* reexport */ planbook["u" /* restrictElementsInInsurance */]; });
|
|
5754
|
-
__webpack_require__.d(__webpack_exports__, "getAddress", function() { return /* reexport */ getAddress; });
|
|
5755
|
-
__webpack_require__.d(__webpack_exports__, "getUuid", function() { return /* reexport */ getUuid; });
|
|
5756
|
-
__webpack_require__.d(__webpack_exports__, "hasPlanParams", function() { return /* reexport */ hasPlanParams; });
|
|
5757
|
-
__webpack_require__.d(__webpack_exports__, "insureCalculate", function() { return /* reexport */ insureCalculate; });
|
|
5758
|
-
__webpack_require__.d(__webpack_exports__, "checkInsureCalculate", function() { return /* reexport */ checkInsureCalculate; });
|
|
5759
|
-
__webpack_require__.d(__webpack_exports__, "checkInsureCalculateIn", function() { return /* reexport */ checkInsureCalculateIn; });
|
|
5815
|
+
process.cwd = function () { return '/' };
|
|
5816
|
+
process.chdir = function (dir) {
|
|
5817
|
+
throw new Error('process.chdir is not supported');
|
|
5818
|
+
};
|
|
5819
|
+
process.umask = function() { return 0; };
|
|
5820
|
+
|
|
5821
|
+
|
|
5822
|
+
/***/ }),
|
|
5760
5823
|
|
|
5761
|
-
|
|
5762
|
-
|
|
5824
|
+
/***/ 62:
|
|
5825
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
5763
5826
|
|
|
5764
|
-
|
|
5765
|
-
var asyncToGenerator = __webpack_require__(30);
|
|
5766
|
-
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
5827
|
+
"use strict";
|
|
5767
5828
|
|
|
5768
|
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/typeof.js
|
|
5769
|
-
var helpers_typeof = __webpack_require__(11);
|
|
5770
|
-
var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof);
|
|
5771
5829
|
|
|
5772
|
-
|
|
5773
|
-
var regenerator = __webpack_require__(17);
|
|
5774
|
-
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
|
|
5830
|
+
var utils = __webpack_require__(5);
|
|
5775
5831
|
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5832
|
+
module.exports = function normalizeHeaderName(headers, normalizedName) {
|
|
5833
|
+
utils.forEach(headers, function processHeader(value, name) {
|
|
5834
|
+
if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
|
|
5835
|
+
headers[normalizedName] = value;
|
|
5836
|
+
delete headers[name];
|
|
5837
|
+
}
|
|
5838
|
+
});
|
|
5839
|
+
};
|
|
5779
5840
|
|
|
5780
|
-
// CONCATENATED MODULE: ./src/js/request.js
|
|
5781
|
-
// import { gotoLogin } from './utils.js'
|
|
5782
5841
|
|
|
5783
|
-
|
|
5784
|
-
var env = null;
|
|
5842
|
+
/***/ }),
|
|
5785
5843
|
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
} else if (location.hostname.search(/pbf\.winbaoxian\.cn/) !== -1) {
|
|
5789
|
-
env = 'https://app.winbaoxian.cn';
|
|
5790
|
-
} else if (location.hostname.search(/127\.0\.0\.1|192\.168|localhost/) !== -1) {
|
|
5791
|
-
env = 'https://app.winbaoxian.cn';
|
|
5792
|
-
}
|
|
5844
|
+
/***/ 63:
|
|
5845
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
5793
5846
|
|
|
5794
|
-
|
|
5795
|
-
}(); // 创建axios实例
|
|
5847
|
+
"use strict";
|
|
5796
5848
|
|
|
5797
5849
|
|
|
5798
|
-
var
|
|
5799
|
-
baseURL: BASE_API,
|
|
5800
|
-
withCredentials: true,
|
|
5801
|
-
timeout: 10000,
|
|
5802
|
-
// 请求超时时间
|
|
5803
|
-
headers: {
|
|
5804
|
-
'X-Requested-With': 'XMLHttpRequest'
|
|
5805
|
-
}
|
|
5806
|
-
});
|
|
5807
|
-
var loadingTimer = null;
|
|
5850
|
+
var createError = __webpack_require__(27);
|
|
5808
5851
|
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5852
|
+
/**
|
|
5853
|
+
* Resolve or reject a Promise based on response status.
|
|
5854
|
+
*
|
|
5855
|
+
* @param {Function} resolve A function that resolves the promise.
|
|
5856
|
+
* @param {Function} reject A function that rejects the promise.
|
|
5857
|
+
* @param {object} response The response.
|
|
5858
|
+
*/
|
|
5859
|
+
module.exports = function settle(resolve, reject, response) {
|
|
5860
|
+
var validateStatus = response.config.validateStatus;
|
|
5861
|
+
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
5862
|
+
resolve(response);
|
|
5863
|
+
} else {
|
|
5864
|
+
reject(createError(
|
|
5865
|
+
'Request failed with status code ' + response.status,
|
|
5866
|
+
response.config,
|
|
5867
|
+
null,
|
|
5868
|
+
response.request,
|
|
5869
|
+
response
|
|
5870
|
+
));
|
|
5816
5871
|
}
|
|
5817
|
-
};
|
|
5872
|
+
};
|
|
5818
5873
|
|
|
5819
5874
|
|
|
5820
|
-
|
|
5821
|
-
if (loadingTimer) clearTimeout(loadingTimer);
|
|
5822
|
-
loadingTimer = setTimeout(function () {
|
|
5823
|
-
loading(true);
|
|
5824
|
-
}, 300);
|
|
5825
|
-
return config;
|
|
5826
|
-
}, function (error) {
|
|
5827
|
-
// Do something with request error
|
|
5828
|
-
console.log(error); // for debug
|
|
5875
|
+
/***/ }),
|
|
5829
5876
|
|
|
5830
|
-
|
|
5831
|
-
|
|
5877
|
+
/***/ 64:
|
|
5878
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
5832
5879
|
|
|
5833
|
-
|
|
5834
|
-
if (loadingTimer) clearTimeout(loadingTimer);
|
|
5835
|
-
loading(false);
|
|
5836
|
-
var res = response.data;
|
|
5880
|
+
"use strict";
|
|
5837
5881
|
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5882
|
+
|
|
5883
|
+
/**
|
|
5884
|
+
* Update an Error with the specified config, error code, and response.
|
|
5885
|
+
*
|
|
5886
|
+
* @param {Error} error The error to update.
|
|
5887
|
+
* @param {Object} config The config.
|
|
5888
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
5889
|
+
* @param {Object} [request] The request.
|
|
5890
|
+
* @param {Object} [response] The response.
|
|
5891
|
+
* @returns {Error} The error.
|
|
5892
|
+
*/
|
|
5893
|
+
module.exports = function enhanceError(error, config, code, request, response) {
|
|
5894
|
+
error.config = config;
|
|
5895
|
+
if (code) {
|
|
5896
|
+
error.code = code;
|
|
5841
5897
|
}
|
|
5842
5898
|
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
loading(false);
|
|
5899
|
+
error.request = request;
|
|
5900
|
+
error.response = response;
|
|
5901
|
+
error.isAxiosError = true;
|
|
5847
5902
|
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5903
|
+
error.toJSON = function toJSON() {
|
|
5904
|
+
return {
|
|
5905
|
+
// Standard
|
|
5906
|
+
message: this.message,
|
|
5907
|
+
name: this.name,
|
|
5908
|
+
// Microsoft
|
|
5909
|
+
description: this.description,
|
|
5910
|
+
number: this.number,
|
|
5911
|
+
// Mozilla
|
|
5912
|
+
fileName: this.fileName,
|
|
5913
|
+
lineNumber: this.lineNumber,
|
|
5914
|
+
columnNumber: this.columnNumber,
|
|
5915
|
+
stack: this.stack,
|
|
5916
|
+
// Axios
|
|
5917
|
+
config: this.config,
|
|
5918
|
+
code: this.code
|
|
5919
|
+
};
|
|
5920
|
+
};
|
|
5921
|
+
return error;
|
|
5922
|
+
};
|
|
5852
5923
|
|
|
5853
|
-
console.log('err' + error); // for debug
|
|
5854
5924
|
|
|
5855
|
-
|
|
5856
|
-
});
|
|
5857
|
-
/* harmony default export */ var request = (service);
|
|
5858
|
-
// CONCATENATED MODULE: ./packages/bxs-utils/trade/insureCalculate.js
|
|
5925
|
+
/***/ }),
|
|
5859
5926
|
|
|
5927
|
+
/***/ 65:
|
|
5928
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
5860
5929
|
|
|
5930
|
+
"use strict";
|
|
5861
5931
|
|
|
5862
5932
|
|
|
5863
|
-
|
|
5864
|
-
* @Author: watson
|
|
5865
|
-
* @Date: 2020-12-23
|
|
5866
|
-
* @LastEditors: watson
|
|
5867
|
-
* @description: 保费试算
|
|
5868
|
-
* @param {*} params: 必传
|
|
5869
|
-
* @return {*} 试算结果
|
|
5870
|
-
*/
|
|
5933
|
+
var utils = __webpack_require__(5);
|
|
5871
5934
|
|
|
5935
|
+
module.exports = (
|
|
5936
|
+
utils.isStandardBrowserEnv() ?
|
|
5872
5937
|
|
|
5873
|
-
|
|
5874
|
-
|
|
5938
|
+
// Standard browser envs support document.cookie
|
|
5939
|
+
(function standardBrowserEnv() {
|
|
5940
|
+
return {
|
|
5941
|
+
write: function write(name, value, expires, path, domain, secure) {
|
|
5942
|
+
var cookie = [];
|
|
5943
|
+
cookie.push(name + '=' + encodeURIComponent(value));
|
|
5875
5944
|
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
env = '//insurance2a-api.wyins.net.cn';
|
|
5880
|
-
} else if (location.hostname.search(/127\.0\.0\.1|192\.168|localhost|0\.0\.0\.0/) !== -1) {
|
|
5881
|
-
env = '//insurance2a-api.wyins.net.cn';
|
|
5882
|
-
}
|
|
5945
|
+
if (utils.isNumber(expires)) {
|
|
5946
|
+
cookie.push('expires=' + new Date(expires).toGMTString());
|
|
5947
|
+
}
|
|
5883
5948
|
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
* **获取地址信息**
|
|
5888
|
-
* @ignore
|
|
5889
|
-
* @author watson
|
|
5890
|
-
* @date 2022-04-26
|
|
5891
|
-
* @param {string} fetchUrl api url
|
|
5892
|
-
* @param {object} data 接口传参
|
|
5893
|
-
* @returns {object} addressData
|
|
5894
|
-
*/
|
|
5949
|
+
if (utils.isString(path)) {
|
|
5950
|
+
cookie.push('path=' + path);
|
|
5951
|
+
}
|
|
5895
5952
|
|
|
5953
|
+
if (utils.isString(domain)) {
|
|
5954
|
+
cookie.push('domain=' + domain);
|
|
5955
|
+
}
|
|
5896
5956
|
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
}
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5957
|
+
if (secure === true) {
|
|
5958
|
+
cookie.push('secure');
|
|
5959
|
+
}
|
|
5960
|
+
|
|
5961
|
+
document.cookie = cookie.join('; ');
|
|
5962
|
+
},
|
|
5963
|
+
|
|
5964
|
+
read: function read(name) {
|
|
5965
|
+
var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
|
5966
|
+
return (match ? decodeURIComponent(match[3]) : null);
|
|
5967
|
+
},
|
|
5968
|
+
|
|
5969
|
+
remove: function remove(name) {
|
|
5970
|
+
this.write(name, '', Date.now() - 86400000);
|
|
5971
|
+
}
|
|
5972
|
+
};
|
|
5973
|
+
})() :
|
|
5974
|
+
|
|
5975
|
+
// Non standard browser env (web workers, react-native) lack needed support.
|
|
5976
|
+
(function nonStandardBrowserEnv() {
|
|
5977
|
+
return {
|
|
5978
|
+
write: function write() {},
|
|
5979
|
+
read: function read() { return null; },
|
|
5980
|
+
remove: function remove() {}
|
|
5981
|
+
};
|
|
5982
|
+
})()
|
|
5983
|
+
);
|
|
5920
5984
|
|
|
5921
|
-
function getUuid(fetchUrl) {
|
|
5922
|
-
return new Promise(function (resolve, reject) {
|
|
5923
|
-
request({
|
|
5924
|
-
baseURL: fetchUrl,
|
|
5925
|
-
url: undefined,
|
|
5926
|
-
method: 'GET',
|
|
5927
|
-
urlParams: undefined,
|
|
5928
|
-
data: null
|
|
5929
|
-
}).then(function (res) {
|
|
5930
|
-
resolve(res);
|
|
5931
|
-
}).catch(function (err) {
|
|
5932
|
-
reject(err);
|
|
5933
|
-
});
|
|
5934
|
-
});
|
|
5935
|
-
}
|
|
5936
|
-
/**
|
|
5937
|
-
* **计划书初始化参数**
|
|
5938
|
-
* @ignore
|
|
5939
|
-
* @author watson
|
|
5940
|
-
* @date 2022-04-26
|
|
5941
|
-
* @param {any} planParams 计划书初始化参数
|
|
5942
|
-
* @param {any} planParams.detail_age 被保人生日
|
|
5943
|
-
* @param {any} planParams.detail_sex 被保人性别
|
|
5944
|
-
* @param {any} planParams.detail_relation 投被保人关系
|
|
5945
|
-
* @param {any} planParams.detail_applicant_age 投保人生日
|
|
5946
|
-
* @param {any} planParams.detail_applicant_sex 投保人性别
|
|
5947
|
-
* @returns {boolean} 是否有计划书参数
|
|
5948
|
-
*/
|
|
5949
5985
|
|
|
5950
|
-
|
|
5951
|
-
var type = false;
|
|
5986
|
+
/***/ }),
|
|
5952
5987
|
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5988
|
+
/***/ 66:
|
|
5989
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
5990
|
+
|
|
5991
|
+
"use strict";
|
|
5992
|
+
|
|
5993
|
+
|
|
5994
|
+
var isAbsoluteURL = __webpack_require__(67);
|
|
5995
|
+
var combineURLs = __webpack_require__(68);
|
|
5956
5996
|
|
|
5957
|
-
return type;
|
|
5958
|
-
}
|
|
5959
5997
|
/**
|
|
5960
|
-
*
|
|
5961
|
-
*
|
|
5962
|
-
*
|
|
5963
|
-
*
|
|
5964
|
-
* @param {
|
|
5965
|
-
* @param {
|
|
5966
|
-
* @
|
|
5967
|
-
* @returns {void}
|
|
5998
|
+
* Creates a new URL by combining the baseURL with the requestedURL,
|
|
5999
|
+
* only when the requestedURL is not already an absolute URL.
|
|
6000
|
+
* If the requestURL is absolute, this function returns the requestedURL untouched.
|
|
6001
|
+
*
|
|
6002
|
+
* @param {string} baseURL The base URL
|
|
6003
|
+
* @param {string} requestedURL Absolute or relative URL to combine
|
|
6004
|
+
* @returns {string} The combined full path
|
|
5968
6005
|
*/
|
|
6006
|
+
module.exports = function buildFullPath(baseURL, requestedURL) {
|
|
6007
|
+
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
|
6008
|
+
return combineURLs(baseURL, requestedURL);
|
|
6009
|
+
}
|
|
6010
|
+
return requestedURL;
|
|
6011
|
+
};
|
|
5969
6012
|
|
|
5970
|
-
function translatePlanData(widgets, currentData, planParams) {
|
|
5971
|
-
widgets.forEach(function (item) {
|
|
5972
|
-
var current; // 增加current字段,保存current_data的数据
|
|
5973
6013
|
|
|
5974
|
-
|
|
5975
|
-
current = currentData.find(function (it) {
|
|
5976
|
-
return it.k === item.key && it.risk === item.riskCode && item.duty === it.d;
|
|
5977
|
-
});
|
|
5978
|
-
} else {
|
|
5979
|
-
current = currentData.find(function (it) {
|
|
5980
|
-
return it.k === item.key && it.risk === item.riskCode;
|
|
5981
|
-
});
|
|
5982
|
-
}
|
|
6014
|
+
/***/ }),
|
|
5983
6015
|
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
if (planParams.detail_age && item.key === 'detail_age') {
|
|
5987
|
-
if (/-/.test(planParams.detail_age)) {
|
|
5988
|
-
// 被保人生日
|
|
5989
|
-
item.type = 'v-text';
|
|
5990
|
-
item.name = planParams.detail_age;
|
|
5991
|
-
current.v = planParams.detail_age;
|
|
5992
|
-
} else if (/岁/.test(planParams.detail_age)) {
|
|
5993
|
-
// 被保人年龄
|
|
5994
|
-
item.type = 'v-text';
|
|
5995
|
-
item.name = planParams.detail_age;
|
|
5996
|
-
item.label = item.label + '(年龄)';
|
|
5997
|
-
current.v = planParams.detail_age.replace('周', '').replace('岁', '').replace('Y', '') + 'Y';
|
|
5998
|
-
}
|
|
5999
|
-
} // 被保人性别
|
|
6016
|
+
/***/ 67:
|
|
6017
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
6000
6018
|
|
|
6019
|
+
"use strict";
|
|
6001
6020
|
|
|
6002
|
-
if (planParams.detail_sex && item.key === 'detail_sex') {
|
|
6003
|
-
item.type = 'v-text';
|
|
6004
|
-
item.name = planParams.detail_sex === '1' ? '男' : '女';
|
|
6005
|
-
current.v = planParams.detail_sex;
|
|
6006
|
-
} // 投被保人关系
|
|
6007
|
-
// 初始化
|
|
6008
|
-
// if (
|
|
6009
|
-
// item.key === 'detail_relation' &&
|
|
6010
|
-
// planParams.detail_sex &&
|
|
6011
|
-
// planParams.detail_applicant_sex &&
|
|
6012
|
-
// String(planParams.detail_sex) ===
|
|
6013
|
-
// String(planParams.detail_applicant_sex)
|
|
6014
|
-
// ) {
|
|
6015
|
-
// let otemp = [];
|
|
6016
|
-
// item.opts[item.key].forEach(i => {
|
|
6017
|
-
// if (
|
|
6018
|
-
// String(planParams.detail_sex) === '1' &&
|
|
6019
|
-
// String(planParams.detail_applicant_sex) === '1'
|
|
6020
|
-
// ) {
|
|
6021
|
-
// // 投被保人 - 男 1
|
|
6022
|
-
// if (['1', '14', '16', '18'].includes(String(i.value))) {
|
|
6023
|
-
// otemp.push(i);
|
|
6024
|
-
// }
|
|
6025
|
-
// } else if (
|
|
6026
|
-
// String(planParams.detail_sex) === '2' &&
|
|
6027
|
-
// String(planParams.detail_applicant_sex) === '2'
|
|
6028
|
-
// ) {
|
|
6029
|
-
// // 投被保人 - 女 2
|
|
6030
|
-
// if (['1', '15', '17', '19'].includes(String(i.value))) {
|
|
6031
|
-
// otemp.push(i);
|
|
6032
|
-
// }
|
|
6033
|
-
// }
|
|
6034
|
-
// });
|
|
6035
|
-
// item.opts[item.key] = otemp;
|
|
6036
|
-
// console.log('otemp', otemp);
|
|
6037
|
-
// }
|
|
6038
6021
|
|
|
6022
|
+
/**
|
|
6023
|
+
* Determines whether the specified URL is absolute
|
|
6024
|
+
*
|
|
6025
|
+
* @param {string} url The URL to test
|
|
6026
|
+
* @returns {boolean} True if the specified URL is absolute, otherwise false
|
|
6027
|
+
*/
|
|
6028
|
+
module.exports = function isAbsoluteURL(url) {
|
|
6029
|
+
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
6030
|
+
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
6031
|
+
// by any combination of letters, digits, plus, period, or hyphen.
|
|
6032
|
+
return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
|
|
6033
|
+
};
|
|
6039
6034
|
|
|
6040
|
-
if (planParams.detail_relation && item.key === 'detail_relation') {
|
|
6041
|
-
// 条件检索
|
|
6042
|
-
if (planParams.detail_relation === '-1' || planParams.detail_relation === -1) {
|
|
6043
|
-
// 非本人
|
|
6044
|
-
var temp = [];
|
|
6045
|
-
item.opts[item.key].forEach(function (i) {
|
|
6046
|
-
if (String(i.value) != '1') {
|
|
6047
|
-
temp.push(i);
|
|
6048
|
-
}
|
|
6049
|
-
});
|
|
6050
|
-
item.name = temp[0] && temp[0].name ? temp[0].name : '';
|
|
6051
|
-
item.opts[item.key] = temp;
|
|
6052
|
-
} else if (planParams.detail_relation) {
|
|
6053
|
-
// 指定人 - 本人 其他人
|
|
6054
|
-
item.type = 'v-text';
|
|
6055
|
-
current.v = planParams.detail_relation;
|
|
6056
|
-
var _temp = [];
|
|
6057
|
-
item.opts[item.key].forEach(function (i) {
|
|
6058
|
-
if (String(i.value) === String(planParams.detail_relation)) {
|
|
6059
|
-
_temp.push(i);
|
|
6060
6035
|
|
|
6061
|
-
|
|
6062
|
-
}
|
|
6063
|
-
});
|
|
6064
|
-
item.opts[item.key] = _temp;
|
|
6065
|
-
}
|
|
6066
|
-
} // 投保人出生日期
|
|
6036
|
+
/***/ }),
|
|
6067
6037
|
|
|
6038
|
+
/***/ 68:
|
|
6039
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
6068
6040
|
|
|
6069
|
-
|
|
6070
|
-
if (/-/.test(planParams.detail_applicant_age)) {
|
|
6071
|
-
// 被保人生日
|
|
6072
|
-
item.type = 'v-text';
|
|
6073
|
-
item.name = planParams.detail_applicant_age;
|
|
6074
|
-
current.v = planParams.detail_applicant_age;
|
|
6075
|
-
} else if (/岁/.test(planParams.detail_applicant_age)) {
|
|
6076
|
-
// 被保人年龄
|
|
6077
|
-
item.type = 'v-text';
|
|
6078
|
-
item.name = planParams.detail_applicant_age;
|
|
6079
|
-
item.label = item.label + '(年龄)';
|
|
6080
|
-
current.v = planParams.detail_applicant_age.replace('周', '').replace('岁', '').replace('Y', '') + 'Y';
|
|
6081
|
-
}
|
|
6082
|
-
} // 投保人性别
|
|
6041
|
+
"use strict";
|
|
6083
6042
|
|
|
6084
6043
|
|
|
6085
|
-
if (planParams.detail_applicant_sex && item.key === 'detail_applicant_sex') {
|
|
6086
|
-
item.type = 'v-text';
|
|
6087
|
-
item.name = planParams.detail_applicant_sex === '1' ? '男' : '女';
|
|
6088
|
-
current.v = planParams.detail_applicant_sex;
|
|
6089
|
-
}
|
|
6090
|
-
}
|
|
6091
|
-
});
|
|
6092
|
-
}
|
|
6093
6044
|
/**
|
|
6094
|
-
*
|
|
6095
|
-
*
|
|
6096
|
-
* @
|
|
6097
|
-
* @
|
|
6098
|
-
* @
|
|
6099
|
-
* @param {object} planParams
|
|
6100
|
-
* @returns {object}
|
|
6045
|
+
* Creates a new URL by combining the specified URLs
|
|
6046
|
+
*
|
|
6047
|
+
* @param {string} baseURL The base URL
|
|
6048
|
+
* @param {string} relativeURL The relative URL
|
|
6049
|
+
* @returns {string} The combined URL
|
|
6101
6050
|
*/
|
|
6051
|
+
module.exports = function combineURLs(baseURL, relativeURL) {
|
|
6052
|
+
return relativeURL
|
|
6053
|
+
? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
|
|
6054
|
+
: baseURL;
|
|
6055
|
+
};
|
|
6102
6056
|
|
|
6103
6057
|
|
|
6104
|
-
|
|
6105
|
-
var currentDataCopy = JSON.parse(JSON.stringify(currentData));
|
|
6106
|
-
currentDataCopy.forEach(function (item) {
|
|
6107
|
-
var current = item;
|
|
6058
|
+
/***/ }),
|
|
6108
6059
|
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
if (/-/.test(planParams.detail_age)) {
|
|
6112
|
-
// 被保人生日
|
|
6113
|
-
current.v = planParams.detail_age;
|
|
6114
|
-
} else if (/岁/.test(planParams.detail_age)) {
|
|
6115
|
-
// 被保人年龄
|
|
6116
|
-
current.v = planParams.detail_age.replace('周', '').replace('岁', '').replace('Y', '') + 'Y';
|
|
6117
|
-
}
|
|
6118
|
-
} // 被保人性别
|
|
6060
|
+
/***/ 69:
|
|
6061
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
6119
6062
|
|
|
6063
|
+
"use strict";
|
|
6120
6064
|
|
|
6121
|
-
if (planParams.detail_sex && item.k === 'detail_sex') {
|
|
6122
|
-
current.v = planParams.detail_sex;
|
|
6123
|
-
} // 投被保人关系
|
|
6124
6065
|
|
|
6066
|
+
var utils = __webpack_require__(5);
|
|
6125
6067
|
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6068
|
+
// Headers whose duplicates are ignored by node
|
|
6069
|
+
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
6070
|
+
var ignoreDuplicateOf = [
|
|
6071
|
+
'age', 'authorization', 'content-length', 'content-type', 'etag',
|
|
6072
|
+
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
|
|
6073
|
+
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
|
|
6074
|
+
'referer', 'retry-after', 'user-agent'
|
|
6075
|
+
];
|
|
6131
6076
|
|
|
6077
|
+
/**
|
|
6078
|
+
* Parse headers into an object
|
|
6079
|
+
*
|
|
6080
|
+
* ```
|
|
6081
|
+
* Date: Wed, 27 Aug 2014 08:58:49 GMT
|
|
6082
|
+
* Content-Type: application/json
|
|
6083
|
+
* Connection: keep-alive
|
|
6084
|
+
* Transfer-Encoding: chunked
|
|
6085
|
+
* ```
|
|
6086
|
+
*
|
|
6087
|
+
* @param {String} headers Headers needing to be parsed
|
|
6088
|
+
* @returns {Object} Headers parsed into an object
|
|
6089
|
+
*/
|
|
6090
|
+
module.exports = function parseHeaders(headers) {
|
|
6091
|
+
var parsed = {};
|
|
6092
|
+
var key;
|
|
6093
|
+
var val;
|
|
6094
|
+
var i;
|
|
6132
6095
|
|
|
6133
|
-
|
|
6134
|
-
if (/-/.test(planParams.detail_applicant_age)) {
|
|
6135
|
-
// 被保人生日
|
|
6136
|
-
current.v = planParams.detail_applicant_age;
|
|
6137
|
-
} else if (/岁/.test(planParams.detail_applicant_age)) {
|
|
6138
|
-
// 被保人年龄
|
|
6139
|
-
current.v = planParams.detail_applicant_age.replace('周', '').replace('岁', '').replace('Y', '') + 'Y';
|
|
6140
|
-
}
|
|
6141
|
-
} // 投保人性别
|
|
6096
|
+
if (!headers) { return parsed; }
|
|
6142
6097
|
|
|
6098
|
+
utils.forEach(headers.split('\n'), function parser(line) {
|
|
6099
|
+
i = line.indexOf(':');
|
|
6100
|
+
key = utils.trim(line.substr(0, i)).toLowerCase();
|
|
6101
|
+
val = utils.trim(line.substr(i + 1));
|
|
6143
6102
|
|
|
6144
|
-
|
|
6145
|
-
|
|
6103
|
+
if (key) {
|
|
6104
|
+
if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
|
|
6105
|
+
return;
|
|
6106
|
+
}
|
|
6107
|
+
if (key === 'set-cookie') {
|
|
6108
|
+
parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
|
|
6109
|
+
} else {
|
|
6110
|
+
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
6146
6111
|
}
|
|
6147
6112
|
}
|
|
6148
6113
|
});
|
|
6149
|
-
return currentDataCopy;
|
|
6150
|
-
}
|
|
6151
|
-
/**
|
|
6152
|
-
* 险种计算
|
|
6153
|
-
* @author watson
|
|
6154
|
-
* @date 2022-04-26
|
|
6155
|
-
* @param {object} urlParams 接口URL上面的参数,c端必传uuid
|
|
6156
|
-
* @param {object} postParams 试算用的参数,product_id, current_data 和 scenario: 'h5Widget'
|
|
6157
|
-
* @param {object} planParams 计划书初始化参数
|
|
6158
|
-
* @returns {promise} 试算结果
|
|
6159
|
-
*/
|
|
6160
6114
|
|
|
6115
|
+
return parsed;
|
|
6116
|
+
};
|
|
6161
6117
|
|
|
6162
|
-
function insureCalculate(urlParams, postParams, planParams) {
|
|
6163
|
-
if (!postParams || typeof_default()(postParams) !== 'object' || !postParams.product_id) {
|
|
6164
|
-
return postParams;
|
|
6165
|
-
}
|
|
6166
6118
|
|
|
6167
|
-
|
|
6168
|
-
postParams.scenario = 'h5Widget';
|
|
6169
|
-
}
|
|
6119
|
+
/***/ }),
|
|
6170
6120
|
|
|
6171
|
-
|
|
6121
|
+
/***/ 7:
|
|
6122
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
6172
6123
|
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6124
|
+
"use strict";
|
|
6125
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return initInsuranceData; });
|
|
6126
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return insuranceDataHandler; });
|
|
6127
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return initElementValidateRules; });
|
|
6128
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return restrictElementsInInsurance; });
|
|
6129
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
6130
|
+
/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
|
|
6178
6131
|
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6132
|
+
|
|
6133
|
+
function initInsuranceData(insData) {
|
|
6134
|
+
if (!insData || !insData.eleOrderList) {
|
|
6135
|
+
return;
|
|
6136
|
+
}
|
|
6137
|
+
if (insData.account && insData.accountData && insData.accountData.accountPart) {
|
|
6138
|
+
insData.accountData.addAndTakeData = insData.accountData.addAndTakeData || [];
|
|
6139
|
+
if (!insData.accountData.addAndTakeData.length) {
|
|
6140
|
+
insData.accountData.addAndTakeData.push({
|
|
6141
|
+
key: 'add',
|
|
6142
|
+
adjustData: []
|
|
6143
|
+
});
|
|
6144
|
+
if (['addAndTake', 'take'].includes(insData.accountData.accountPart)) {
|
|
6145
|
+
insData.accountData.addAndTakeData.push({
|
|
6146
|
+
key: 'take',
|
|
6147
|
+
adjustData: []
|
|
6148
|
+
});
|
|
6149
|
+
}
|
|
6150
|
+
}
|
|
6151
|
+
}
|
|
6152
|
+
if (insData.reduceBaof && !insData.reduceBaofData) {
|
|
6153
|
+
insData.reduceBaofData = {
|
|
6154
|
+
accountPart: 'take',
|
|
6155
|
+
addAndTakeData: [
|
|
6156
|
+
{
|
|
6157
|
+
key: 'take',
|
|
6158
|
+
adjustData: []
|
|
6159
|
+
}
|
|
6160
|
+
]
|
|
6161
|
+
};
|
|
6162
|
+
}
|
|
6163
|
+
insData.eleOrderList.forEach(function (e) {
|
|
6164
|
+
switch (e.key) {
|
|
6165
|
+
case 'title':
|
|
6166
|
+
e.isDisabled = e.isDisabled || null;
|
|
6167
|
+
e.isHide = e.isHide || null;
|
|
6168
|
+
break;
|
|
6169
|
+
case 'baoe':
|
|
6170
|
+
e.placeholder = e.placeholder || '请输入保额';
|
|
6171
|
+
break;
|
|
6172
|
+
case 'baof':
|
|
6173
|
+
e.placeholder = e.placeholder || '请输入保费';
|
|
6174
|
+
break;
|
|
6175
|
+
}
|
|
6176
|
+
if (e.optConf && e.optConf.length && e.optConf[1]) {
|
|
6177
|
+
var options = [];
|
|
6178
|
+
for (var i = e.optConf[0]; i <= e.optConf[1]; i += (e.optConf[2] && e.optConf[2] && e.optConf[2].step) || 1) {
|
|
6179
|
+
options.push({
|
|
6180
|
+
val: e.optConf[2] && e.optConf[2].valfix ? "" + i + e.optConf[2].valfix : i,
|
|
6181
|
+
desc: e.optConf[2] && e.optConf[2].desc ? e.optConf[2].desc.replace(/{{&&}}/, i) : i
|
|
6182
|
+
});
|
|
6183
|
+
}
|
|
6184
|
+
e.opts = options;
|
|
6185
|
+
}
|
|
6186
|
+
if (e.opts && e.opts.length) {
|
|
6187
|
+
e.opts = e.opts.map(function (o) { return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, o), { desc: o.desc || o.val, isHide: o.isHide || null, isDisabled: o.isDisabled || null, isInvalid: o.isInvalid || null })); });
|
|
6188
|
+
}
|
|
6189
|
+
});
|
|
6190
|
+
}
|
|
6191
|
+
function insuranceDataHandler(insData, productData) {
|
|
6192
|
+
if (!insData || !insData.eleOrderList) {
|
|
6193
|
+
return insData;
|
|
6194
|
+
}
|
|
6195
|
+
if (insData.reduceBaof) {
|
|
6196
|
+
insData.reduceBaofData = insData.reduceBaofData || null;
|
|
6197
|
+
}
|
|
6198
|
+
insData.eleOrderList.forEach(function (ele) {
|
|
6199
|
+
ele.isDisabled = ele.isDisabled || null;
|
|
6200
|
+
ele.isHide = ele.isHide || null;
|
|
6201
|
+
ele.isIgnoreValidate = ele.isIgnoreValidate || null;
|
|
6202
|
+
ele.rules = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArrays */ "g"])(initElementValidateRules(ele, productData));
|
|
6203
|
+
});
|
|
6204
|
+
var calMethod = insData.eleOrderList.find(function (e) { return e.key === 'calMethod'; });
|
|
6205
|
+
var baoe = insData.eleOrderList.find(function (e) { return e.key === 'baoe'; });
|
|
6206
|
+
var baof = insData.eleOrderList.find(function (e) { return e.key === 'baof'; });
|
|
6207
|
+
var plan = insData.eleOrderList.find(function (e) { return e.key === 'plan'; });
|
|
6208
|
+
if (!calMethod && baoe && plan) {
|
|
6209
|
+
insData.showPlanDesc = !!baoe.isHide;
|
|
6210
|
+
}
|
|
6211
|
+
if (calMethod && baoe && baof) {
|
|
6212
|
+
baoe.isHide = calMethod.value !== 'baoe2baof';
|
|
6213
|
+
baof.isHide = calMethod.value === 'baoe2baof';
|
|
6214
|
+
}
|
|
6215
|
+
return insData;
|
|
6216
|
+
}
|
|
6217
|
+
function initElementValidateRules(ele, productData) {
|
|
6218
|
+
var rules = [];
|
|
6219
|
+
if (['cmCommonInput'].indexOf(String(ele.componentName)) !== -1) {
|
|
6220
|
+
rules = [
|
|
6221
|
+
{
|
|
6222
|
+
required: ele.required !== false,
|
|
6223
|
+
message: "\u8BF7\u8F93\u5165" + (ele.labelName || '') + "\u503C"
|
|
6224
|
+
},
|
|
6225
|
+
{
|
|
6226
|
+
pattern: ele.regExp ? eval(String(ele.regExp)) : /^\d*$/,
|
|
6227
|
+
message: ele.regExpMessage || (ele.regExp ? '输入不合法,请重新输入' : '请输入整数值')
|
|
6228
|
+
}
|
|
6229
|
+
];
|
|
6230
|
+
}
|
|
6231
|
+
var min = 0;
|
|
6232
|
+
var max = 0;
|
|
6233
|
+
if (ele.min && !isNaN(Number(ele.min))) {
|
|
6234
|
+
min = ele.min;
|
|
6235
|
+
}
|
|
6236
|
+
if (ele.max && !isNaN(Number(ele.max))) {
|
|
6237
|
+
max = ele.max;
|
|
6238
|
+
}
|
|
6239
|
+
if (min || max) {
|
|
6240
|
+
var message = '';
|
|
6241
|
+
if (min && max) {
|
|
6242
|
+
message = "\u8BF7\u8F93\u5165" + Object(_common__WEBPACK_IMPORTED_MODULE_1__[/* converUnit10000 */ "b"])(min) + "~" + Object(_common__WEBPACK_IMPORTED_MODULE_1__[/* converUnit10000 */ "b"])(max) + "\u4E4B\u95F4\u7684\u6570\u503C";
|
|
6243
|
+
}
|
|
6244
|
+
else if (!min) {
|
|
6245
|
+
message = "\u8BF7\u8F93\u5165\u4E0D\u5927\u4E8E" + Object(_common__WEBPACK_IMPORTED_MODULE_1__[/* converUnit10000 */ "b"])(max) + "\u7684\u6570\u503C";
|
|
6246
|
+
}
|
|
6247
|
+
else if (!max) {
|
|
6248
|
+
message = "\u8BF7\u8F93\u5165\u4E0D\u5C0F\u4E8E" + Object(_common__WEBPACK_IMPORTED_MODULE_1__[/* converUnit10000 */ "b"])(min) + "\u7684\u6570\u503C";
|
|
6249
|
+
}
|
|
6250
|
+
rules.push({
|
|
6251
|
+
type: 'number',
|
|
6252
|
+
min: min || -Infinity,
|
|
6253
|
+
max: max || Infinity,
|
|
6254
|
+
message: message,
|
|
6255
|
+
validator: function (rule, value) {
|
|
6256
|
+
return !value || (value >= rule.min && value <= rule.max);
|
|
6257
|
+
}
|
|
6258
|
+
});
|
|
6259
|
+
}
|
|
6260
|
+
if (ele.multi && !isNaN(Number(ele.multi))) {
|
|
6261
|
+
rules.push({
|
|
6262
|
+
multiple: ele.multi,
|
|
6263
|
+
message: "\u8BF7\u8F93\u5165" + ele.multi + "\u500D\u6570",
|
|
6264
|
+
validator: function (rule, value) {
|
|
6265
|
+
return !value || !(value % rule.multiple);
|
|
6266
|
+
}
|
|
6267
|
+
});
|
|
6268
|
+
}
|
|
6269
|
+
if (ele.compareItem &&
|
|
6270
|
+
ele.compareItem.length &&
|
|
6271
|
+
ele.compareItem.length >= 3 &&
|
|
6272
|
+
productData &&
|
|
6273
|
+
productData.mulInsOrderList) {
|
|
6274
|
+
var item1_1 = ele.compareItem[0].match(/(.{1,})\.(.{1,})/);
|
|
6275
|
+
var item2_1 = ele.compareItem[2].match(/(.{1,})\.(.{1,})/);
|
|
6276
|
+
var insurance1 = void 0, insurance2 = void 0, insTitle1 = void 0, insTitle2 = void 0, itemValue1 = void 0, itemValue2 = void 0;
|
|
6277
|
+
if (item1_1 && item2_1) {
|
|
6278
|
+
insurance1 = productData.mulInsOrderList.find(function (ins) { return ins.key + '' === item1_1[1]; });
|
|
6279
|
+
insurance2 = productData.mulInsOrderList.find(function (ins) { return ins.key + '' === item2_1[1]; });
|
|
6280
|
+
}
|
|
6281
|
+
if (insurance1 && insurance1.eleOrderList) {
|
|
6282
|
+
insTitle1 = insurance1.eleOrderList.find(function (e) { return e.key === 'title'; });
|
|
6283
|
+
if (insTitle1 && insTitle1.value) {
|
|
6284
|
+
itemValue1 = insurance1.eleOrderList.find(function (e) { return e.key === item1_1[2]; });
|
|
6285
|
+
}
|
|
6286
|
+
}
|
|
6287
|
+
if (insurance2 && insurance2.eleOrderList) {
|
|
6288
|
+
insTitle2 = insurance2.eleOrderList.find(function (e) { return e.key === 'title'; });
|
|
6289
|
+
if (insTitle2 && insTitle2.value) {
|
|
6290
|
+
itemValue2 = insurance2.eleOrderList.find(function (e) { return e.key === item2_1[2]; });
|
|
6291
|
+
}
|
|
6292
|
+
}
|
|
6293
|
+
if (itemValue1 && itemValue1.value && itemValue2 && itemValue2.value && ele.compareItem[1]) {
|
|
6294
|
+
rules.push({
|
|
6295
|
+
value1: itemValue1.value,
|
|
6296
|
+
value2: itemValue2.value,
|
|
6297
|
+
operator: ele.compareItem[1],
|
|
6298
|
+
message: ele.compareItem[3] || '数据输入有误',
|
|
6299
|
+
validator: function (rule) {
|
|
6300
|
+
var bool = false;
|
|
6301
|
+
var value1 = rule.value1;
|
|
6302
|
+
var value2 = rule.value2;
|
|
6303
|
+
var operator = rule.operator;
|
|
6304
|
+
switch (operator) {
|
|
6305
|
+
case '<=':
|
|
6306
|
+
bool = value1 <= value2;
|
|
6307
|
+
break;
|
|
6308
|
+
case '>=':
|
|
6309
|
+
bool = value1 >= value2;
|
|
6310
|
+
break;
|
|
6311
|
+
case '<':
|
|
6312
|
+
bool = value1 < value2;
|
|
6313
|
+
break;
|
|
6314
|
+
case '>':
|
|
6315
|
+
bool = value1 > value2;
|
|
6316
|
+
break;
|
|
6317
|
+
default:
|
|
6318
|
+
bool = value1 <= value2;
|
|
6319
|
+
}
|
|
6320
|
+
return bool;
|
|
6321
|
+
}
|
|
6322
|
+
});
|
|
6323
|
+
}
|
|
6184
6324
|
}
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
urlParams: urlParams,
|
|
6197
|
-
data: postParams
|
|
6198
|
-
}).then(function (res) {
|
|
6199
|
-
if (res.code === 200) {
|
|
6200
|
-
var data = JSON.parse(JSON.stringify(res.data));
|
|
6201
|
-
|
|
6202
|
-
if (hasPlanParams(planParams)) {
|
|
6203
|
-
var widgets = data.widgets;
|
|
6204
|
-
var currentData = data.current_data;
|
|
6205
|
-
translatePlanData(widgets, currentData, planParams);
|
|
6325
|
+
return rules;
|
|
6326
|
+
}
|
|
6327
|
+
function restrictElementsInInsurance(_a) {
|
|
6328
|
+
var personOrderList = _a.personOrderList, insData = _a.insData, eleData = _a.eleData;
|
|
6329
|
+
var errorMsg = '';
|
|
6330
|
+
if (insData && eleData && eleData.restrictions) {
|
|
6331
|
+
var insuredInfo = personOrderList && personOrderList.find(function (p) { return p.key === 'insuredInfo'; });
|
|
6332
|
+
var insuranceInfo = Object(_common__WEBPACK_IMPORTED_MODULE_1__[/* convertEleOrderListToObj */ "c"])(insData);
|
|
6333
|
+
var verifyData_1;
|
|
6334
|
+
if (insuredInfo) {
|
|
6335
|
+
verifyData_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({ sex: insuredInfo.sex, age: insuredInfo.age }, insuranceInfo);
|
|
6206
6336
|
}
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
data: cData
|
|
6337
|
+
var eleRestricts = eleData.restrictions.filter(function (restrict) {
|
|
6338
|
+
return Object.keys(restrict).every(function (ele) {
|
|
6339
|
+
return ((ele === 'age' &&
|
|
6340
|
+
verifyData_1[ele] &&
|
|
6341
|
+
verifyData_1[ele] >= restrict[ele][0] &&
|
|
6342
|
+
verifyData_1[ele] <= restrict[ele][1]) ||
|
|
6343
|
+
ele === eleData.key ||
|
|
6344
|
+
((restrict[ele].constructor === String || restrict[ele].constructor === Number) &&
|
|
6345
|
+
verifyData_1[ele] == restrict[ele]) ||
|
|
6346
|
+
(restrict[ele].constructor === Array && restrict[ele].find(function (r) { return r == verifyData_1[ele]; })));
|
|
6347
|
+
});
|
|
6219
6348
|
});
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
}
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
* @param {object} urlParams 接口URL上面的参数,c端必传uuid
|
|
6233
|
-
* @param {object} postParams 试算用的参数,product_id, current_data 和 scenario: 'h5Widget'
|
|
6234
|
-
* @param {object} planParams 计划书初始化参数
|
|
6235
|
-
* @returns {promise} 试算结果
|
|
6236
|
-
*/
|
|
6237
|
-
|
|
6238
|
-
function checkInsureCalculate(_x, _x2, _x3) {
|
|
6239
|
-
return _checkInsureCalculate.apply(this, arguments);
|
|
6240
|
-
}
|
|
6241
|
-
/**
|
|
6242
|
-
* 描述
|
|
6243
|
-
* @ignore
|
|
6244
|
-
* @author watson
|
|
6245
|
-
* @date 2022-04-26
|
|
6246
|
-
* @param {object} urlParams
|
|
6247
|
-
* @param {object} postParams
|
|
6248
|
-
* @param {object} planParams
|
|
6249
|
-
* @returns {promise}
|
|
6250
|
-
*/
|
|
6251
|
-
|
|
6252
|
-
function _checkInsureCalculate() {
|
|
6253
|
-
_checkInsureCalculate = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee(urlParams, postParams, planParams) {
|
|
6254
|
-
var res, data;
|
|
6255
|
-
return regenerator_default.a.wrap(function _callee$(_context) {
|
|
6256
|
-
while (1) {
|
|
6257
|
-
switch (_context.prev = _context.next) {
|
|
6258
|
-
case 0:
|
|
6259
|
-
_context.next = 2;
|
|
6260
|
-
return checkInsureCalculateIn(urlParams, postParams, planParams);
|
|
6261
|
-
|
|
6262
|
-
case 2:
|
|
6263
|
-
res = _context.sent;
|
|
6264
|
-
|
|
6265
|
-
if (!(postParams && !postParams.current_data)) {
|
|
6266
|
-
_context.next = 15;
|
|
6267
|
-
break;
|
|
6349
|
+
var valRange_1 = eleRestricts && eleRestricts[0] && eleRestricts[0][eleData.key];
|
|
6350
|
+
if (valRange_1 && valRange_1.length) {
|
|
6351
|
+
if (eleData.opts) {
|
|
6352
|
+
eleData.opts.forEach(function (o) {
|
|
6353
|
+
if (!valRange_1.find(function (v) { return v.val === o.val; })) {
|
|
6354
|
+
o.isInvalid = true;
|
|
6355
|
+
}
|
|
6356
|
+
});
|
|
6357
|
+
if (!eleData.opts.find(function (opt) { return !opt.isHide && !opt.isDisabled && !opt.isInvalid && opt.val == eleData.value; })) {
|
|
6358
|
+
var opt = eleData.opts.find(function (o) { return o.val == eleData.value; });
|
|
6359
|
+
errorMsg = "\u5F53\u524D\u6761\u4EF6\u4E0B, \u6CA1\u6709" + eleData.labelName + (opt ? opt.desc : '') + "\u9009\u9879, \u5DF2\u81EA\u52A8\u5207\u6362";
|
|
6360
|
+
}
|
|
6268
6361
|
}
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
case 12:
|
|
6283
|
-
_context.prev = 12;
|
|
6284
|
-
_context.t0 = _context["catch"](6);
|
|
6285
|
-
res = _context.t0;
|
|
6286
|
-
|
|
6287
|
-
case 15:
|
|
6288
|
-
if (!(res && res.code === 200)) {
|
|
6289
|
-
_context.next = 19;
|
|
6290
|
-
break;
|
|
6362
|
+
else if (valRange_1[0] || valRange_1[1]) {
|
|
6363
|
+
var rangeMsg = "\u5F53\u524D\u6761\u4EF6\u4E0B, " + insData.name + "\u7684" + eleData.labelName + "\u503C";
|
|
6364
|
+
var minMsg = "\u4E0D\u5F97\u5C0F\u4E8E" + Object(_common__WEBPACK_IMPORTED_MODULE_1__[/* converUnit10000 */ "b"])(valRange_1[0]);
|
|
6365
|
+
var maxMsg = "\u4E0D\u5F97\u5927\u4E8E" + Object(_common__WEBPACK_IMPORTED_MODULE_1__[/* converUnit10000 */ "b"])(valRange_1[1]);
|
|
6366
|
+
if (valRange_1[0] && valRange_1[1] && (eleData.value < valRange_1[0] || eleData.value > valRange_1[1])) {
|
|
6367
|
+
errorMsg = "" + rangeMsg + minMsg + "\u4E14" + maxMsg;
|
|
6368
|
+
}
|
|
6369
|
+
else if (valRange_1[0] && eleData.value < valRange_1[0]) {
|
|
6370
|
+
errorMsg = "" + rangeMsg + minMsg;
|
|
6371
|
+
}
|
|
6372
|
+
else if (valRange_1[1] && eleData.value > valRange_1[1]) {
|
|
6373
|
+
errorMsg = "" + rangeMsg + maxMsg;
|
|
6374
|
+
}
|
|
6291
6375
|
}
|
|
6292
|
-
|
|
6293
|
-
return _context.abrupt("return", res);
|
|
6294
|
-
|
|
6295
|
-
case 19:
|
|
6296
|
-
return _context.abrupt("return", Promise.reject(res));
|
|
6297
|
-
|
|
6298
|
-
case 20:
|
|
6299
|
-
case "end":
|
|
6300
|
-
return _context.stop();
|
|
6301
6376
|
}
|
|
6302
|
-
}
|
|
6303
|
-
}, _callee, null, [[6, 12]]);
|
|
6304
|
-
}));
|
|
6305
|
-
return _checkInsureCalculate.apply(this, arguments);
|
|
6306
|
-
}
|
|
6307
|
-
|
|
6308
|
-
function checkInsureCalculateIn(urlParams, postParams, planParams) {
|
|
6309
|
-
if (!postParams || typeof_default()(postParams) !== 'object' || !postParams.product_id) {
|
|
6310
|
-
return Promise.reject({
|
|
6311
|
-
code: 400,
|
|
6312
|
-
msg: 'postParams参数非法'
|
|
6313
|
-
});
|
|
6314
|
-
}
|
|
6315
|
-
|
|
6316
|
-
if (postParams && !postParams.scenario) {
|
|
6317
|
-
postParams.scenario = 'h5Widget';
|
|
6318
|
-
}
|
|
6319
|
-
|
|
6320
|
-
var url = '/api/product/data/calculate';
|
|
6321
|
-
|
|
6322
|
-
if (urlParams && urlParams.uuid) {
|
|
6323
|
-
url += "?userUuid=".concat(urlParams.uuid);
|
|
6324
|
-
} else if (urlParams && urlParams.openId) {
|
|
6325
|
-
url += "?userUuid=".concat(urlParams.openId);
|
|
6326
|
-
}
|
|
6327
|
-
|
|
6328
|
-
if (urlParams && urlParams.appid) {
|
|
6329
|
-
if (url.indexOf('?') > -1) {
|
|
6330
|
-
url += "&appId=".concat(urlParams.appid);
|
|
6331
|
-
} else {
|
|
6332
|
-
url += "?appId=".concat(urlParams.appid);
|
|
6333
6377
|
}
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
if (hasPlanParams(planParams) && postParams.current_data) {
|
|
6337
|
-
postParams.current_data = tranlateCurrentData(postParams.current_data, planParams);
|
|
6338
|
-
}
|
|
6339
|
-
|
|
6340
|
-
return new Promise(function (resolve, reject) {
|
|
6341
|
-
request({
|
|
6342
|
-
baseURL: baseURL,
|
|
6343
|
-
url: url,
|
|
6344
|
-
method: 'POST',
|
|
6345
|
-
urlParams: urlParams,
|
|
6346
|
-
data: postParams
|
|
6347
|
-
}).then(function (res) {
|
|
6348
|
-
if (res.code === 200) {
|
|
6349
|
-
// if (postParams && !postParams.current_data) {
|
|
6350
|
-
// let data = JSON.parse(JSON.stringify(res.data));
|
|
6351
|
-
// postParams.current_data = data.current_data
|
|
6352
|
-
// // 重新试算
|
|
6353
|
-
// checkInsureCalculate(urlParams, postParams, planParams)
|
|
6354
|
-
// }
|
|
6355
|
-
resolve({
|
|
6356
|
-
code: 200,
|
|
6357
|
-
data: res.data
|
|
6358
|
-
});
|
|
6359
|
-
} else {
|
|
6360
|
-
reject(res);
|
|
6361
|
-
}
|
|
6362
|
-
}).catch(function (err) {
|
|
6363
|
-
reject(err);
|
|
6364
|
-
});
|
|
6365
|
-
});
|
|
6378
|
+
return errorMsg;
|
|
6366
6379
|
}
|
|
6367
|
-
// CONCATENATED MODULE: ./packages/bxs-utils/trade/index.js
|
|
6368
|
-
|
|
6369
|
-
// CONCATENATED MODULE: ./packages/bxs-utils/index.ts
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
6380
|
|
|
6373
6381
|
|
|
6374
6382
|
/***/ }),
|
|
@@ -6554,7 +6562,7 @@ module.exports = function spread(callback) {
|
|
|
6554
6562
|
|
|
6555
6563
|
"use strict";
|
|
6556
6564
|
|
|
6557
|
-
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--1!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/form-item/title-item.vue?vue&type=template&id=
|
|
6565
|
+
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--1!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/form-item/title-item.vue?vue&type=template&id=dade21e2&
|
|
6558
6566
|
var render = function render() {
|
|
6559
6567
|
var _vm = this,
|
|
6560
6568
|
_c = _vm._self._c,
|
|
@@ -6578,7 +6586,7 @@ var render = function render() {
|
|
|
6578
6586
|
style: {
|
|
6579
6587
|
maxWidth: _vm.huomianTag ? '78%' : '100%'
|
|
6580
6588
|
}
|
|
6581
|
-
}, [_vm._v(_vm._s(_vm.label))]), _vm.
|
|
6589
|
+
}, [_vm._v(_vm._s(_vm.label))]), _vm.isShowCrmModifyButton ? _c('span', {
|
|
6582
6590
|
staticClass: "bxt-title-persion-modify",
|
|
6583
6591
|
attrs: {
|
|
6584
6592
|
"data-stat-id": _vm.dataStatId
|
|
@@ -6620,7 +6628,7 @@ var render = function render() {
|
|
|
6620
6628
|
|
|
6621
6629
|
var staticRenderFns = [];
|
|
6622
6630
|
|
|
6623
|
-
// CONCATENATED MODULE: ./packages/components/form-item/title-item.vue?vue&type=template&id=
|
|
6631
|
+
// CONCATENATED MODULE: ./packages/components/form-item/title-item.vue?vue&type=template&id=dade21e2&
|
|
6624
6632
|
|
|
6625
6633
|
// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js
|
|
6626
6634
|
var tslib_es6 = __webpack_require__(0);
|
|
@@ -6635,8 +6643,12 @@ var vue_property_decorator = __webpack_require__(2);
|
|
|
6635
6643
|
// EXTERNAL MODULE: external {"root":"bxs","commonjs":"bxs-ui-vue","commonjs2":"bxs-ui-vue","amd":"bxs-ui-vue"}
|
|
6636
6644
|
var external_root_bxs_commonjs_bxs_ui_vue_commonjs2_bxs_ui_vue_amd_bxs_ui_vue_ = __webpack_require__(3);
|
|
6637
6645
|
|
|
6646
|
+
// EXTERNAL MODULE: ./packages/bxs-utils/index.ts + 3 modules
|
|
6647
|
+
var bxs_utils = __webpack_require__(6);
|
|
6648
|
+
|
|
6638
6649
|
// CONCATENATED MODULE: ./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/form-item/title-item.vue?vue&type=script&lang=ts&
|
|
6639
|
-
var
|
|
6650
|
+
var title_itemvue_type_script_lang_ts_a;
|
|
6651
|
+
|
|
6640
6652
|
|
|
6641
6653
|
|
|
6642
6654
|
|
|
@@ -6651,6 +6663,15 @@ var title_itemvue_type_script_lang_ts_BxtTitleItem = (function (_super) {
|
|
|
6651
6663
|
BxtTitleItem.prototype.watchValue = function (val) {
|
|
6652
6664
|
this.currentValue = val;
|
|
6653
6665
|
};
|
|
6666
|
+
Object.defineProperty(BxtTitleItem.prototype, "isShowCrmModifyButton", {
|
|
6667
|
+
get: function () {
|
|
6668
|
+
var _a = this, value = _a.value, personData = _a.personData, isShowCrmPerson = _a.isShowCrmPerson;
|
|
6669
|
+
var personInfo = Object(bxs_utils["convertEleOrderListToObj"])(personData);
|
|
6670
|
+
return isShowCrmPerson && value && (personData.key === 'insuredInfo' || !personInfo.applicantAndInsuredSame);
|
|
6671
|
+
},
|
|
6672
|
+
enumerable: false,
|
|
6673
|
+
configurable: true
|
|
6674
|
+
});
|
|
6654
6675
|
BxtTitleItem.prototype.created = function () {
|
|
6655
6676
|
this.currentValue = this.value;
|
|
6656
6677
|
};
|
|
@@ -6666,6 +6687,12 @@ var title_itemvue_type_script_lang_ts_BxtTitleItem = (function (_super) {
|
|
|
6666
6687
|
Object(vue_property_decorator["b" /* Model */])('input', {}),
|
|
6667
6688
|
Object(tslib_es6["f" /* __metadata */])("design:type", Boolean)
|
|
6668
6689
|
], BxtTitleItem.prototype, "value", void 0);
|
|
6690
|
+
Object(tslib_es6["c" /* __decorate */])([
|
|
6691
|
+
Object(vue_property_decorator["c" /* Prop */])({
|
|
6692
|
+
default: {}
|
|
6693
|
+
}),
|
|
6694
|
+
Object(tslib_es6["f" /* __metadata */])("design:type", Object)
|
|
6695
|
+
], BxtTitleItem.prototype, "personData", void 0);
|
|
6669
6696
|
Object(tslib_es6["c" /* __decorate */])([
|
|
6670
6697
|
Object(vue_property_decorator["c" /* Prop */])({
|
|
6671
6698
|
default: false
|
|
@@ -6720,9 +6747,9 @@ var title_itemvue_type_script_lang_ts_BxtTitleItem = (function (_super) {
|
|
|
6720
6747
|
BxtTitleItem = Object(tslib_es6["c" /* __decorate */])([
|
|
6721
6748
|
Object(vue_property_decorator["a" /* Component */])({
|
|
6722
6749
|
name: 'BxtTitleItem',
|
|
6723
|
-
components: (
|
|
6724
|
-
|
|
6725
|
-
|
|
6750
|
+
components: (title_itemvue_type_script_lang_ts_a = {},
|
|
6751
|
+
title_itemvue_type_script_lang_ts_a[external_root_bxs_commonjs_bxs_ui_vue_commonjs2_bxs_ui_vue_amd_bxs_ui_vue_["Checkbox"].name] = external_root_bxs_commonjs_bxs_ui_vue_commonjs2_bxs_ui_vue_amd_bxs_ui_vue_["Checkbox"],
|
|
6752
|
+
title_itemvue_type_script_lang_ts_a)
|
|
6726
6753
|
})
|
|
6727
6754
|
], BxtTitleItem);
|
|
6728
6755
|
return BxtTitleItem;
|
|
@@ -6731,8 +6758,8 @@ var title_itemvue_type_script_lang_ts_BxtTitleItem = (function (_super) {
|
|
|
6731
6758
|
|
|
6732
6759
|
// CONCATENATED MODULE: ./packages/components/form-item/title-item.vue?vue&type=script&lang=ts&
|
|
6733
6760
|
/* harmony default export */ var form_item_title_itemvue_type_script_lang_ts_ = (title_itemvue_type_script_lang_ts_);
|
|
6734
|
-
// EXTERNAL MODULE: ./packages/components/form-item/title-item.vue?vue&type=style&index=0&id=
|
|
6735
|
-
var
|
|
6761
|
+
// EXTERNAL MODULE: ./packages/components/form-item/title-item.vue?vue&type=style&index=0&id=dade21e2&prod&lang=postcss&
|
|
6762
|
+
var title_itemvue_type_style_index_0_id_dade21e2_prod_lang_postcss_ = __webpack_require__(172);
|
|
6736
6763
|
|
|
6737
6764
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
6738
6765
|
var componentNormalizer = __webpack_require__(8);
|
|
@@ -6891,6 +6918,7 @@ function initPersonData(inputData, verifyData) {
|
|
|
6891
6918
|
return;
|
|
6892
6919
|
}
|
|
6893
6920
|
person.createArchive = person.createArchive || false;
|
|
6921
|
+
person.cid = person.cid || null;
|
|
6894
6922
|
if (!person.eleOrderList.find(function (e) { return e.key === 'name'; })) {
|
|
6895
6923
|
person.eleOrderList.splice(1, 0, {
|
|
6896
6924
|
key: 'name',
|
|
@@ -7040,9 +7068,7 @@ function personDataHandler(allPersonsData) {
|
|
|
7040
7068
|
if (['title', 'applicantAndInsuredSame'].includes(ele.key)) {
|
|
7041
7069
|
return;
|
|
7042
7070
|
}
|
|
7043
|
-
|
|
7044
|
-
person.cid = applicantSame_1.value ? insuredData.cid : undefined;
|
|
7045
|
-
}
|
|
7071
|
+
person.cid = applicantSame_1.value ? insuredData.cid : person.cid;
|
|
7046
7072
|
if (applicantSame_1.value && insuredData.eleOrderList) {
|
|
7047
7073
|
var insuredEle = insuredData.eleOrderList.find(function (e) { return e.key === ele.key; });
|
|
7048
7074
|
if (insuredEle) {
|