bxs-tools-ui 1.0.21 → 1.0.25
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/business-card/index.js +2 -2
- package/lib/bxs-utils/index.js +4 -3
- package/lib/canvas-poster/index.js +2 -2
- package/lib/index.css +2 -2
- package/lib/index.js +101 -115
- package/lib/insure-calculate/index.css +1 -1
- package/lib/insure-calculate/index.js +31 -61
- package/lib/person-info/index.css +1 -1
- package/lib/person-info/index.js +45 -21
- package/lib/product-info/index.css +1 -1
- package/lib/product-info/index.js +19 -24
- package/package.json +5 -15
- package/packages/business-card/demo/index.vue +2 -8
- package/packages/business-card/index.vue +6 -28
- package/packages/bxs-utils/planbook/common.js +2 -4
- package/packages/bxs-utils/planbook/insurance.js +16 -62
- package/packages/bxs-utils/planbook/person.js +22 -74
- package/packages/bxs-utils/planbook/product.js +65 -233
- package/packages/bxs-utils/trade/insureCalculate.js +11 -43
- package/packages/canvas-poster/demo/index.vue +2 -7
- package/packages/canvas-poster/index.vue +5 -37
- package/packages/components/form-item/select-item.vue +5 -17
- package/packages/components/form-item/title-item.vue +3 -8
- package/packages/insure-calculate/demo/index.vue +1 -4
- package/packages/insure-calculate/index.vue +52 -183
- package/packages/person-info/index.vue +35 -21
- package/packages/planbook-input/components/footer.vue +1 -2
- package/packages/planbook-input/components/product-table.vue +7 -17
- package/packages/planbook-input/helper.js +19 -75
- package/packages/planbook-input/index.vue +8 -28
- package/packages/product-info/demo/index.vue +2 -12
- package/packages/product-info/index.vue +8 -31
- package/src/js/md5Token.js +6 -8
- package/src/js/request.js +11 -9
- package/src/js/utils.js +3 -7
|
@@ -30,9 +30,7 @@ export function initPageData(data) {
|
|
|
30
30
|
if (group.prodOrderList) {
|
|
31
31
|
group.prodOrderList.forEach(prod => {
|
|
32
32
|
initProductData(prod);
|
|
33
|
-
productDataHandler(prod,
|
|
34
|
-
data.verifyData[prod.key],
|
|
35
|
-
inputData.personData);
|
|
33
|
+
productDataHandler(prod, data.verifyData[prod.key], inputData.personData);
|
|
36
34
|
});
|
|
37
35
|
}
|
|
38
36
|
});
|
|
@@ -107,16 +105,9 @@ export function setPageDataBaseOnResult(data) {
|
|
|
107
105
|
let calMethod = ins.eleOrderList.find(e => e.key === 'calMethod');
|
|
108
106
|
let baoe = ins.eleOrderList.find(e => e.key === 'baoe');
|
|
109
107
|
let baof = ins.eleOrderList.find(e => e.key === 'baof');
|
|
110
|
-
if (
|
|
111
|
-
calMethod
|
|
112
|
-
|
|
113
|
-
baof &&
|
|
114
|
-
eInsuranceData.calMethod
|
|
115
|
-
) {
|
|
116
|
-
baoe.isHide =
|
|
117
|
-
eInsuranceData.calMethod !== 'baoe2baof';
|
|
118
|
-
baof.isHide =
|
|
119
|
-
eInsuranceData.calMethod === 'baoe2baof';
|
|
108
|
+
if (calMethod && baoe && baof && eInsuranceData.calMethod) {
|
|
109
|
+
baoe.isHide = eInsuranceData.calMethod !== 'baoe2baof';
|
|
110
|
+
baof.isHide = eInsuranceData.calMethod === 'baoe2baof';
|
|
120
111
|
}
|
|
121
112
|
ins.eleOrderList.forEach(ele => {
|
|
122
113
|
if (eInsuranceData[ele.key]) {
|
|
@@ -159,12 +150,7 @@ export function setPageDataBaseOnResult(data) {
|
|
|
159
150
|
}
|
|
160
151
|
|
|
161
152
|
export function createdProductDataToCalc(inputData, options = {}) {
|
|
162
|
-
if (
|
|
163
|
-
inputData &&
|
|
164
|
-
inputData.personData &&
|
|
165
|
-
inputData.productGroupList &&
|
|
166
|
-
inputData.productGroupList.length
|
|
167
|
-
) {
|
|
153
|
+
if (inputData && inputData.personData && inputData.productGroupList && inputData.productGroupList.length) {
|
|
168
154
|
let productData = getProductFromInputData(inputData, {
|
|
169
155
|
groupKey: options.groupKey,
|
|
170
156
|
productKey: options.productKey
|
|
@@ -181,15 +167,7 @@ export function createdProductDataToCalc(inputData, options = {}) {
|
|
|
181
167
|
productForm.mulInsOrderList = productForm.mulInsOrderList.map(ins => {
|
|
182
168
|
let tempIns = {};
|
|
183
169
|
for (let k in ins) {
|
|
184
|
-
if (
|
|
185
|
-
[
|
|
186
|
-
'isFollowing',
|
|
187
|
-
'pPeriodDesc',
|
|
188
|
-
'baoeDesc',
|
|
189
|
-
'baofDesc',
|
|
190
|
-
'iDurationDesc'
|
|
191
|
-
].indexOf(k) === -1
|
|
192
|
-
) {
|
|
170
|
+
if (['isFollowing', 'pPeriodDesc', 'baoeDesc', 'baofDesc', 'iDurationDesc'].indexOf(k) === -1) {
|
|
193
171
|
tempIns[k] = ins[k];
|
|
194
172
|
}
|
|
195
173
|
}
|
|
@@ -198,11 +176,7 @@ export function createdProductDataToCalc(inputData, options = {}) {
|
|
|
198
176
|
}
|
|
199
177
|
|
|
200
178
|
// 产品是否有选中的险种
|
|
201
|
-
if (
|
|
202
|
-
productForm &&
|
|
203
|
-
productForm.mulInsOrderList &&
|
|
204
|
-
productForm.mulInsOrderList.length
|
|
205
|
-
) {
|
|
179
|
+
if (productForm && productForm.mulInsOrderList && productForm.mulInsOrderList.length) {
|
|
206
180
|
let errorMsg = verifyProductRules({
|
|
207
181
|
personData: inputData.personData,
|
|
208
182
|
productData
|
|
@@ -278,22 +252,13 @@ export function receiveProductData(inputData, rProductData, options = {}) {
|
|
|
278
252
|
productData.mulInsOrderList.forEach(ins => {
|
|
279
253
|
if (ins.isGroup) {
|
|
280
254
|
let groupInsData = convertEleOrderListToObj(ins);
|
|
281
|
-
let insuranceId = groupInsData.isCheckbox
|
|
282
|
-
? groupInsData.insuranceId[0]
|
|
283
|
-
: groupInsData.insuranceId;
|
|
255
|
+
let insuranceId = groupInsData.isCheckbox ? groupInsData.insuranceId[0] : groupInsData.insuranceId;
|
|
284
256
|
let checkedIns = productData.mulInsOrderList.find(i => i.key === insuranceId);
|
|
285
257
|
for (let key in checkedIns) {
|
|
286
258
|
if (
|
|
287
|
-
[
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
'eleOrderList',
|
|
291
|
-
'groupKey',
|
|
292
|
-
'groupName',
|
|
293
|
-
'huomian',
|
|
294
|
-
'key',
|
|
295
|
-
'name'
|
|
296
|
-
].indexOf(key) === -1
|
|
259
|
+
['allowSamePerson', 'code', 'eleOrderList', 'groupKey', 'groupName', 'huomian', 'key', 'name'].indexOf(
|
|
260
|
+
key
|
|
261
|
+
) === -1
|
|
297
262
|
) {
|
|
298
263
|
ins[key] = checkedIns[key];
|
|
299
264
|
}
|
|
@@ -317,9 +282,7 @@ export function receiveProductData(inputData, rProductData, options = {}) {
|
|
|
317
282
|
insShowArr.push([
|
|
318
283
|
ins.name,
|
|
319
284
|
ins.showPlanDesc ? ins.planDesc : ins.baoeDesc || '-',
|
|
320
|
-
ins.baofDesc === 0 || ins.baofDesc === '0' || ins.baofDesc
|
|
321
|
-
? ins.baof
|
|
322
|
-
: '-',
|
|
285
|
+
ins.baofDesc === 0 || ins.baofDesc === '0' || ins.baofDesc ? ins.baof : '-',
|
|
323
286
|
ins.pPeriodDesc
|
|
324
287
|
]);
|
|
325
288
|
}
|
|
@@ -358,14 +321,10 @@ export function defaultProductData(eleOrderList) {
|
|
|
358
321
|
}
|
|
359
322
|
|
|
360
323
|
export function createPlanbookDataToMake(planbookData = {}, options = {}) {
|
|
361
|
-
let inputData =
|
|
362
|
-
|
|
363
|
-
let productGroup =
|
|
364
|
-
inputData.productGroupList && inputData.productGroupList[0];
|
|
324
|
+
let inputData = planbookData && planbookData.initData && planbookData.initData.inputData;
|
|
325
|
+
let productGroup = inputData.productGroupList && inputData.productGroupList[0];
|
|
365
326
|
let hadChoiceProducts =
|
|
366
|
-
productGroup &&
|
|
367
|
-
productGroup.prodOrderList &&
|
|
368
|
-
productGroup.prodOrderList.some(ele => !!ele.hadChoice && !ele.hide);
|
|
327
|
+
productGroup && productGroup.prodOrderList && productGroup.prodOrderList.some(ele => !!ele.hadChoice && !ele.hide);
|
|
369
328
|
if (hadChoiceProducts) {
|
|
370
329
|
let resultData = {
|
|
371
330
|
...options,
|
|
@@ -400,20 +359,12 @@ export function createPlanbookDataToMake(planbookData = {}, options = {}) {
|
|
|
400
359
|
refInsuranceData = arr.find(e => e.key === ins.refInsuranceId);
|
|
401
360
|
}
|
|
402
361
|
}
|
|
403
|
-
if (
|
|
404
|
-
refInsuranceData &&
|
|
405
|
-
refInsuranceData.eleOrderList &&
|
|
406
|
-
ins.eleOrderList
|
|
407
|
-
) {
|
|
362
|
+
if (refInsuranceData && refInsuranceData.eleOrderList && ins.eleOrderList) {
|
|
408
363
|
ins.eleOrderList.forEach(ele => {
|
|
409
364
|
let refElementData = refInsuranceData.eleOrderList.find(e => e.key === ele.key);
|
|
410
365
|
if (
|
|
411
366
|
['title', 'calMethod', 'customRate', 'company'].indexOf(ele.key) === -1 &&
|
|
412
|
-
(!ele.isHide ||
|
|
413
|
-
(ele.isHide &&
|
|
414
|
-
!ele.isDisabled &&
|
|
415
|
-
refElementData &&
|
|
416
|
-
!refElementData.isHide))
|
|
367
|
+
(!ele.isHide || (ele.isHide && !ele.isDisabled && refElementData && !refElementData.isHide))
|
|
417
368
|
) {
|
|
418
369
|
ins.eleOrderInResult.push({
|
|
419
370
|
value: ele.key,
|
|
@@ -426,11 +377,7 @@ export function createPlanbookDataToMake(planbookData = {}, options = {}) {
|
|
|
426
377
|
|
|
427
378
|
let productData = convertProductData(prod);
|
|
428
379
|
productData.mulInsOrderList.forEach(ins => {
|
|
429
|
-
if (
|
|
430
|
-
ins.huomian == 'shuangHuomian' &&
|
|
431
|
-
ins.shmInsData &&
|
|
432
|
-
ins.shmInsData.title
|
|
433
|
-
) {
|
|
380
|
+
if (ins.huomian == 'shuangHuomian' && ins.shmInsData && ins.shmInsData.title) {
|
|
434
381
|
productData.mulInsOrderList.push(ins.shmInsData);
|
|
435
382
|
}
|
|
436
383
|
});
|
|
@@ -449,10 +396,7 @@ export function getProductFromInputData(inputData, options = {}) {
|
|
|
449
396
|
let product = null;
|
|
450
397
|
if (inputData.productGroupList && inputData.productGroupList.length) {
|
|
451
398
|
let groupData = inputData.productGroupList.find(g => g.key === options.groupKey);
|
|
452
|
-
product =
|
|
453
|
-
groupData &&
|
|
454
|
-
groupData.prodOrderList &&
|
|
455
|
-
groupData.prodOrderList.find(p => p.key === options.productKey);
|
|
399
|
+
product = groupData && groupData.prodOrderList && groupData.prodOrderList.find(p => p.key === options.productKey);
|
|
456
400
|
}
|
|
457
401
|
return product;
|
|
458
402
|
}
|
|
@@ -28,10 +28,7 @@
|
|
|
28
28
|
</template>
|
|
29
29
|
</template>
|
|
30
30
|
</div>
|
|
31
|
-
<InputFooter
|
|
32
|
-
:input-data="inputData"
|
|
33
|
-
@createPlanbook="createPlanbook(planbookData)"
|
|
34
|
-
></InputFooter>
|
|
31
|
+
<InputFooter :input-data="inputData" @createPlanbook="createPlanbook(planbookData)"></InputFooter>
|
|
35
32
|
</div>
|
|
36
33
|
</template>
|
|
37
34
|
<script lang="ts">
|
|
@@ -67,11 +64,7 @@ export default class BxtPlanbookInput extends Vue {
|
|
|
67
64
|
planbookData: any = null;
|
|
68
65
|
// 计算属性
|
|
69
66
|
get inputData() {
|
|
70
|
-
return
|
|
71
|
-
this.planbookData &&
|
|
72
|
-
this.planbookData.initData &&
|
|
73
|
-
this.planbookData.initData.inputData
|
|
74
|
-
);
|
|
67
|
+
return this.planbookData && this.planbookData.initData && this.planbookData.initData.inputData;
|
|
75
68
|
}
|
|
76
69
|
created() {
|
|
77
70
|
if (!this.URL_PARAM.planbookId) {
|
|
@@ -82,16 +75,13 @@ export default class BxtPlanbookInput extends Vue {
|
|
|
82
75
|
getUrlParam() {
|
|
83
76
|
let urlParam: any = QS.parse(`${location.href.split('?')[1]}`) || {};
|
|
84
77
|
if (!urlParam.uuid && localStorage.getItem('intellectScheme')) {
|
|
85
|
-
urlParam.uuid = JSON.parse(localStorage.getItem('intellectScheme') || '')[
|
|
86
|
-
's' + urlParam.planbookId
|
|
87
|
-
];
|
|
78
|
+
urlParam.uuid = JSON.parse(localStorage.getItem('intellectScheme') || '')['s' + urlParam.planbookId];
|
|
88
79
|
}
|
|
89
80
|
return urlParam;
|
|
90
81
|
}
|
|
91
82
|
|
|
92
83
|
getPlanbookData() {
|
|
93
84
|
Request({
|
|
94
|
-
baseURL: '//app.winbaoxian.cn',
|
|
95
85
|
url: `/planBook/V2/getInitData`,
|
|
96
86
|
method: 'get',
|
|
97
87
|
params: {
|
|
@@ -104,10 +94,7 @@ export default class BxtPlanbookInput extends Vue {
|
|
|
104
94
|
setPageDataBaseOnResult(res.data);
|
|
105
95
|
this.planbookData = res.data;
|
|
106
96
|
document.title = `DEMO:${this.planbookData.title}`; //更新页面标题
|
|
107
|
-
if (
|
|
108
|
-
window.appBridge &&
|
|
109
|
-
window.appBridge.checkAppFeature('CHANGE_WEBVIEW_TITLE')
|
|
110
|
-
) {
|
|
97
|
+
if (window.appBridge && window.appBridge.checkAppFeature('CHANGE_WEBVIEW_TITLE')) {
|
|
111
98
|
window.appBridge.changeWebviewTitle(document.title);
|
|
112
99
|
}
|
|
113
100
|
this.autoImportData();
|
|
@@ -184,7 +171,6 @@ export default class BxtPlanbookInput extends Vue {
|
|
|
184
171
|
}
|
|
185
172
|
}
|
|
186
173
|
return Request({
|
|
187
|
-
baseURL: '//app.winbaoxian.cn',
|
|
188
174
|
url: `/planBook/V2/calculate`,
|
|
189
175
|
method: 'post',
|
|
190
176
|
data: QS.stringify(calcData)
|
|
@@ -209,8 +195,7 @@ export default class BxtPlanbookInput extends Vue {
|
|
|
209
195
|
});
|
|
210
196
|
}
|
|
211
197
|
createPlanbook(planbookData: any): any {
|
|
212
|
-
let inputData: any =
|
|
213
|
-
planbookData && planbookData.initData && planbookData.initData.inputData;
|
|
198
|
+
let inputData: any = planbookData && planbookData.initData && planbookData.initData.inputData;
|
|
214
199
|
let options: any = {
|
|
215
200
|
pbType: this.URL_PARAM.pbType,
|
|
216
201
|
insuranceTypeId: this.URL_PARAM.planbookId * 1,
|
|
@@ -220,7 +205,6 @@ export default class BxtPlanbookInput extends Vue {
|
|
|
220
205
|
let resultData = createPlanbookDataToMake(this.planbookData, options);
|
|
221
206
|
if (resultData) {
|
|
222
207
|
return Request({
|
|
223
|
-
baseURL: '//app.winbaoxian.cn',
|
|
224
208
|
url: `/planBook/V2/uploadResult`,
|
|
225
209
|
method: 'post',
|
|
226
210
|
data: QS.stringify({
|
|
@@ -234,8 +218,7 @@ export default class BxtPlanbookInput extends Vue {
|
|
|
234
218
|
? JSON.parse(localStorage.getItem('intellectScheme') || '')
|
|
235
219
|
: {};
|
|
236
220
|
intellectScheme['s' + options.insuranceTypeId] = res.data;
|
|
237
|
-
localStorage.setItem('intellectScheme',
|
|
238
|
-
JSON.stringify(intellectScheme));
|
|
221
|
+
localStorage.setItem('intellectScheme', JSON.stringify(intellectScheme));
|
|
239
222
|
|
|
240
223
|
//5.12跳转结果页不加nw。By Lizhao @2020.04.22
|
|
241
224
|
let nw: string = '1';
|
|
@@ -247,15 +230,12 @@ export default class BxtPlanbookInput extends Vue {
|
|
|
247
230
|
) {
|
|
248
231
|
nw = '';
|
|
249
232
|
}
|
|
250
|
-
let recipientData = convertPersonData(inputData.personData,
|
|
251
|
-
'recipientInfo');
|
|
233
|
+
let recipientData = convertPersonData(inputData.personData, 'recipientInfo');
|
|
252
234
|
let urlParam = QS.stringify({
|
|
253
235
|
nw,
|
|
254
236
|
theme: inputData.theme,
|
|
255
237
|
uuid: res.data,
|
|
256
|
-
coverImg:
|
|
257
|
-
recipientData &&
|
|
258
|
-
(recipientData.coverId === 1 ? undefined : recipientData.coverImg)
|
|
238
|
+
coverImg: recipientData && (recipientData.coverId === 1 ? undefined : recipientData.coverImg)
|
|
259
239
|
});
|
|
260
240
|
location.href = `http://pbf.winbaoxian.${
|
|
261
241
|
0 ? 'com' : 'cn'
|
|
@@ -232,12 +232,7 @@ export default class ProductInfoDemo extends Vue {
|
|
|
232
232
|
labelName: '保额',
|
|
233
233
|
value: 300000,
|
|
234
234
|
key: 'baoe',
|
|
235
|
-
compareItem: [
|
|
236
|
-
'18753.baoe',
|
|
237
|
-
'>=',
|
|
238
|
-
'18477.baoe',
|
|
239
|
-
'豁免险保额不大于主险保额'
|
|
240
|
-
]
|
|
235
|
+
compareItem: ['18753.baoe', '>=', '18477.baoe', '豁免险保额不大于主险保额']
|
|
241
236
|
}
|
|
242
237
|
],
|
|
243
238
|
feeType: 'baoe2baof',
|
|
@@ -527,12 +522,7 @@ export default class ProductInfoDemo extends Vue {
|
|
|
527
522
|
labelName: '保额',
|
|
528
523
|
value: 55000,
|
|
529
524
|
key: 'baoe',
|
|
530
|
-
compareItem: [
|
|
531
|
-
'18753.baoe',
|
|
532
|
-
'>=',
|
|
533
|
-
'18477.baoe',
|
|
534
|
-
'豁免险保额不大于主险保额'
|
|
535
|
-
],
|
|
525
|
+
compareItem: ['18753.baoe', '>=', '18477.baoe', '豁免险保额不大于主险保额'],
|
|
536
526
|
placeholder: '请输入保额',
|
|
537
527
|
isIgnoreValidate: null,
|
|
538
528
|
rules: [
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="bxt-product-info"
|
|
4
|
-
v-if="productData && productData.mulInsOrderList"
|
|
5
|
-
>
|
|
2
|
+
<div class="bxt-product-info" v-if="productData && productData.mulInsOrderList">
|
|
6
3
|
<template v-for="ins in filterInsuranceList">
|
|
7
4
|
<bxs-form
|
|
8
5
|
:ref="`insuranceForm${ins.key}`"
|
|
@@ -58,10 +55,7 @@
|
|
|
58
55
|
:rules="ele.rules"
|
|
59
56
|
:ignoreValidate="isIgnoreValidate(ins, ele)"
|
|
60
57
|
>
|
|
61
|
-
<bxs-radio-group
|
|
62
|
-
v-model="ele.value"
|
|
63
|
-
@change="$nextTick(() => change({ ins, ele, type: 'change' }))"
|
|
64
|
-
>
|
|
58
|
+
<bxs-radio-group v-model="ele.value" @change="$nextTick(() => change({ ins, ele, type: 'change' }))">
|
|
65
59
|
<template v-for="opt in ele.opts">
|
|
66
60
|
<bxs-radio
|
|
67
61
|
:key="opt.val"
|
|
@@ -83,10 +77,7 @@
|
|
|
83
77
|
:rules="ele.rules"
|
|
84
78
|
:ignoreValidate="isIgnoreValidate(ins, ele)"
|
|
85
79
|
>
|
|
86
|
-
<bxs-radio-group
|
|
87
|
-
v-model="ele.value"
|
|
88
|
-
@change="$nextTick(() => change({ ins, ele, type: 'change' }))"
|
|
89
|
-
>
|
|
80
|
+
<bxs-radio-group v-model="ele.value" @change="$nextTick(() => change({ ins, ele, type: 'change' }))">
|
|
90
81
|
<template v-for="opt in ele.opts">
|
|
91
82
|
<bxs-radio
|
|
92
83
|
:id="`${productData.key}_${ins.key}_${ele.key}_${opt.val}`"
|
|
@@ -117,11 +108,7 @@
|
|
|
117
108
|
:ele-data="ele"
|
|
118
109
|
:placeholder="ele.placeholder"
|
|
119
110
|
:title="ele.label"
|
|
120
|
-
:options="
|
|
121
|
-
ele.opts.filter(
|
|
122
|
-
o => !o.isHide && !o.isDisabled && !o.isInvalid
|
|
123
|
-
)
|
|
124
|
-
"
|
|
111
|
+
:options="ele.opts.filter(o => !o.isHide && !o.isDisabled && !o.isInvalid)"
|
|
125
112
|
:disabled="isDisabled(ele)"
|
|
126
113
|
:right-icon="isDisabled(ele) ? '' : 'arrow-right'"
|
|
127
114
|
@change="$nextTick(() => change({ ins, ele, type: 'change' }))"
|
|
@@ -136,10 +123,7 @@
|
|
|
136
123
|
<script lang="ts">
|
|
137
124
|
import Vue from 'vue';
|
|
138
125
|
import { Component, Prop } from 'vue-property-decorator';
|
|
139
|
-
import {
|
|
140
|
-
productDataHandler,
|
|
141
|
-
verifyProductRules
|
|
142
|
-
} from 'packages/bxs-utils/index.js';
|
|
126
|
+
import { productDataHandler, verifyProductRules } from 'packages/bxs-utils/index.js';
|
|
143
127
|
import SelectItem from 'packages/components/form-item/select-item.vue';
|
|
144
128
|
import TitleItem from 'packages/components/form-item/title-item.vue';
|
|
145
129
|
|
|
@@ -208,10 +192,7 @@ export default class BxtProductInfo extends Vue {
|
|
|
208
192
|
return productForm;
|
|
209
193
|
}
|
|
210
194
|
get filterInsuranceList() {
|
|
211
|
-
return (
|
|
212
|
-
this.productData &&
|
|
213
|
-
this.productData.mulInsOrderList.filter(ins => !ins.groupKey)
|
|
214
|
-
);
|
|
195
|
+
return this.productData && this.productData.mulInsOrderList.filter(ins => !ins.groupKey);
|
|
215
196
|
}
|
|
216
197
|
|
|
217
198
|
created() {
|
|
@@ -234,9 +215,7 @@ export default class BxtProductInfo extends Vue {
|
|
|
234
215
|
);
|
|
235
216
|
}
|
|
236
217
|
changeProduct(productData, options) {
|
|
237
|
-
productDataHandler(productData,
|
|
238
|
-
this.verifyData && this.verifyData[productData.key],
|
|
239
|
-
this.personData);
|
|
218
|
+
productDataHandler(productData, this.verifyData && this.verifyData[productData.key], this.personData);
|
|
240
219
|
return verifyProductRules({
|
|
241
220
|
personData: this.personData,
|
|
242
221
|
productData,
|
|
@@ -256,9 +235,7 @@ export default class BxtProductInfo extends Vue {
|
|
|
256
235
|
);
|
|
257
236
|
}
|
|
258
237
|
isDisabled(ele) {
|
|
259
|
-
let opts =
|
|
260
|
-
ele.opts &&
|
|
261
|
-
ele.opts.filter(o => !o.isHide && !o.isDisabled && !o.isInvalid);
|
|
238
|
+
let opts = ele.opts && ele.opts.filter(o => !o.isHide && !o.isDisabled && !o.isInvalid);
|
|
262
239
|
return ele.isDisabled || opts.length <= 1;
|
|
263
240
|
}
|
|
264
241
|
isIgnoreValidate(ins, ele) {
|
package/src/js/md5Token.js
CHANGED
|
@@ -11,12 +11,8 @@ export function createMd5Token(reqData) {
|
|
|
11
11
|
signInfo.insuredAge = personList[0].age * 1;
|
|
12
12
|
signInfo.insuredSex = personList[0].sex * 1;
|
|
13
13
|
if (personList[1]) {
|
|
14
|
-
signInfo.applicantAge = isNaN(personList[1].age * 1)
|
|
15
|
-
|
|
16
|
-
: personList[1].age * 1;
|
|
17
|
-
signInfo.applicantSex = isNaN(personList[1].sex * 1)
|
|
18
|
-
? 0
|
|
19
|
-
: personList[1].sex * 1;
|
|
14
|
+
signInfo.applicantAge = isNaN(personList[1].age * 1) ? 0 : personList[1].age * 1;
|
|
15
|
+
signInfo.applicantSex = isNaN(personList[1].sex * 1) ? 0 : personList[1].sex * 1;
|
|
20
16
|
}
|
|
21
17
|
|
|
22
18
|
let productKeys = [];
|
|
@@ -61,7 +57,8 @@ export function createMd5Token(reqData) {
|
|
|
61
57
|
// }))
|
|
62
58
|
|
|
63
59
|
return (
|
|
64
|
-
CryptoJS.AES.encrypt(
|
|
60
|
+
CryptoJS.AES.encrypt(
|
|
61
|
+
JSON.stringify({
|
|
65
62
|
...signInfo,
|
|
66
63
|
signMd5: MD5(signInfoTx)
|
|
67
64
|
}),
|
|
@@ -69,7 +66,8 @@ export function createMd5Token(reqData) {
|
|
|
69
66
|
{
|
|
70
67
|
mode: CryptoJS.mode.ECB,
|
|
71
68
|
padding: CryptoJS.pad.Pkcs7
|
|
72
|
-
}
|
|
69
|
+
}
|
|
70
|
+
).toString() ||
|
|
73
71
|
MD5(signInfoTx) ||
|
|
74
72
|
'20190929'
|
|
75
73
|
);
|
package/src/js/request.js
CHANGED
|
@@ -6,11 +6,9 @@ const BASE_API = (() => {
|
|
|
6
6
|
if (location.hostname.search(/pbf\.winbaoxian\.com/) !== -1) {
|
|
7
7
|
env = 'https://app.winbaoxian.com';
|
|
8
8
|
} else if (location.hostname.search(/pbf\.winbaoxian\.cn/) !== -1) {
|
|
9
|
-
env = '
|
|
10
|
-
} else if (
|
|
11
|
-
|
|
12
|
-
) {
|
|
13
|
-
env = '//app.winbaoxian.cn';
|
|
9
|
+
env = 'https://app.winbaoxian.cn';
|
|
10
|
+
} else if (location.hostname.search(/127\.0\.0\.1|192\.168|localhost/) !== -1) {
|
|
11
|
+
env = 'https://app.winbaoxian.cn';
|
|
14
12
|
}
|
|
15
13
|
return env;
|
|
16
14
|
})();
|
|
@@ -37,7 +35,8 @@ const loading = show => {
|
|
|
37
35
|
};
|
|
38
36
|
|
|
39
37
|
// request拦截器
|
|
40
|
-
service.interceptors.request.use(
|
|
38
|
+
service.interceptors.request.use(
|
|
39
|
+
config => {
|
|
41
40
|
if (loadingTimer) clearTimeout(loadingTimer);
|
|
42
41
|
loadingTimer = setTimeout(() => {
|
|
43
42
|
loading(true);
|
|
@@ -48,10 +47,12 @@ service.interceptors.request.use(config => {
|
|
|
48
47
|
// Do something with request error
|
|
49
48
|
console.log(error); // for debug
|
|
50
49
|
Promise.reject(error);
|
|
51
|
-
}
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
52
|
|
|
53
53
|
// respone拦截器
|
|
54
|
-
service.interceptors.response.use(
|
|
54
|
+
service.interceptors.response.use(
|
|
55
|
+
response => {
|
|
55
56
|
if (loadingTimer) clearTimeout(loadingTimer);
|
|
56
57
|
loading(false);
|
|
57
58
|
const res = response.data;
|
|
@@ -70,6 +71,7 @@ service.interceptors.response.use(response => {
|
|
|
70
71
|
}
|
|
71
72
|
console.log('err' + error); // for debug
|
|
72
73
|
return Promise.reject(error);
|
|
73
|
-
}
|
|
74
|
+
}
|
|
75
|
+
);
|
|
74
76
|
|
|
75
77
|
export default service;
|
package/src/js/utils.js
CHANGED
|
@@ -24,9 +24,7 @@ export function getUrlParam(name, url) {
|
|
|
24
24
|
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
|
|
25
25
|
var regex = new RegExp('[\\?&]' + name + '=([^&#]*)'),
|
|
26
26
|
results = regex.exec(url ? url : location.search);
|
|
27
|
-
return results === null
|
|
28
|
-
? ''
|
|
29
|
-
: decodeURIComponent(results[1].replace(/\+/g, ' '));
|
|
27
|
+
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
|
|
30
28
|
}
|
|
31
29
|
|
|
32
30
|
// 函数:Obj深度考贝
|
|
@@ -55,8 +53,7 @@ export function deepCopy(obj, hash = new WeakMap()) {
|
|
|
55
53
|
hash.set(obj, newObj);
|
|
56
54
|
for (let key in obj) {
|
|
57
55
|
if (obj.hasOwnProperty(key)) {
|
|
58
|
-
newObj[key] =
|
|
59
|
-
typeof obj[key] === 'object' ? deepCopy(obj[key], hash) : obj[key];
|
|
56
|
+
newObj[key] = typeof obj[key] === 'object' ? deepCopy(obj[key], hash) : obj[key];
|
|
60
57
|
}
|
|
61
58
|
}
|
|
62
59
|
|
|
@@ -133,8 +130,7 @@ export function getAgeFromBirth(birth, cDate) {
|
|
|
133
130
|
var age = nowDate.getFullYear() - bDate.getFullYear();
|
|
134
131
|
if (
|
|
135
132
|
nowDate.getMonth() - bDate.getMonth() < 0 ||
|
|
136
|
-
(nowDate.getMonth() - bDate.getMonth() === 0 &&
|
|
137
|
-
nowDate.getDate() - bDate.getDate() < 0)
|
|
133
|
+
(nowDate.getMonth() - bDate.getMonth() === 0 && nowDate.getDate() - bDate.getDate() < 0)
|
|
138
134
|
) {
|
|
139
135
|
age--;
|
|
140
136
|
}
|