index.html
33.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="__TMPL__/public/assets/assets/css/weui.min.css">
<link rel="stylesheet" href="__TMPL__/public/assets/assets/css/swiper-3.4.2.min.css">
<link rel="stylesheet" href="//at.alicdn.com/t/font_970727_ql8lru7j0m.css">
<link rel="stylesheet" href="__TMPL__/public/assets/assets/css/style.css">
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/fontsize.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/jquery-2.1.0.js"></script>
<title>{$title}</title>
<style>
body {
background: #F5F7F7;
}
</style>
</head>
<body>
<a class="agree_top my_trsuttop" href="javascript:history.back(-1);">
<div class="iconfont icon-xiangzuo"></div>
<div>返回</div>
</a>
<div class="my_info" style="display:none;">
<div class="my_infoimg">
<img src="{$user.avatar}" alt="">
</div>
<div class="my_inforigth">
<div class="my_inforigthtitle">{$user.name}</div>
<div class="my_rigthtxt">
<div>编号:{$user.number}</div>
<div>托管状态:托管中</div>
</div>
<div class="my_rigthbottom">
<div>免费托管</div>
<div class="my_rigthblod">托管说明</div>
</div>
</div>
</div>
<div class="my_info">
<div class="my_infoimg">
<img src="{$user.avatar}" alt="">
</div>
<div class="my_inforigth">
<div class=" my_payinforigth">
<div class="my_inforigthtitle">{$user.name}</div>
<div class="my_rigthblod">托管说明</div>
</div>
<div class="my_payinfominitxt">编号:{$user.number}</div>
</div>
</div>
<div class="my_main">
<div class="my_miantop">
<div>保单总数
<text class="my_miannum">{$no_collocation_count}</text>
<text class="my_mian_tip">份</text>
</div>
<div>被保险人
<text class="my_miannum">{$no_people_count}</text>
<text class="my_mian_tip">人</text>
</div>
<div>本年保险支出
<text class="my_miannum">{$no_total_sum}</text>
<text class="my_mian_tip">元</text>
</div>
</div>
<div class="my_mianbox">
<div class="my_mianboxtitle">被保人保单综合分析</div>
<div class="my_miancenter">
<div>托管保单:{$yes_collocation_count}张</div>
<div>当年保费支出:{$yes_total_sum}元</div>
</div>
<div class="swiperbox">
<div class="my_main_minibox">
<div id="swiper1" >
<div class="swiper-wrapper">
<foreach name="insurer" item="vo">
<if condition="$key eq 0">
<div class="swiper-slide my_main_miniboxitem select_status my_mainactive" style="width:auto;text-align: center;">{$vo.insurer}</div>
<else/>
<div class="swiper-slide my_main_miniboxitem select_status" style="width:auto;text-align: center;">{$vo.insurer}</div>
</if>
</foreach>
</div>
</div>
</div>
<div class="iconfont icon-xiangyou "></div>
</div>
</div>
<div class="tuoguan">
<div class="tuoguan_title">
<div>所有保单</div>
<a class="tuoguantitle" href="{:url('all_guarantee/index')}">
查看所有保单
<div class="iconfont icon-xiangyou"></div>
</a>
</div>
<div class="tuoguan_cellbox">
<div class="tuoguan_cell" data-insurance-type-id="1">
<div class="tuoguancell_title">重疾</div>
<div class="mydata1">
<php>$one_collocation_type3 = [];</php>
<php>$one_collocation_type1 = [];</php>
<php>$one_collocation_type2 = [];</php>
<notempty name="$data_one">
<foreach name="$data_one" item="d_o">
<if condition="$d_o['type'] eq 3">
<php>$one_collocation_type3[]=$d_o;</php>
<elseif condition="$d_o['type'] eq 1"/>
<php>$one_collocation_type1[]=$d_o;</php>
<elseif condition="$d_o['type'] eq 2"/>
<php>$one_collocation_type2[]=$d_o;</php>
</if>
</foreach>
</notempty>
<if condition="$one_collocation_type3 neq null">
<foreach name="$data_one" item="d_o">
<if condition="$d_o['type'] eq 3">
<div class="tuoguan_celltxt">{$d_o.name}
<span class="tuoguan_cellnum">{$d_o.sum}元</span>
</div>
</if>
</foreach>
<elseif condition="$one_collocation_type2 neq null"/>
<div class="tuoguan_celltxt">保障缺失</div>
<elseif condition="$one_collocation_type1 neq null"/>
<div class="tuoguan_celltxt">未有保单</div>
<else />
<div class="tuoguan_celltxt">未有保单</div>
</if>
</div>
</div>
<div class="tuoguan_cell" data-insurance-type-id="2">
<div class="tuoguancell_title">人寿</div>
<div class="mydata2">
<php>$two_collocation_type3 = [];</php>
<php>$two_collocation_type1 = [];</php>
<php>$two_collocation_type2 = [];</php>
<notempty name="$data_two">
<foreach name="$data_two" item="d_t">
<if condition="$d_t['type'] eq 3">
<php>$two_collocation_type3[]=$d_t;</php>
<elseif condition="$d_t['type'] eq 1"/>
<php>$two_collocation_type1[]=$d_t;</php>
<elseif condition="$d_t['type'] eq 2"/>
<php>$two_collocation_type2[]=$d_t;</php>
</if>
</foreach>
</notempty>
<if condition="$two_collocation_type3 neq null">
<foreach name="$data_two" item="d_t">
<if condition="$d_t['type'] eq 3">
<div class="tuoguan_celltxt">{$d_t.name}
<span class="tuoguan_cellnum">{$d_t.sum}元</span>
</div>
</if>
</foreach>
<elseif condition="$two_collocation_type2 neq null"/>
<div class="tuoguan_celltxt">保障缺失</div>
<elseif condition="$two_collocation_type1 neq null"/>
<div class="tuoguan_celltxt">未有保单</div>
<else />
<div class="tuoguan_celltxt">未有保单</div>
</if>
</div>
</div>
<div class="tuoguan_cell" data-insurance-type-id="3">
<div class="tuoguancell_title">出行</div>
<div class="mydata3">
<php>$three_collocation_type3 = [];</php>
<php>$three_collocation_type1 = [];</php>
<php>$three_collocation_type2 = [];</php>
<notempty name="$data_three">
<foreach name="$data_three" item="d_th">
<if condition="$d_th['type'] eq 3">
<!--<div class="tuoguan_celltxt">{$d_th.name}-->
<!--<span class="tuoguan_cellnum">{$d_th.sum}元</span>-->
<!--</div>-->
<php>$three_collocation_type3[]=$d_th;</php>
<elseif condition="$d_th['type'] eq 1"/>
<php>$three_collocation_type1[]=$d_th;</php>
<elseif condition="$d_th['type'] eq 2"/>
<php>$three_collocation_type2[]=$d_th;</php>
</if>
</foreach>
</notempty>
<if condition="$three_collocation_type3 neq null">
<foreach name="$data_three" item="d_th">
<if condition="$d_th['type'] eq 3">
<div class="tuoguan_celltxt">{$d_th.name}
<span class="tuoguan_cellnum">{$d_th.sum}元</span>
</div>
</if>
</foreach>
<elseif condition="$three_collocation_type2 neq null"/>
<div class="tuoguan_celltxt">保障缺失</div>
<elseif condition="$three_collocation_type1 neq null"/>
<div class="tuoguan_celltxt">未有保单</div>
<else />
<div class="tuoguan_celltxt">未有保单</div>
</if>
</div>
</div>
<div class="tuoguan_cell" data-insurance-type-id="4">
<div class="tuoguancell_title">医疗</div>
<div class="mydata4">
<php>$four_collocation_type3 = [];</php>
<php>$four_collocation_type1 = [];</php>
<php>$four_collocation_type2 = [];</php>
<notempty name="$data_four">
<foreach name="$data_four" item="d_f">
<if condition="$d_f['type'] eq 3">
<!--<div class="tuoguan_celltxt">{$d_f.name}-->
<!--<span class="tuoguan_cellnum">{$d_f.sum}元</span>-->
<!--</div>-->
<php>$four_collocation_type3[]=$d_f;</php>
<elseif condition="$d_f['type'] eq 1"/>
<php>$four_collocation_type1[]=$d_f;</php>
<elseif condition="$d_f['type'] eq 2"/>
<php>$four_collocation_type2[]=$d_f;</php>
</if>
</foreach>
</notempty>
<if condition="$four_collocation_type3 neq null">
<foreach name="$data_four" item="d_f">
<if condition="$d_f['type'] eq 3">
<div class="tuoguan_celltxt">{$d_f.name}
<span class="tuoguan_cellnum">{$d_f.sum}元</span>
</div>
</if>
</foreach>
<elseif condition="$four_collocation_type2 neq null"/>
<div class="tuoguan_celltxt">保障缺失</div>
<elseif condition="$four_collocation_type1 neq null"/>
<div class="tuoguan_celltxt">未有保单</div>
<else />
<div class="tuoguan_celltxt">未有保单</div>
</if>
</div>
</div>
<div class="tuoguan_cell" data-insurance-type-id="5">
<div class="tuoguancell_title">理财</div>
<div class="mydata5">
<php>$five_collocation_type3 = [];</php>
<php>$five_collocation_type1 = [];</php>
<php>$five_collocation_type2 = [];</php>
<notempty name="$data_five">
<foreach name="$data_five" item="d_fi">
<if condition="$d_fi['type'] eq 3">
<!--<div class="tuoguan_celltxt">{$d_fi.name}-->
<!--<span class="tuoguan_cellnum">{$d_fi.sum}元</span>-->
<!--</div>-->
<php>$five_collocation_type3[]=$d_fi;</php>
<elseif condition="$d_fi['type'] eq 1"/>
<php>$five_collocation_type1[]=$d_fi;</php>
<elseif condition="$d_fi['type'] eq 2"/>
<php>$five_collocation_type2[]=$d_fi;</php>
</if>
</foreach>
</notempty>
<if condition="$five_collocation_type3 neq null">
<foreach name="$data_five" item="d_fi">
<if condition="$d_fi['type'] eq 3">
<div class="tuoguan_celltxt">{$d_fi.name}
<span class="tuoguan_cellnum">{$d_fi.count}份</span>
</div>
</if>
</foreach>
<elseif condition="$five_collocation_type2 neq null"/>
<div class="tuoguan_celltxt">保障缺失</div>
<elseif condition="$five_collocation_type1 neq null"/>
<div class="tuoguan_celltxt">未有保单</div>
<else />
<div class="tuoguan_celltxt">未有保单</div>
</if>
</div>
</div>
<div class="tuoguan_cell" data-insurance-type-id="6">
<div class="tuoguancell_title">其他</div>
<div class="mydata6">
<php>$six_collocation_type3 = [];</php>
<php>$six_collocation_type1 = [];</php>
<php>$six_collocation_type2 = [];</php>
<notempty name="$data_six">
<foreach name="$data_six" item="d_s">
<if condition="$d_s['type'] eq 3">
<!--<div class="tuoguan_celltxt">{$d_s.name}-->
<!--<span class="tuoguan_cellnum">{$d_s.sum}元</span>-->
<!--</div>-->
<php>$six_collocation_type3[]=$d_s;</php>
<elseif condition="$d_s['type'] eq 1"/>
<php>$six_collocation_type1[]=$d_s;</php>
<elseif condition="$d_s['type'] eq 2"/>
<php>$six_collocation_type2[]=$d_s;</php>
</if>
</foreach>
</notempty>
<if condition="$six_collocation_type3 neq null">
<foreach name="$data_six" item="d_s">
<if condition="$d_s['type'] eq 3">
<div class="tuoguan_celltxt">{$d_s.name}
<span class="tuoguan_cellnum">{$d_s.sum}元</span>
</div>
</if>
</foreach>
<elseif condition="$six_collocation_type2 neq null"/>
<div class="tuoguan_celltxt">保障缺失</div>
<elseif condition="$six_collocation_type1 neq null"/>
<div class="tuoguan_celltxt">未有保单</div>
<else />
<div class="tuoguan_celltxt">未有保单</div>
</if>
</div>
</div>
</div>
</div>
</div>
<div class="my_mold" style="display: none">
<div class="my_moldbox">
<div class="my_topbtn">托管说明</div>
<div class="my_moldmian">
{$page_html.content}
</div>
<div class="my_moldbtn">关闭</div>
</div>
</div>
<div class="my_mold1" style="display: none">
<div class="my_moldbox">
<div class="my_topbtn">保单类型</div>
<div id="dom">
</div>
</div>
</div>
<div class="trust_mold" style="display: none">
<div class="trust_main">
<div class="trust_mainimg">
<img src="__TMPL__/public/assets/assets/imgs/sfdgfdgdf@2x.png" alt="">
</div>
</div>
<div class="trust_mold_btn">关闭</div>
</div>
</body>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/jquery-2.1.0.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/swiper-3.4.2.jquery.min.js"></script>
<script type="text/javascript " src="__TMPL__/public/assets/assets/js/weui.min.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/common.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/Augly_Verification.js"></script>
<script>
var mySwiper = new Swiper('#swiper1', {
slidesPerView: 3,
slidesPerGroup: 3,
})
$('.my_main_miniboxitem').click(function () {
$(this).addClass('my_mainactive').siblings().removeClass('my_mainactive');
var insurer = $(this).text();
console.log(insurer)
$.ajax({
url: "{:url('me_trusteeship/select_insurer')}",
type: "POST",
data: {'insurer': insurer},
success: function (data) {
var data = eval("(" + data + ")");
console.log(data)
if (data.code == 20000) {
var mydata1 = "";
var mydata2 = "";
var mydata3 = "";
var mydata4 = "";
var mydata5 = "";
var mydata6 = "";
var result1 = data.data.data_one;
var result2 = data.data.data_two;
var result3 = data.data.data_three;
var result4 = data.data.data_four;
var result5 = data.data.data_five;
var result6 = data.data.data_six;
var arr1_type1 = [];
var arr1_type2 = [];
var arr1_type3 = [];
if(result1.length != 0){
$.each(result1,function(k11,n11){
if(n11.type == 3){
arr1_type3.push(n11);
}else if(n11.type == 2){
arr1_type2.push(n11);
}else if(n11.type == 1){
arr1_type1.push(n11);
}
});
if(arr1_type3.length != 0){
$.each(result1,function(k1,n1){
if(n1.type == 3){
mydata1 += '<div class="tuoguan_celltxt">' + n1.name + '<span class="tuoguan_cellnum">' + n1.sum + '元</span></div>';
}
})
}else if(arr1_type2.length != 0){
mydata1 += '<div class="tuoguan_celltxt">保障缺失</div>';
}else if(arr1_type1.length != 0){
mydata1 += '<div class="tuoguan_celltxt">未有保单</div>';
}else{
mydata1 += '<div class="tuoguan_celltxt">未有保单</div>';
}
}else{
mydata1 += '<div class="tuoguan_celltxt">未有保单</div>';
}
var arr2_type1 = [];
var arr2_type2 = [];
var arr2_type3 = [];
if(result2.length != 0){
$.each(result2,function(k11,n11){
if(n11.type == 3){
arr2_type3.push(n11);
}else if(n11.type == 2){
arr2_type2.push(n11);
}else if(n11.type == 1){
arr2_type1.push(n11);
}
});
if(arr2_type3.length != 0){
$.each(result2,function(k1,n1){
if(n1.type == 3){
mydata2 += '<div class="tuoguan_celltxt">' + n1.name + '<span class="tuoguan_cellnum">' + n1.sum + '元</span></div>';
}
})
}else if(arr2_type2.length != 0){
mydata2 += '<div class="tuoguan_celltxt">保障缺失</div>';
}else if(arr2_type1.length != 0){
mydata2 += '<div class="tuoguan_celltxt">未有保单</div>';
}else{
mydata2 += '<div class="tuoguan_celltxt">未有保单</div>';
}
}else{
mydata2 += '<div class="tuoguan_celltxt">未有保单</div>';
}
var arr3_type1 = [];
var arr3_type2 = [];
var arr3_type3 = [];
if(result3.length != 0){
$.each(result3,function(k11,n11){
if(n11.type == 3){
arr3_type3.push(n11);
}else if(n11.type == 2){
arr3_type2.push(n11);
}else if(n11.type == 1){
arr3_type1.push(n11);
}
});
if(arr3_type3.length != 0){
$.each(result3,function(k1,n1){
if(n1.type == 3){
mydata3 += '<div class="tuoguan_celltxt">' + n1.name + '<span class="tuoguan_cellnum">' + n1.sum + '元</span></div>';
}
})
}else if(arr3_type2.length != 0){
mydata3 += '<div class="tuoguan_celltxt">保障缺失</div>';
}else if(arr3_type1.length != 0){
mydata3 += '<div class="tuoguan_celltxt">未有保单</div>';
}else{
mydata3 += '<div class="tuoguan_celltxt">未有保单</div>';
}
}else{
mydata3 += '<div class="tuoguan_celltxt">未有保单</div>';
}
var arr4_type1 = [];
var arr4_type2 = [];
var arr4_type3 = [];
if(result4.length != 0){
$.each(result4,function(k11,n11){
if(n11.type == 3){
arr4_type3.push(n11);
}else if(n11.type == 2){
arr4_type2.push(n11);
}else if(n11.type == 1){
arr4_type1.push(n11);
}
});
if(arr4_type3.length != 0){
$.each(result4,function(k1,n1){
if(n1.type == 3){
mydata4 += '<div class="tuoguan_celltxt">' + n1.name + '<span class="tuoguan_cellnum">' + n1.sum + '元</span></div>';
}
})
}else if(arr4_type2.length != 0){
mydata4 += '<div class="tuoguan_celltxt">保障缺失</div>';
}else if(arr4_type1.length != 0){
mydata4 += '<div class="tuoguan_celltxt">未有保单</div>';
}else{
mydata4 += '<div class="tuoguan_celltxt">未有保单</div>';
}
}else{
mydata4 += '<div class="tuoguan_celltxt">未有保单</div>';
}
var arr5_type1 = [];
var arr5_type2 = [];
var arr5_type3 = [];
if(result5.length != 0){
$.each(result5,function(k11,n11){
if(n11.type == 3){
arr5_type3.push(n11);
}else if(n11.type == 2){
arr5_type2.push(n11);
}else if(n11.type == 1){
arr5_type1.push(n11);
}
});
if(arr5_type3.length != 0){
$.each(result5,function(k1,n1){
if(n1.type == 3){
mydata5 += '<div class="tuoguan_celltxt">' + n1.name + '<span class="tuoguan_cellnum">' + n1.count + '份</span></div>';
}
})
}else if(arr5_type2.length != 0){
mydata5 += '<div class="tuoguan_celltxt">保障缺失</div>';
}else if(arr5_type1.length != 0){
mydata5 += '<div class="tuoguan_celltxt">未有保单</div>';
}else{
mydata5 += '<div class="tuoguan_celltxt">未有保单</div>';
}
}else{
mydata5 += '<div class="tuoguan_celltxt">未有保单</div>';
}
var arr6_type1 = [];
var arr6_type2 = [];
var arr6_type3 = [];
if(result6.length != 0){
$.each(result6,function(k11,n11){
if(n11.type == 3){
arr6_type3.push(n11);
}else if(n11.type == 2){
arr6_type2.push(n11);
}else if(n11.type == 1){
arr6_type1.push(n11);
}
});
if(arr6_type3.length != 0){
$.each(result6,function(k1,n1){
if(n1.type == 3){
mydata6 += '<div class="tuoguan_celltxt">' + n1.name + '<span class="tuoguan_cellnum">' + n1.sum + '元</span></div>';
}
})
}else if(arr6_type2.length != 0){
mydata6 += '<div class="tuoguan_celltxt">保障缺失</div>';
}else if(arr6_type1.length != 0){
mydata6 += '<div class="tuoguan_celltxt">未有保单</div>';
}else{
mydata6 += '<div class="tuoguan_celltxt">未有保单</div>';
}
}else{
mydata6 += '<div class="tuoguan_celltxt">未有保单</div>';
}
$('.mydata1').html(mydata1);
$('.mydata2').html(mydata2);
$('.mydata3').html(mydata3);
$('.mydata4').html(mydata4);
$('.mydata5').html(mydata5);
$('.mydata6').html(mydata6);
}else{
toast('与服务器断开连接');
}
}
})
})
$('.my_trusttop div').click(function () {
$(this).addClass('my_trusttop_active').siblings().removeClass('my_trusttop_active');
})
$('.my_rigthblod').click(function () {
$('.my_mold').show();
})
$('.tuoguan_cell').click(function () {
var insurance_type_id = $(this).attr('data-insurance-type-id');
var insurer = $('.my_mainactive').text();
var tuoguancell_title = $(this).children('.tuoguancell_title').text();
$('.my_mold1').children('.my_moldbox').children('.my_topbtn').text(tuoguancell_title);
$.ajax({
url: "{:url('me_trusteeship/arrows')}",
type: "POST",
data: {'insurance_type_id': insurance_type_id, 'insurer': insurer},
success: function (data) {
var data = eval("(" + data + ")");
if (data.code == 20000) {
var result1 = data.data;
console.log(result1);
var mydata1 = '';
if(data.data.length == 0){
mydata1 += '<div style="text-align: center">未有保单</div>';
}else{
var collocation_type3 = [];
var collocation_type1 = [];
var collocation_type2 = [];
$.each(result1,function(k1,n1){
if(n1['type'] == 3){
collocation_type3.push(n1);
}else if(n1['type'] == 1){
collocation_type1.push(n1);
}else if(n1['type'] == 2){
collocation_type2.push(n1);
}
});
if(collocation_type3.length != 0){
$.each(result1,function(k1,n1){
if(collocation_type3.length != 0){
if(n1.type == 3){
if(insurance_type_id == 5){
mydata1 += '<div class="my_mold_item"><div class="line"></div><div class="my_mold_itemtxt"><div class="my_mold_itemtxtleft">' + n1.name + '</div> <div class="iconfont icon-iconset0414"></div> <div class="iconfont icon-iconset0413"></div> <div class="my_mold_itemtxtleft">' + n1.count + '份</div> </div></div>';
}else if(insurance_type_id == 6){
mydata1 += '<div class="my_mold_item"><div class="line"></div><div class="my_mold_itemtxt"><div class="my_mold_itemtxtleft">' + n1.name + '</div> <div class="iconfont icon-iconset0414"></div> <div class="iconfont icon-iconset0413"></div> <div class="my_mold_itemtxtleft">' + n1.sum + '元</div> </div></div>';
}else{
if(n1.main_arrows == null){
mydata1 += '<div class="my_mold_item"><div class="line"></div><div class="my_mold_itemtxt"><div class="my_mold_itemtxtleft">' + n1.name + '</div> <div class="iconfont icon-iconset0414"></div> <div class="iconfont icon-iconset0413"></div> <div class="my_mold_itemtxtleft">' + n1.sum + '元</div> </div></div>';
}else if(n1.main_arrows == 1){
mydata1 += '<div class="my_mold_item up"><div class="line"></div><div class="my_mold_itemtxt"><div class="my_mold_itemtxtleft">' + n1.name + '</div> <div class="iconfont icon-iconset0414"></div> <div class="iconfont icon-iconset0413"></div> <div class="my_mold_itemtxtleft">' + n1.sum + '元</div> </div></div>';
}else if(n1.main_arrows == 2){
mydata1 += '<div class="my_mold_item down"><div class="line"></div><div class="my_mold_itemtxt"><div class="my_mold_itemtxtleft">' + n1.name + '</div> <div class="iconfont icon-iconset0414"></div> <div class="iconfont icon-iconset0413"></div> <div class="my_mold_itemtxtleft">' + n1.sum + '元</div> </div></div>';
}
}
}
}
});
}else if(collocation_type2.length != 0){
mydata1 += '<div style="text-align: center">保障缺失</div>';
}else if(collocation_type1.length != 0){
mydata1 += '<div style="text-align: center">未有保单</div>';
}else{
mydata1 += '<div style="text-align: center">未有保单</div>';
}
}
$('#dom').html(mydata1);
$('.my_mold1').show();
} else {
toast('与服务器断开连接');
}
}
})
})
$('.my_mold1').click(function () {
$('.my_mold1').hide();
})
$('.my_moldbox').click(function (e) {
e.stopPropagation();
})
</script>
</html>