作者 刘晓艳

家庭保险

@@ -286,6 +286,10 @@ Page({ @@ -286,6 +286,10 @@ Page({
286 warn = "请填写您的性别"; 286 warn = "请填写您的性别";
287 } else if (list.family_role == '') { 287 } else if (list.family_role == '') {
288 warn = '请填写您的家庭角色' 288 warn = '请填写您的家庭角色'
  289 + } else if (list.mobile == '') {
  290 + warn = '请填写您的手机号'
  291 + } else if (!(/^[1][3,4,5,7,8][0-9]{9}$/.test(list.mobile))) {
  292 + warn = "手机号格式不正确";
289 } else if (list.birthday == '') { 293 } else if (list.birthday == '') {
290 warn = "请填选择您的出生日期" 294 warn = "请填选择您的出生日期"
291 } else { 295 } else {
@@ -400,11 +404,10 @@ Page({ @@ -400,11 +404,10 @@ Page({
400 app.post(url, { 404 app.post(url, {
401 family_id: this.data.familyid 405 family_id: this.data.familyid
402 }).then((res) => { 406 }).then((res) => {
403 - console.log(res)  
404 if (res.data.code == 200) { 407 if (res.data.code == 200) {
405 var list = that.data.list 408 var list = that.data.list
406 - console.log(list)  
407 list.address = res.data.data.address 409 list.address = res.data.data.address
  410 + list.mobile=res.data.data.mobile
408 that.setData({ 411 that.setData({
409 list: list 412 list: list
410 }) 413 })
@@ -37,8 +37,11 @@ @@ -37,8 +37,11 @@
37 <view>万</view> 37 <view>万</view>
38 </view> 38 </view>
39 </view> 39 </view>
40 - <view class='item_list' >  
41 - <view class='list_title'>手机号 </view> 40 + <view class='item_list'>
  41 + <view class='list_title'>
  42 + <text class='list_icon'>*</text>
  43 + <text>手机号</text>
  44 + </view>
42 <view class='list_input'> 45 <view class='list_input'>
43 <input type='number' placeholder='请输入手机号' value='{{list.mobile}}' bindinput='setMobile'></input> 46 <input type='number' placeholder='请输入手机号' value='{{list.mobile}}' bindinput='setMobile'></input>
44 </view> 47 </view>
@@ -71,7 +74,7 @@ @@ -71,7 +74,7 @@
71 <view class='list_title'>家庭地址 </view> 74 <view class='list_title'>家庭地址 </view>
72 <view class='list_input'> 75 <view class='list_input'>
73 <!-- wx:if='{{list.address}}' --> 76 <!-- wx:if='{{list.address}}' -->
74 - <textarea type='text' placeholder='请输入家庭地址' value='{{list.address}}' bindinput='setSddress' ></textarea> 77 + <textarea type='text' placeholder='请输入家庭地址' value='{{list.address}}' bindinput='setSddress'></textarea>
75 </view> 78 </view>
76 </view> 79 </view>
77 80
@@ -64,7 +64,8 @@ Page({ @@ -64,7 +64,8 @@ Page({
64 edit_state3: false, 64 edit_state3: false,
65 coverage: '', 65 coverage: '',
66 focus: false, 66 focus: false,
67 - sub_index: '' 67 + sub_index: '',
  68 + birthday:''
68 }, 69 },
69 70
70 //回到顶部 71 //回到顶部
@@ -81,32 +82,13 @@ Page({ @@ -81,32 +82,13 @@ Page({
81 } 82 }
82 }, 83 },
83 84
84 - 85 + //取消弹窗
85 cancleMask() { 86 cancleMask() {
86 - // if (this.data.inforid != 0) {  
87 - // if (this.data.edit_state3) {  
88 - // this.setData({  
89 - // edit_state: false,  
90 - // edit_state2: false  
91 - // })  
92 - // } else {  
93 - // this.setData({  
94 - // edit_state: true,  
95 - // edit_state2: true  
96 - // })  
97 - // }  
98 - // } else {  
99 - // this.setData({  
100 - // edit_state: false,  
101 - // edit_state2: false  
102 - // })  
103 - // }  
104 - // console.log(this.data.edit_state)  
105 -  
106 this.setData({ 87 this.setData({
107 popup_state: false, 88 popup_state: false,
108 }) 89 })
109 }, 90 },
  91 +
110 //保单号 92 //保单号
111 policyNum(e) { 93 policyNum(e) {
112 this.setData({ 94 this.setData({
@@ -124,9 +106,10 @@ Page({ @@ -124,9 +106,10 @@ Page({
124 //投保人 106 //投保人
125 insureSelect(e) { 107 insureSelect(e) {
126 var insure = this.data.insure 108 var insure = this.data.insure
  109 + console.log(insure)
127 this.setData({ 110 this.setData({
128 insureindex: e.detail.value, 111 insureindex: e.detail.value,
129 - applicant_name: insure[e.detail.value], 112 + applicant_name: insure[e.detail.value].name,
130 }) 113 })
131 }, 114 },
132 115
@@ -153,7 +136,6 @@ Page({ @@ -153,7 +136,6 @@ Page({
153 }) 136 })
154 }, 137 },
155 138
156 -  
157 //保费 139 //保费
158 yearMoney(e) { 140 yearMoney(e) {
159 this.setData({ 141 this.setData({
@@ -203,18 +185,30 @@ Page({ @@ -203,18 +185,30 @@ Page({
203 let that = this; 185 let that = this;
204 let type = e.currentTarget.dataset.type; 186 let type = e.currentTarget.dataset.type;
205 let index = e.currentTarget.dataset.xulie; 187 let index = e.currentTarget.dataset.xulie;
  188 +
206 // 复制保障项目模板 189 // 复制保障项目模板
207 // let tempProjectlist = Object.assign({}, this.data.projectlist); 190 // let tempProjectlist = Object.assign({}, this.data.projectlist);
208 let tempProjectlist = JSON.parse(JSON.stringify(this.data.projectlist)); 191 let tempProjectlist = JSON.parse(JSON.stringify(this.data.projectlist));
  192 +
  193 +
  194 + // for (var i = 0; i < tempProjectlist.length; i++) {
  195 + // for (var j = 0; j < tempProjectlist[i].title.length; j++) {
  196 + // tempProjectlist[i].title[0].label_state = true
  197 + // }
  198 + // }
  199 +
  200 +
  201 +
209 var sub_index = that.data.sub_index 202 var sub_index = that.data.sub_index
210 var edit_state3 = that.data.edit_state3 203 var edit_state3 = that.data.edit_state3
211 204
212 // 已经添加的附加险 205 // 已经添加的附加险
213 - let risk_list = Object.assign([],this.data.risk_list);  
214 - this.setData({  
215 - type: type,  
216 - xielie: index  
217 - }) 206 + let risk_list = Object.assign([], this.data.risk_list);
  207 +
  208 + // this.setData({
  209 + // type: type,
  210 + // xielie: index
  211 + // })
218 212
219 if (type == 'fujiaxian') { 213 if (type == 'fujiaxian') {
220 this.setData({ 214 this.setData({
@@ -222,46 +216,51 @@ Page({ @@ -222,46 +216,51 @@ Page({
222 }) 216 })
223 } 217 }
224 // 已经添加的主险 218 // 已经添加的主险
225 - let tempMain_list = Object.assign([],this.data.main_array) 219 + let tempMain_list = Object.assign([], this.data.main_array)
226 this.data.inforid != 0 && this.data.inforid != undefined 220 this.data.inforid != 0 && this.data.inforid != undefined
227 - if (type == 'zhuxian') {  
228 - if (tempMain_list.length > 0) {  
229 - for (let i in tempProjectlist) {  
230 - for (let j in tempMain_list) {  
231 - if (tempProjectlist[i].id == tempMain_list[j].id) {  
232 - tempProjectlist[i].choose_status = true  
233 - tempProjectlist[i].num = tempMain_list[j].num  
234 - for (let g in tempProjectlist[i].title) {  
235 - if (tempProjectlist[i].title[g].t_id == tempMain_list[j].t_id) {  
236 - tempProjectlist[i].title[g].label_state = true  
237 - } 221 + if (type == 'zhuxian') {
  222 + if (tempMain_list.length > 0) {
  223 + for (let i in tempProjectlist) {
  224 + for (let j in tempMain_list) {
  225 + if (tempProjectlist[i].id == tempMain_list[j].id) {
  226 + tempProjectlist[i].choose_status = true
  227 + tempProjectlist[i].num = tempMain_list[j].num
  228 + for (let g in tempProjectlist[i].title) {
  229 + if (tempProjectlist[i].title[g].t_id == tempMain_list[j].t_id) {
  230 + tempProjectlist[i].title[g].label_state = true
  231 + } else {
  232 + tempProjectlist[i].title[g].label_state = false
238 } 233 }
239 } 234 }
240 } 235 }
241 } 236 }
242 } 237 }
243 - } else {  
244 - let tempRist = risk_list[index].mo;  
245 - if (tempRist.length) {  
246 - for (let i in tempProjectlist) {  
247 - for (let j in tempRist) {  
248 - if (tempProjectlist[i].id == tempRist[j].id) {  
249 - tempProjectlist[i].choose_status = true  
250 - tempProjectlist[i].num = tempRist[j].num  
251 - for (let g in tempProjectlist[i].title) {  
252 - if (tempProjectlist[i].title[g].t_id == tempRist[j].t_id) {  
253 - tempProjectlist[i].title[g].label_state = true  
254 - } 238 + }
  239 + } else {
  240 + let tempRist = risk_list[index].mo;
  241 + if (tempRist.length) {
  242 + for (let i in tempProjectlist) {
  243 + for (let j in tempRist) {
  244 + if (tempProjectlist[i].id == tempRist[j].id) {
  245 + tempProjectlist[i].choose_status = true
  246 + tempProjectlist[i].num = tempRist[j].num
  247 + for (let g in tempProjectlist[i].title) {
  248 + if (tempProjectlist[i].title[g].t_id == tempRist[j].t_id) {
  249 + tempProjectlist[i].title[g].label_state = true
  250 + } else {
  251 + tempProjectlist[i].title[g].label_state = false
255 } 252 }
256 } 253 }
257 } 254 }
258 } 255 }
259 } 256 }
260 } 257 }
261 - // } 258 + }
  259 +
262 wx.setNavigationBarTitle({ 260 wx.setNavigationBarTitle({
263 title: '选择保障项目', 261 title: '选择保障项目',
264 }) 262 })
  263 +
265 this.setData({ 264 this.setData({
266 popup_state: true, 265 popup_state: true,
267 addType: type, 266 addType: type,
@@ -285,7 +284,7 @@ Page({ @@ -285,7 +284,7 @@ Page({
285 projectlist[i].title[j].label_state = false 284 projectlist[i].title[j].label_state = false
286 } 285 }
287 // projectlist[i].title[0].current = 0 286 // projectlist[i].title[0].current = 0
288 - // projectlist[i].title[0].label_state = true 287 + projectlist[i].title[0].label_state = true
289 } 288 }
290 this.setData({ 289 this.setData({
291 projectlist: res.data.data.def, 290 projectlist: res.data.data.def,
@@ -339,6 +338,7 @@ Page({ @@ -339,6 +338,7 @@ Page({
339 this.setData({ 338 this.setData({
340 showProjectlist: projectlist, 339 showProjectlist: projectlist,
341 }) 340 })
  341 +
342 if (this.data.inforid != 0) { 342 if (this.data.inforid != 0) {
343 edit_state: false; 343 edit_state: false;
344 edit_state2: false 344 edit_state2: false
@@ -347,34 +347,23 @@ Page({ @@ -347,34 +347,23 @@ Page({
347 347
348 //确认选择的推荐方案 348 //确认选择的推荐方案
349 confirmCase() { 349 confirmCase() {
350 - // if (this.data.type == 'fujiaxian') {  
351 - // this.setData({  
352 - // edit_state2: false  
353 - // })  
354 - // } else {  
355 - // this.setData({  
356 - // edit_state: false  
357 - // })  
358 - // }  
359 -  
360 -  
361 let index = this.data.xulie; 350 let index = this.data.xulie;
362 let type = this.data.addType; 351 let type = this.data.addType;
363 var that = this 352 var that = this
364 var main_array = [] 353 var main_array = []
365 -  
366 var projectlist = Object.assign([], this.data.showProjectlist) 354 var projectlist = Object.assign([], this.data.showProjectlist)
  355 +
367 for (var i = 0; i < projectlist.length; i++) { 356 for (var i = 0; i < projectlist.length; i++) {
368 if (projectlist[i].choose_status) { 357 if (projectlist[i].choose_status) {
369 let baseData = Object.assign({}, projectlist[i]); 358 let baseData = Object.assign({}, projectlist[i]);
370 - console.log(baseData)  
371 let temprist = projectlist[i]; 359 let temprist = projectlist[i];
372 - for (var j in temprist.title){  
373 - if (temprist.title[j].label_state){ 360 + for (var j in temprist.title) {
  361 + if (temprist.title[j].label_state) {
374 baseData.title = temprist.title[j].name; 362 baseData.title = temprist.title[j].name;
375 baseData.t_id = temprist.title[j].t_id; 363 baseData.t_id = temprist.title[j].t_id;
376 - baseData.choose_status = temprist.title[j].choose_status;  
377 - }else{ 364 + baseData.choose_status = temprist.title[j].choose_status;
  365 + break;
  366 + } else {
378 baseData.title = ''; 367 baseData.title = '';
379 } 368 }
380 } 369 }
@@ -390,7 +379,6 @@ Page({ @@ -390,7 +379,6 @@ Page({
390 379
391 if (type == 'fujiaxian') { 380 if (type == 'fujiaxian') {
392 let tempRist = that.data.risk_list; 381 let tempRist = that.data.risk_list;
393 - console.log(tempRist)  
394 tempRist[index]['mo'] = main_array; 382 tempRist[index]['mo'] = main_array;
395 that.setData({ 383 that.setData({
396 risk_list: tempRist, 384 risk_list: tempRist,
@@ -401,6 +389,7 @@ Page({ @@ -401,6 +389,7 @@ Page({
401 }) 389 })
402 } 390 }
403 } 391 }
  392 +
404 setTimeout(function() { 393 setTimeout(function() {
405 that.ensureProjectList() 394 that.ensureProjectList()
406 that.setData({ 395 that.setData({
@@ -410,6 +399,7 @@ Page({ @@ -410,6 +399,7 @@ Page({
410 title: '添加保单', 399 title: '添加保单',
411 }) 400 })
412 }, 800) 401 }, 800)
  402 +
413 }, 403 },
414 404
415 //重组主险的保障项目 405 //重组主险的保障项目
@@ -430,9 +420,9 @@ Page({ @@ -430,9 +420,9 @@ Page({
430 // } 420 // }
431 // } 421 // }
432 // warranty_one1.push(temp) 422 // warranty_one1.push(temp)
433 - this.setData({  
434 - guarantee: this.data.main_array  
435 - }) 423 + this.setData({
  424 + guarantee: this.data.main_array
  425 + })
436 // } 426 // }
437 427
438 }, 428 },
@@ -443,7 +433,8 @@ Page({ @@ -443,7 +433,8 @@ Page({
443 var index = e.currentTarget.dataset.index 433 var index = e.currentTarget.dataset.index
444 risk_list[index].name = e.detail.value 434 risk_list[index].name = e.detail.value
445 this.setData({ 435 this.setData({
446 - risk_list: risk_list 436 + risk_list: risk_list,
  437 + focus: false
447 }) 438 })
448 }, 439 },
449 440
@@ -483,8 +474,7 @@ Page({ @@ -483,8 +474,7 @@ Page({
483 // } 474 // }
484 // } 475 // }
485 // } 476 // }
486 - // console.log(temp_risk)  
487 - 477 +
488 // } 478 // }
489 this.setData({ 479 this.setData({
490 more: this.data.risk_list 480 more: this.data.risk_list
@@ -493,29 +483,20 @@ Page({ @@ -493,29 +483,20 @@ Page({
493 483
494 //选择受益人姓名 484 //选择受益人姓名
495 beneficiarySelect(e) { 485 beneficiarySelect(e) {
496 - if (this.data.inforid != 0) {  
497 - // this.setData({  
498 - // edit_state: true,  
499 - // edit_state2: true  
500 - // })  
501 - }  
502 var index = e.currentTarget.dataset.mindex 486 var index = e.currentTarget.dataset.mindex
503 var beneficiary_list = Object.assign({}, this.data.projectlist) 487 var beneficiary_list = Object.assign({}, this.data.projectlist)
504 // 获取当前已选择的收益人 488 // 获取当前已选择的收益人
505 let tempBenefice = Object.assign({}, this.data.projectlist) 489 let tempBenefice = Object.assign({}, this.data.projectlist)
506 // 当前选择的收益人 490 // 当前选择的收益人
507 // let nowPerson = beneficiary_list[index].name_array[e.detail.value]; 491 // let nowPerson = beneficiary_list[index].name_array[e.detail.value];
508 - // let nowPerson = beneficiary_list[index].beneficiary_name  
509 let nowPerson = beneficiary_list[index].name 492 let nowPerson = beneficiary_list[index].name
510 // 判断受益人是否已经添加 493 // 判断受益人是否已经添加
511 const add = tempBenefice.every((tempBenefice) => { 494 const add = tempBenefice.every((tempBenefice) => {
512 return tempBenefice != nowPerson 495 return tempBenefice != nowPerson
513 }) 496 })
514 if (add) { 497 if (add) {
515 - // beneficiary_list[index].beneficiary_name = nowPerson;  
516 beneficiary_list[index].name = nowPerson; 498 beneficiary_list[index].name = nowPerson;
517 tempBenefice.push(nowPerson) 499 tempBenefice.push(nowPerson)
518 - console.log(tempBenefice)  
519 } else { 500 } else {
520 wx.showToast({ 501 wx.showToast({
521 title: '请不要重复添加受益人', 502 title: '请不要重复添加受益人',
@@ -545,6 +526,7 @@ Page({ @@ -545,6 +526,7 @@ Page({
545 beneficiary_list: beneficiary_list, 526 beneficiary_list: beneficiary_list,
546 }) 527 })
547 }, 528 },
  529 +
548 //添加收益比例 530 //添加收益比例
549 addUnit2(e) { 531 addUnit2(e) {
550 var beneficiary_list = this.data.beneficiary_list; 532 var beneficiary_list = this.data.beneficiary_list;
@@ -613,7 +595,6 @@ Page({ @@ -613,7 +595,6 @@ Page({
613 icon: 'none' 595 icon: 'none'
614 }) 596 })
615 } else if (list[len - 1].unit == '') { 597 } else if (list[len - 1].unit == '') {
616 - console.log('unit')  
617 wx.showToast({ 598 wx.showToast({
618 title: '请输入收益比', 599 title: '请输入收益比',
619 icon: 'none' 600 icon: 'none'
@@ -628,9 +609,8 @@ Page({ @@ -628,9 +609,8 @@ Page({
628 this.setData({ 609 this.setData({
629 beneficiary_list: list 610 beneficiary_list: list
630 }) 611 })
631 - console.log(this.data.beneficiary_list)  
632 }, 612 },
633 - 613 +
634 //重组添加受益人 614 //重组添加受益人
635 tempBeneficiary() { 615 tempBeneficiary() {
636 var beneficiary_list = this.data.beneficiary_list 616 var beneficiary_list = this.data.beneficiary_list
@@ -646,15 +626,14 @@ Page({ @@ -646,15 +626,14 @@ Page({
646 this.setData({ 626 this.setData({
647 tempfavoree: tempfavoree1 627 tempfavoree: tempfavoree1
648 }) 628 })
649 -  
650 } 629 }
651 }, 630 },
652 631
653 //删除收益人 632 //删除收益人
654 deletebenefict(e) { 633 deletebenefict(e) {
655 let index = e.currentTarget.dataset.index; 634 let index = e.currentTarget.dataset.index;
656 - let tempbenefict = Object.assign({},this.data.beneficiary_list);  
657 - let beneficiaryList = Object.assign({},this.data.beneficiaryList); 635 + let tempbenefict = this.data.beneficiary_list
  636 + let beneficiaryList = this.data.beneficiaryList
658 // 获取当前选项的受益人 637 // 获取当前选项的受益人
659 // let person = tempbenefict[index].beneficiary_name; 638 // let person = tempbenefict[index].beneficiary_name;
660 let person = tempbenefict[index].name; 639 let person = tempbenefict[index].name;
@@ -669,13 +648,8 @@ Page({ @@ -669,13 +648,8 @@ Page({
669 648
670 //添加附加险 649 //添加附加险
671 addRisk() { 650 addRisk() {
672 - if (this.data.inforid != 0) {  
673 - // this.setData({  
674 - // edit_state: false,  
675 - // edit_state2: false  
676 - // })  
677 - }  
678 - var risk_list = Object.assign({},this.data.risk_list); 651 + // var risk_list = Object.assign({}, this.data.risk_list);
  652 + var risk_list = this.data.risk_list;
679 var len = risk_list.length 653 var len = risk_list.length
680 risk_list[len] = { 654 risk_list[len] = {
681 name: '', 655 name: '',
@@ -685,14 +659,15 @@ Page({ @@ -685,14 +659,15 @@ Page({
685 num: '' 659 num: ''
686 } 660 }
687 this.setData({ 661 this.setData({
688 - risk_list: risk_list 662 + risk_list: risk_list,
  663 + focus: false
689 }) 664 })
690 }, 665 },
691 666
692 //删除附加险 667 //删除附加险
693 deleteRisk(e) { 668 deleteRisk(e) {
694 let index = e.currentTarget.dataset.index; 669 let index = e.currentTarget.dataset.index;
695 - let risk_list = Object.assign({},this.data.risk_list); 670 + let risk_list = this.data.risk_list;
696 risk_list.splice(index, 1); 671 risk_list.splice(index, 1);
697 this.setData({ 672 this.setData({
698 risk_list: risk_list 673 risk_list: risk_list
@@ -770,10 +745,7 @@ Page({ @@ -770,10 +745,7 @@ Page({
770 }, 745 },
771 complete: () => { 746 complete: () => {
772 i++; 747 i++;
773 - if (i == length) {  
774 -  
775 - } else { //递归调用uploadDIY函数  
776 - 748 + if (i == length) {} else { //递归调用uploadDIY函数
777 this.uploadAllfile(filePaths, successUp, failUp, i, length); 749 this.uploadAllfile(filePaths, successUp, failUp, i, length);
778 } 750 }
779 }, 751 },
@@ -785,9 +757,7 @@ Page({ @@ -785,9 +757,7 @@ Page({
785 var imgs = this.data.imgs 757 var imgs = this.data.imgs
786 var current = e.currentTarget.dataset.index 758 var current = e.currentTarget.dataset.index
787 wx.previewImage({ 759 wx.previewImage({
788 - //当前显示图片  
789 current: imgs[current], 760 current: imgs[current],
790 - //所有图片  
791 urls: imgs 761 urls: imgs
792 }) 762 })
793 }, 763 },
@@ -804,12 +774,6 @@ Page({ @@ -804,12 +774,6 @@ Page({
804 774
805 //保障期 775 //保障期
806 warrantyTwo(e) { 776 warrantyTwo(e) {
807 - if (this.data.inforid != 0) {  
808 - // this.setData({  
809 - // edit_state: false,  
810 - // edit_state2: false  
811 - // })  
812 - }  
813 var guarantee_name = e.detail.value 777 var guarantee_name = e.detail.value
814 var warranty_two = this.data.warranty_two 778 var warranty_two = this.data.warranty_two
815 var impletion_time = this.data.impletion_time 779 var impletion_time = this.data.impletion_time
@@ -823,7 +787,6 @@ Page({ @@ -823,7 +787,6 @@ Page({
823 787
824 //选择各项单位 788 //选择各项单位
825 selectUnit(e) { 789 selectUnit(e) {
826 - console.log(e)  
827 var unit = e.currentTarget.dataset.unit 790 var unit = e.currentTarget.dataset.unit
828 this.setData({ 791 this.setData({
829 unit: unit, 792 unit: unit,
@@ -832,7 +795,7 @@ Page({ @@ -832,7 +795,7 @@ Page({
832 if (unit == '终身') { 795 if (unit == '终身') {
833 this.setData({ 796 this.setData({
834 'warranty_two.num': '', 797 'warranty_two.num': '',
835 - 'warranty_one':'' 798 + 'warranty_one': ''
836 }) 799 })
837 this.setData({ 800 this.setData({
838 warranty_info: '', 801 warranty_info: '',
@@ -857,7 +820,6 @@ Page({ @@ -857,7 +820,6 @@ Page({
857 // warranty_two: warranty_two 820 // warranty_two: warranty_two
858 // }) 821 // })
859 this.data.warranty_two.title = this.data.unit 822 this.data.warranty_two.title = this.data.unit
860 - console.log(this.data.warranty_two)  
861 }, 823 },
862 824
863 825
@@ -871,35 +833,34 @@ Page({ @@ -871,35 +833,34 @@ Page({
871 var day = parseInt(new Date(compact_time).getDate()) 833 var day = parseInt(new Date(compact_time).getDate())
872 var warranty_one = this.data.warranty_one 834 var warranty_one = this.data.warranty_one
873 var tempbirth_time = '' 835 var tempbirth_time = ''
874 - var birthday = '' 836 + var birthday = this.data.birthday
875 var birthday_year = parseInt(new Date(birthday).getFullYear()) 837 var birthday_year = parseInt(new Date(birthday).getFullYear())
876 -  
877 if (compact_time == '') { 838 if (compact_time == '') {
878 wx.showToast({ 839 wx.showToast({
879 title: '请选择合同生效日', 840 title: '请选择合同生效日',
880 icon: 'none' 841 icon: 'none'
881 }) 842 })
882 } else { 843 } else {
883 - if (unit == '年') {  
884 - var temp_year = (year + guarantee_name)  
885 - var temp_day = day - 1  
886 - if (month < 10) month = "0" + month;  
887 - if (temp_day < 10) temp_day = "0" + temp_day;  
888 - warranty_one = guarantee_name ? (temp_year + '-' + month + '-' + temp_day):''  
889 - // warranty_one = temp_year + '-' + month + '-' + temp_day  
890 - } else if (unit == '岁') {  
891 - var temp_year = (birthday_year + guarantee_name - 1)  
892 - var temp_year2 = (birthday_year + guarantee_name)  
893 - var temp_month = month  
894 - if (temp_month < 10) temp_month = "0" + temp_month;  
895 - if (month < 10) month = "0" + month;  
896 - if (day < 10) day = "0" + day;  
897 - warranty_one = guarantee_name ? (temp_year2 + '-' + month + '-' + day) : ''  
898 - // warranty_one = temp_year2 + '-' + month + '-' + day  
899 - } else if (unit == '终身') {  
900 - warranty_one = '终身'  
901 - }  
902 - 844 + if (unit == '年') {
  845 + var temp_year = (year + guarantee_name)
  846 + var temp_day = day - 1
  847 + if (month < 10) month = "0" + month;
  848 + if (temp_day < 10) temp_day = "0" + temp_day;
  849 + warranty_one = guarantee_name ? (temp_year + '-' + month + '-' + temp_day) : ''
  850 + warranty_one = temp_year + '-' + month + '-' + temp_day
  851 + } else if (unit == '岁') {
  852 + // var temp_year = (birthday_year + guarantee_name - 1)
  853 + var temp_year = (birthday_year + guarantee_name)
  854 + var temp_month = month
  855 + if (temp_month < 10) temp_month = "0" + temp_month;
  856 + if (month < 10) month = "0" + month;
  857 + if (day < 10) day = "0" + day;
  858 + warranty_one = guarantee_name ? (temp_year + '-' + month + '-' + day) : ''
  859 + // warranty_one = temp_year2 + '-' + month + '-' + day
  860 + } else if (unit == '终身') {
  861 + warranty_one = '终身'
  862 + }
  863 +
903 this.setData({ 864 this.setData({
904 warranty_one: warranty_one 865 warranty_one: warranty_one
905 }) 866 })
@@ -928,7 +889,7 @@ Page({ @@ -928,7 +889,7 @@ Page({
928 this.data.long_money.title = unit; 889 this.data.long_money.title = unit;
929 if (unit == '终身') { 890 if (unit == '终身') {
930 this.setData({ 891 this.setData({
931 - 'long_money.num':'' 892 + 'long_money.num': ''
932 }) 893 })
933 this.setData({ 894 this.setData({
934 warranty_info1: '', 895 warranty_info1: '',
@@ -968,7 +929,7 @@ Page({ @@ -968,7 +929,7 @@ Page({
968 var day = parseInt(new Date(compact_time).getDate()) 929 var day = parseInt(new Date(compact_time).getDate())
969 var impletion_time = this.data.impletion_time 930 var impletion_time = this.data.impletion_time
970 var tempbirth_time = '' 931 var tempbirth_time = ''
971 - var birthday = '' 932 + var birthday = this.data.birthday
972 var birthday_year = parseInt(new Date(birthday).getFullYear()) 933 var birthday_year = parseInt(new Date(birthday).getFullYear())
973 934
974 if (compact_time == '') { 935 if (compact_time == '') {
@@ -1015,20 +976,17 @@ Page({ @@ -1015,20 +976,17 @@ Page({
1015 selectUnit4(e) { 976 selectUnit4(e) {
1016 var unit = e.currentTarget.dataset.unit; 977 var unit = e.currentTarget.dataset.unit;
1017 let index = e.currentTarget.dataset.index; 978 let index = e.currentTarget.dataset.index;
1018 - let risk_list = Object.assign([],this.data.risk_list); 979 + var focus=this.data.focus
  980 + // let risk_list = Object.assign([], this.data.risk_list);
  981 + let risk_list = this.data.risk_list
1019 risk_list[index].title = unit 982 risk_list[index].title = unit
1020 if (risk_list[index].title == '终身') { 983 if (risk_list[index].title == '终身') {
1021 risk_list[index].num = '' 984 risk_list[index].num = ''
1022 - this.setData({  
1023 - risk_state: true  
1024 - })  
1025 - } else {  
1026 - this.setData({  
1027 - risk_state: false  
1028 - }) 985 + focus=true
1029 } 986 }
1030 this.setData({ 987 this.setData({
1031 - risk_list: risk_list 988 + risk_list: risk_list,
  989 + focus: focus
1032 }) 990 })
1033 }, 991 },
1034 992
@@ -1040,17 +998,17 @@ Page({ @@ -1040,17 +998,17 @@ Page({
1040 FamilyId: FamilyId || id, 998 FamilyId: FamilyId || id,
1041 } 999 }
1042 app.post(url, params).then((res) => { 1000 app.post(url, params).then((res) => {
  1001 + console.log(res)
1043 // 受益人数组 1002 // 受益人数组
1044 // var beneficiary_list = this.data.beneficiary_list 1003 // var beneficiary_list = this.data.beneficiary_list
1045 // for (var i in beneficiary_list) { 1004 // for (var i in beneficiary_list) {
1046 // beneficiary_list[i].name_array = res.data.data.list 1005 // beneficiary_list[i].name_array = res.data.data.list
1047 // } 1006 // }
1048 -  
1049 -  
1050 if (res.data.code == 200) { 1007 if (res.data.code == 200) {
1051 this.setData({ 1008 this.setData({
1052 insure: res.data.data.list, 1009 insure: res.data.data.list,
1053 recognizee: res.data.data.list, 1010 recognizee: res.data.data.list,
  1011 + birthday:res.data.data.list[0].birthday
1054 // beneficiary_list: beneficiary_list, 1012 // beneficiary_list: beneficiary_list,
1055 }) 1013 })
1056 } 1014 }
@@ -1129,7 +1087,6 @@ Page({ @@ -1129,7 +1087,6 @@ Page({
1129 def_id: this.data.def_id, 1087 def_id: this.data.def_id,
1130 } 1088 }
1131 app.post(url, params).then((res) => { 1089 app.post(url, params).then((res) => {
1132 - console.log(res)  
1133 if (res.data.code == 200) { 1090 if (res.data.code == 200) {
1134 var warranty_two = res.data.data.def.warranty_two 1091 var warranty_two = res.data.data.def.warranty_two
1135 var unit = this.data.unit 1092 var unit = this.data.unit
@@ -1176,10 +1133,6 @@ Page({ @@ -1176,10 +1133,6 @@ Page({
1176 bank_num: res.data.data.def.bank_num, 1133 bank_num: res.data.data.def.bank_num,
1177 risk_list: res.data.data.def.more, 1134 risk_list: res.data.data.def.more,
1178 beneficiary_list: beneficiary_list, 1135 beneficiary_list: beneficiary_list,
1179 - // edit_state: true,  
1180 - // edit_state2: true,  
1181 - // edit_state3: true,  
1182 - temp_state: true  
1183 }) 1136 })
1184 } 1137 }
1185 }) 1138 })
@@ -1187,7 +1140,6 @@ Page({ @@ -1187,7 +1140,6 @@ Page({
1187 1140
1188 //完成保单添加 1141 //完成保单添加
1189 listVerify(e) { 1142 listVerify(e) {
1190 - console.log(e)  
1191 if (this.data.inforid == 0 || this.data.inforid == undefined) { 1143 if (this.data.inforid == 0 || this.data.inforid == undefined) {
1192 this.tempBeneficiary() 1144 this.tempBeneficiary()
1193 this.tempWarranty() 1145 this.tempWarranty()
@@ -1380,7 +1332,6 @@ Page({ @@ -1380,7 +1332,6 @@ Page({
1380 1332
1381 }, 1333 },
1382 1334
1383 -  
1384 //获取编辑保单接口 1335 //获取编辑保单接口
1385 getlistVerify(id) { 1336 getlistVerify(id) {
1386 let url = 'counselor/infordef' 1337 let url = 'counselor/infordef'
@@ -1388,7 +1339,6 @@ Page({ @@ -1388,7 +1339,6 @@ Page({
1388 InfoId: this.data.inforid || id, 1339 InfoId: this.data.inforid || id,
1389 } 1340 }
1390 app.post(url, params).then((res) => { 1341 app.post(url, params).then((res) => {
1391 - console.log(res)  
1392 if (res.data.code == 200) { 1342 if (res.data.code == 200) {
1393 var warranty_two = res.data.data.def.warranty_two 1343 var warranty_two = res.data.data.def.warranty_two
1394 var unit = this.data.unit 1344 var unit = this.data.unit
@@ -1409,7 +1359,7 @@ Page({ @@ -1409,7 +1359,7 @@ Page({
1409 } 1359 }
1410 1360
1411 var risk_list = res.data.data.def.more 1361 var risk_list = res.data.data.def.more
1412 - var projectlist = Object.assign({},this.data.projectlist) 1362 + var projectlist = Object.assign({}, this.data.projectlist)
1413 1363
1414 for (var i = 0; i < risk_list.length; i++) { 1364 for (var i = 0; i < risk_list.length; i++) {
1415 for (var j = 0; j < projectlist.length; j++) { 1365 for (var j = 0; j < projectlist.length; j++) {
@@ -1453,10 +1403,6 @@ Page({ @@ -1453,10 +1403,6 @@ Page({
1453 bank_num: res.data.data.def.bank_num, 1403 bank_num: res.data.data.def.bank_num,
1454 risk_list: risk_list, 1404 risk_list: risk_list,
1455 beneficiary_list: beneficiary_list, 1405 beneficiary_list: beneficiary_list,
1456 - // edit_state: true,  
1457 - // edit_state2: true,  
1458 - // edit_state3: true,  
1459 - temp_state: true,  
1460 guarantee_name: guarantee_name, 1406 guarantee_name: guarantee_name,
1461 time_name: time_name, 1407 time_name: time_name,
1462 }) 1408 })
@@ -38,19 +38,19 @@ @@ -38,19 +38,19 @@
38 <text>保单号</text> 38 <text>保单号</text>
39 </view> 39 </view>
40 <view class='list_input'> 40 <view class='list_input'>
41 - <input type='text' placeholder='请输入' name='policy_num' value='{{in_num}}' bindinput='policyNum'></input> 41 + <input type='text' placeholder='请输入' name='policy_num' value="{{in_num!='undefined'?in_num:''}}" bindinput='policyNum'></input>
42 </view> 42 </view>
43 </view> 43 </view>
44 <view class='item_list'> 44 <view class='item_list'>
45 <view class='list_title'>所属公司</view> 45 <view class='list_title'>所属公司</view>
46 <view class='list_input'> 46 <view class='list_input'>
47 - <input type='text' placeholder='请输入' name='company' value='{{firm}}' bindinput='setFirm'></input> 47 + <input type='text' placeholder='请输入' name='company' value="{{firm!='undefined'?firm:''}}" bindinput='setFirm'></input>
48 </view> 48 </view>
49 </view> 49 </view>
50 <view class='item_list'> 50 <view class='item_list'>
51 <view class='list_title'>投保人</view> 51 <view class='list_title'>投保人</view>
52 <view class='list_input'> 52 <view class='list_input'>
53 - <picker class='picker' range='{{insure}}' value='{{insureindex}}' bindchange='insureSelect'> 53 + <picker class='picker' range='{{insure}}' value='{{insureindex}}' range-key='name' bindchange='insureSelect'>
54 <input type='text' placeholder='请选择' name='policy_holder' value='{{applicant_name}}' disabled='true'></input> 54 <input type='text' placeholder='请选择' name='policy_holder' value='{{applicant_name}}' disabled='true'></input>
55 </picker> 55 </picker>
56 </view> 56 </view>
@@ -274,7 +274,7 @@ @@ -274,7 +274,7 @@
274 <view class='list_title'>保障期</view> 274 <view class='list_title'>保障期</view>
275 <view class='list_input_box'> 275 <view class='list_input_box'>
276 <view class='list_input'> 276 <view class='list_input'>
277 - <input type='text' placeholder="{{item.title=='终身'?'':'请输入'}}" confirm-type="{{focus?false:''}}" value='{{item.num}}' data-index='{{index}}' bindinput='addRiskUnit' disabled='{{item.title=="终身"}}' focus='{{focus}}' cursor-spacing='200rpx'></input> 277 + <input type='text' placeholder="{{item.title=='终身'?'':'请输入'}}" confirm-type="{{focus?false:''}}" value='{{item.num}}' data-index='{{index}}' bindinput='addRiskUnit' disabled='{{item.title=="终身"}}' focus='{{focus}}' cursor-spacing='200rpx'></input>
278 </view> 278 </view>
279 <view class='list_label_box'> 279 <view class='list_label_box'>
280 <view class="list_label_item {{item.title=='年'?'list_label_active':''}}" bindtap='selectUnit4' data-index="{{index}}" data-unit='年'>年</view> 280 <view class="list_label_item {{item.title=='年'?'list_label_active':''}}" bindtap='selectUnit4' data-index="{{index}}" data-unit='年'>年</view>
@@ -400,7 +400,7 @@ page { @@ -400,7 +400,7 @@ page {
400 } 400 }
401 401
402 .popup_label_item { 402 .popup_label_item {
403 - width: 82rpx; 403 + width: 85rpx;
404 height: 62rpx; 404 height: 62rpx;
405 background: rgba(255, 255, 255, 1); 405 background: rgba(255, 255, 255, 1);
406 border: 1rpx solid rgba(0, 122, 255, 1); 406 border: 1rpx solid rgba(0, 122, 255, 1);
@@ -12,11 +12,11 @@ Page({ @@ -12,11 +12,11 @@ Page({
12 12
13 // 跳转顾问认证 13 // 跳转顾问认证
14 getList() { 14 getList() {
  15 + var that=this
15 let url = 'member/counselorlist'; 16 let url = 'member/counselorlist';
16 let params = { 17 let params = {
17 UserId: app.globalData.UserId 18 UserId: app.globalData.UserId
18 } 19 }
19 -  
20 wx.showLoading({ 20 wx.showLoading({
21 title: '加载中', 21 title: '加载中',
22 success: function() { 22 success: function() {
@@ -24,7 +24,7 @@ Page({ @@ -24,7 +24,7 @@ Page({
24 app.post(url, params).then((res) => { 24 app.post(url, params).then((res) => {
25 console.log(res) 25 console.log(res)
26 if (res.data.code = 200) { 26 if (res.data.code = 200) {
27 - this.setData({ 27 + that.setData({
28 list: res.data.data.list 28 list: res.data.data.list
29 }) 29 })
30 } 30 }
@@ -15,9 +15,20 @@ Page({ @@ -15,9 +15,20 @@ Page({
15 signature: '', 15 signature: '',
16 worktime: '', 16 worktime: '',
17 hasimg: '', 17 hasimg: '',
18 - approve_pic: '' 18 + approve_pic: '',
  19 + imgs: [],
  20 + mobile:'',
19 }, 21 },
20 22
  23 + //预览图片
  24 + viewImg(e) {
  25 + var imgs = this.data.imgs
  26 + var current = e.currentTarget.dataset.index
  27 + wx.previewImage({
  28 + current: imgs[current],
  29 + urls: imgs
  30 + })
  31 + },
21 32
22 //获取资料详情 33 //获取资料详情
23 userInfo() { 34 userInfo() {
@@ -26,11 +37,18 @@ Page({ @@ -26,11 +37,18 @@ Page({
26 UserId: app.globalData.UserId 37 UserId: app.globalData.UserId
27 } 38 }
28 app.post(url, params).then((res) => { 39 app.post(url, params).then((res) => {
29 - console.log(res.data.data.list.work_time == '0000-00-00') 40 + console.log(res)
30 var worktime = res.data.data.list.work_time 41 var worktime = res.data.data.list.work_time
31 if (res.data.data.list.work_time == '0000-00-00') { 42 if (res.data.data.list.work_time == '0000-00-00') {
32 worktime = '' 43 worktime = ''
33 } 44 }
  45 + var picture = res.data.data.list.approve_pic
  46 + if (picture == 'https://insurance.w.broteam.cn/upload/') {
  47 + picture = ''
  48 + }
  49 + var imgs = this.data.imgs
  50 + var picurl = res.data.data.list.avatar
  51 + imgs.push(picurl)
34 if (res.data.code == 200) { 52 if (res.data.code == 200) {
35 this.setData({ 53 this.setData({
36 userinfo: res.data.data.list, 54 userinfo: res.data.data.list,
@@ -38,11 +56,13 @@ Page({ @@ -38,11 +56,13 @@ Page({
38 work: res.data.data.list.work, 56 work: res.data.data.list.work,
39 workpost: res.data.data.list.work_post, 57 workpost: res.data.data.list.work_post,
40 city: res.data.data.list.city, 58 city: res.data.data.list.city,
  59 + mobile: res.data.data.list.mobile,
41 honor: res.data.data.list.honor, 60 honor: res.data.data.list.honor,
42 signature: res.data.data.list.signature, 61 signature: res.data.data.list.signature,
43 worktime: worktime, 62 worktime: worktime,
44 hasimg: res.data.data.list.avatar, 63 hasimg: res.data.data.list.avatar,
45 - approve_pic: res.data.data.list.approve_pic, 64 + approve_pic: picture,
  65 + imgs: imgs
46 }) 66 })
47 } 67 }
48 }) 68 })
@@ -75,8 +95,11 @@ Page({ @@ -75,8 +95,11 @@ Page({
75 var data = JSON.parse(res.data); 95 var data = JSON.parse(res.data);
76 var picurl = data.data.picurl; 96 var picurl = data.data.picurl;
77 picurl = picurl.indexOf('http') != '-1' ? picurl : "http://" + picurl 97 picurl = picurl.indexOf('http') != '-1' ? picurl : "http://" + picurl
  98 + var imgs = that.data.imgs
  99 + imgs.push(picurl)
78 that.setData({ 100 that.setData({
79 - hasimg: picurl 101 + hasimg: picurl,
  102 + imgs: imgs
80 }) 103 })
81 104
82 } 105 }
@@ -145,6 +168,12 @@ Page({ @@ -145,6 +168,12 @@ Page({
145 }) 168 })
146 }, 169 },
147 // 170 //
  171 + getPhone(e) {
  172 + this.setData({
  173 + mobile: e.detail.value
  174 + })
  175 + },
  176 + //
148 honor(e) { 177 honor(e) {
149 this.setData({ 178 this.setData({
150 honor: e.detail.value 179 honor: e.detail.value
@@ -173,6 +202,7 @@ Page({ @@ -173,6 +202,7 @@ Page({
173 Work: this.data.work, 202 Work: this.data.work,
174 WorkPost: this.data.workpost, 203 WorkPost: this.data.workpost,
175 City: this.data.city, 204 City: this.data.city,
  205 + Mobile:this.data.mobile,
176 Honor: this.data.honor, 206 Honor: this.data.honor,
177 Signature: this.data.signature, 207 Signature: this.data.signature,
178 WorkTime: this.data.worktime, 208 WorkTime: this.data.worktime,
1 <!--pages/my/editProfile/editProfile.wxml--> 1 <!--pages/my/editProfile/editProfile.wxml-->
2 -<view class='banner_box' bindtap='chooseimg'> 2 +<view class='banner_box' catchtap='chooseimg'>
3 <view class='header_portrait' wx:if='{{!hasimg}}'> 3 <view class='header_portrait' wx:if='{{!hasimg}}'>
4 - <image src="{{userinfo.avatar}}"></image> 4 + <!-- <image src="{{userinfo.avatar}}"></image> -->
5 <view class='iconfont icon-bi'></view> 5 <view class='iconfont icon-bi'></view>
  6 + <block wx:for='{{imgs}}' wx:key>
  7 + <image src="{{item}}" catchtap='viewImg'></image>
  8 + </block>
6 </view> 9 </view>
7 <view class='header_portrait'> 10 <view class='header_portrait'>
8 <!-- <view class='iconfont icon-zhaoxiangji1'></view> --> 11 <!-- <view class='iconfont icon-zhaoxiangji1'></view> -->
9 <view class='iconfont icon-bi'></view> 12 <view class='iconfont icon-bi'></view>
10 - <image src="{{hasimg}}"></image> 13 + <block wx:for='{{imgs}}' wx:key>
  14 + <image src="{{item}}" catchtap='viewImg'></image>
  15 + </block>
11 </view> 16 </view>
12 -  
13 </view> 17 </view>
14 18
15 <view class="content_item"> 19 <view class="content_item">
@@ -46,6 +50,12 @@ @@ -46,6 +50,12 @@
46 <input type="text" placeholder='请输入' placeholder-class='pl_style' value="{{city}}" class="input_item" bindinput='city'></input> 50 <input type="text" placeholder='请输入' placeholder-class='pl_style' value="{{city}}" class="input_item" bindinput='city'></input>
47 </view> 51 </view>
48 </view> 52 </view>
  53 + <view class="item_list">
  54 + <view class="list_title">手机号</view>
  55 + <view class="list_content">
  56 + <input type="text" placeholder='请输入' placeholder-class='pl_style' value="{{mobile}}" class="input_item" bindinput='getPhone'></input>
  57 + </view>
  58 + </view>
49 </view> 59 </view>
50 <view class="content_item"> 60 <view class="content_item">
51 <view class="item_list"> 61 <view class="item_list">
@@ -72,7 +82,7 @@ @@ -72,7 +82,7 @@
72 <view class='upload_box' bindtap='chooseimg2'> 82 <view class='upload_box' bindtap='chooseimg2'>
73 <view wx:if="{{approve_pic==''}}"> 83 <view wx:if="{{approve_pic==''}}">
74 <view class='iconfont icon-add'></view> 84 <view class='iconfont icon-add'></view>
75 - <view>上传照片</view> 85 + <view>上传奖项或荣誉照片</view>
76 </view> 86 </view>
77 <view class='popup_img' wx:else> 87 <view class='popup_img' wx:else>
78 <!-- <view class='iconfont icon-guanbi' catchtap='deleteImg' data-index='{{index}}'></view> --> 88 <!-- <view class='iconfont icon-guanbi' catchtap='deleteImg' data-index='{{index}}'></view> -->
@@ -16,24 +16,36 @@ Page({ @@ -16,24 +16,36 @@ Page({
16 signature: '', 16 signature: '',
17 worktime: '', 17 worktime: '',
18 hasimg: '', 18 hasimg: '',
19 - approve_pic: '' 19 + approve_pic: '',
  20 + imgs:[],
20 }, 21 },
21 22
  23 + //预览图片
  24 + viewImg(e) {
  25 + var imgs = this.data.imgs
  26 + var current = e.currentTarget.dataset.index
  27 + wx.previewImage({
  28 + current: imgs[current],
  29 + urls: imgs
  30 + })
  31 + },
22 32
23 //获取资料详情 33 //获取资料详情
24 userInfo() { 34 userInfo() {
25 let url = 'member/counselordef' 35 let url = 'member/counselordef'
26 let params = { 36 let params = {
27 CounselorId: this.data.CounselorId 37 CounselorId: this.data.CounselorId
28 - // CounselorId: 413  
29 } 38 }
30 app.post(url, params).then((res) => { 39 app.post(url, params).then((res) => {
31 console.log(res) 40 console.log(res)
32 - 41 +
33 var worktime = res.data.data.data.work_time 42 var worktime = res.data.data.data.work_time
34 if (res.data.data.data.work_time == '0000-00-00') { 43 if (res.data.data.data.work_time == '0000-00-00') {
35 worktime = '' 44 worktime = ''
36 } 45 }
  46 + var avatar = res.data.data.data.avatar
  47 + var imgs=this.data.imgs
  48 + imgs.push(avatar)
37 if (res.data.code == 200) { 49 if (res.data.code == 200) {
38 this.setData({ 50 this.setData({
39 userinfo: res.data.data.data, 51 userinfo: res.data.data.data,
@@ -45,6 +57,7 @@ Page({ @@ -45,6 +57,7 @@ Page({
45 signature: res.data.data.data.signature, 57 signature: res.data.data.data.signature,
46 worktime: worktime, 58 worktime: worktime,
47 avatar: res.data.data.data.avatar, 59 avatar: res.data.data.data.avatar,
  60 + imgs: imgs,
48 approve_pic: res.data.data.data.approve_pic, 61 approve_pic: res.data.data.data.approve_pic,
49 }) 62 })
50 } 63 }
@@ -57,7 +70,7 @@ Page({ @@ -57,7 +70,7 @@ Page({
57 * 生命周期函数--监听页面加载 70 * 生命周期函数--监听页面加载
58 */ 71 */
59 onLoad: function(options) { 72 onLoad: function(options) {
60 - console.log(11,options.CounselorId) 73 + console.log(11, options.CounselorId)
61 this.setData({ 74 this.setData({
62 CounselorId: options.CounselorId 75 CounselorId: options.CounselorId
63 }) 76 })
1 <!--pages/my/editProfile/editProfile.wxml--> 1 <!--pages/my/editProfile/editProfile.wxml-->
2 <view class='banner_box' bindtap='chooseimg'> 2 <view class='banner_box' bindtap='chooseimg'>
3 <view class='header_portrait'> 3 <view class='header_portrait'>
4 - <image src="{{avatar}}"></image> 4 + <!-- <image src="{{avatar}}" catchtap='viewImg'></image> -->
  5 +
  6 + <block wx:for='{{imgs}}' wx:key>
  7 + <image src="{{item}}" catchtap='viewImg'></image>
  8 + </block>
5 <!-- <view class='iconfont icon-bi'></view> --> 9 <!-- <view class='iconfont icon-bi'></view> -->
6 </view> 10 </view>
7 <!-- <view class='header_portrait'> 11 <!-- <view class='header_portrait'>
8 <!-- <view class='iconfont icon-zhaoxiangji1'></view> --> 12 <!-- <view class='iconfont icon-zhaoxiangji1'></view> -->
9 - <!-- <view class='iconfont icon-bi' ></view> 13 + <!-- <view class='iconfont icon-bi' ></view>
10 <image src="{{hasimg}}"></image> 14 <image src="{{hasimg}}"></image>
11 - </view> -->  
12 - 15 + </view> -->
  16 +
13 </view> 17 </view>
14 18
15 <view class="content_item"> 19 <view class="content_item">
@@ -60,13 +64,9 @@ @@ -60,13 +64,9 @@
60 </view> 64 </view>
61 <view class='box'> 65 <view class='box'>
62 <!-- 上传图片 --> 66 <!-- 上传图片 -->
63 - <view class='upload_box' bindtap='chooseimg2'>  
64 - <!-- <view wx:if="{{approve_pic==''}}">  
65 - <view class='iconfont icon-add'></view>  
66 - <view>上传照片</view>  
67 - </view> --> 67 + <view class='upload_box'>
68 <view class='popup_img'> 68 <view class='popup_img'>
69 - <image src='{{approve_pic}}' bindtap='viewImg' data-index='{{index}}'></image> 69 + <image src='{{approve_pic}}' data-index='{{index}}'></image>
70 </view> 70 </view>
71 </view> 71 </view>
72 </view> 72 </view>
@@ -20,6 +20,12 @@ Page({ @@ -20,6 +20,12 @@ Page({
20 interval: 2000, //间隔时间 20 interval: 2000, //间隔时间
21 duration: 500, //滑动时间 21 duration: 500, //滑动时间
22 }, 22 },
  23 +
  24 + charge(){
  25 + wx.redirectTo({
  26 + url: '/pages/start/start',
  27 + })
  28 + },
23 29
24 //轮播图 30 //轮播图
25 swiperChange: function(e) { 31 swiperChange: function(e) {
@@ -28,4 +28,6 @@ @@ -28,4 +28,6 @@
28 </view> 28 </view>
29 <view class='cell' style='background-image:url({{modules[3].picurl}});'bindtap='weikaifa'> 29 <view class='cell' style='background-image:url({{modules[3].picurl}});'bindtap='weikaifa'>
30 </view> 30 </view>
31 -</view>  
  31 +</view>
  32 +<!-- <view class='null_box'></view>
  33 +<view class='bottom_btn' bindtap='charge'>切换身份</view> -->
@@ -11,6 +11,7 @@ swiper { @@ -11,6 +11,7 @@ swiper {
11 } 11 }
12 12
13 /*用来包裹所有的小圆点 */ 13 /*用来包裹所有的小圆点 */
  14 +
14 .dots { 15 .dots {
15 width: 156rpx; 16 width: 156rpx;
16 height: 36rpx; 17 height: 36rpx;
@@ -83,7 +84,7 @@ page { @@ -83,7 +84,7 @@ page {
83 .cell { 84 .cell {
84 width: 350rpx; 85 width: 350rpx;
85 height: 200rpx; 86 height: 200rpx;
86 - margin:0 0 20rpx 0; 87 + margin: 0 0 20rpx 0;
87 /* padding:20rpx 30rpx 30rpx 30rpx; */ 88 /* padding:20rpx 30rpx 30rpx 30rpx; */
88 border-radius: 5rpx; 89 border-radius: 5rpx;
89 background-position: center; 90 background-position: center;
@@ -97,12 +98,30 @@ page { @@ -97,12 +98,30 @@ page {
97 color: #fff; 98 color: #fff;
98 font-size: 36rpx; 99 font-size: 36rpx;
99 font-weight: bold; 100 font-weight: bold;
100 - margin:30rpx 0 0 30rpx; 101 + margin: 30rpx 0 0 30rpx;
101 } 102 }
102 103
103 .cell_subtitle { 104 .cell_subtitle {
104 color: #fff; 105 color: #fff;
105 opacity: 0.4; 106 opacity: 0.4;
106 font-size: 24rpx; 107 font-size: 24rpx;
107 - margin:10rpx 0 0 30rpx; 108 + margin: 10rpx 0 0 30rpx;
  109 +}
  110 +.null_box{
  111 + width: 100%;
  112 + height: 100rpx;
  113 +}
  114 +.bottom_btn {
  115 + position: fixed;
  116 + bottom: 30rpx;
  117 + left: 30rpx;
  118 + width: 92%;
  119 + height: 80rpx;
  120 + border-radius: 60rpx;
  121 + background: #248dff;
  122 + font-size: 32rpx;
  123 + color: #fff;
  124 + display: flex;
  125 + align-items: center;
  126 + justify-content: center;
108 } 127 }
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <view class='banner_box' id='{{VipId}}'> 2 <view class='banner_box' id='{{VipId}}'>
3 <view>{{title}}</view> 3 <view>{{title}}</view>
4 <!-- <text class='money'>100</text> 元 </view>--> 4 <!-- <text class='money'>100</text> 元 </view>-->
5 - <view class='banner_hint'>返{{moneyt}}T币</view> 5 + <view class='banner_hint'>微信支付返{{moneyt}}T币</view>
6 </view> 6 </view>
7 <view class='content_item'> 7 <view class='content_item'>
8 <view class='item_list' bindtap='setpaytype1'> 8 <view class='item_list' bindtap='setpaytype1'>
@@ -27,7 +27,6 @@ Page({ @@ -27,7 +27,6 @@ Page({
27 that.setData({ 27 that.setData({
28 personalpolicylist: res.data.data.list 28 personalpolicylist: res.data.data.list
29 }) 29 })
30 - console.log(res.data.data.list)  
31 } 30 }
32 }) 31 })
33 }, 100) 32 }, 100)
@@ -53,7 +52,6 @@ Page({ @@ -53,7 +52,6 @@ Page({
53 that.setData({ 52 that.setData({
54 DefId: options.DefId 53 DefId: options.DefId
55 }) 54 })
56 -  
57 this.personalPolicyList() 55 this.personalPolicyList()
58 }, 56 },
59 57
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <view class='item_list'> 5 <view class='item_list'>
6 <view class='list_title_box'> 6 <view class='list_title_box'>
7 <view> 7 <view>
8 - <text class='user_name'>{{item.recognizee}}</text> 8 + <text class='user_name'>顾问:{{item.counselor}}</text>
9 <text class='phone_num'>{{item.umobile}}</text> 9 <text class='phone_num'>{{item.umobile}}</text>
10 </view> 10 </view>
11 <view class='list_icon_box' catchtap='makePhoneCall' data-index='{{index}}'> 11 <view class='list_icon_box' catchtap='makePhoneCall' data-index='{{index}}'>
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 </view> 18 </view>
19 <view> 19 <view>
20 <text class='list_title'>主险名称</text> 20 <text class='list_title'>主险名称</text>
21 - <text>平安保险</text> 21 + <text>{{item.main_risks}}</text>
22 </view> 22 </view>
23 <view> 23 <view>
24 <text class='list_title'>生效日</text> 24 <text class='list_title'>生效日</text>
@@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
30 </view> 30 </view>
31 <view> 31 <view>
32 <text class='list_title'>保费</text> 32 <text class='list_title'>保费</text>
33 - <text>10万元</text> 33 + <text>{{item.year_money}}万元</text>
34 </view> 34 </view>
35 </view> 35 </view>
36 </view> 36 </view>
@@ -75,7 +75,7 @@ @@ -75,7 +75,7 @@
75 </view> 75 </view>
76 <view class='item_list'> 76 <view class='item_list'>
77 <view class='list_title'>续费账号</view> 77 <view class='list_title'>续费账号</view>
78 - <view class='list_input'>{{listdetail.bank_num}}</view> 78 + <view class='list_input' wx:if='{{listdetail.bank_num!=0}}'>{{listdetail.bank_num}}</view>
79 </view> 79 </view>
80 <view class='item_list'> 80 <view class='item_list'>
81 <view class='list_title'>缴费期满日</view> 81 <view class='list_title'>缴费期满日</view>
@@ -91,13 +91,17 @@ @@ -91,13 +91,17 @@
91 91
92 <!-- <text class='list_input'> --> 92 <!-- <text class='list_input'> -->
93 <view> 93 <view>
94 - <text class='list_title' style='margin-right:20rpx;'>附加险名称 </text> 94 + <text class='list_title' style='margin-right:60rpx;'>附加险名称 </text>
95 <text>{{item.name}}</text> 95 <text>{{item.name}}</text>
96 </view> 96 </view>
97 - <view>  
98 - <text class='list_title' style='margin-right:50rpx;'>保障项目 </text>  
99 - <text wx:for='{{item.mo}}' wx:key wx:for-item='its'>  
100 - <text style='margin-right:30rpx;'>{{its.name}} {{its.num}}{{its.title}}</text></text> 97 + <view class='item_list2'>
  98 + <view class='list_title' style='margin-right:50rpx;'>保障项目 </view>
  99 + <view class='list_info2'>
  100 + <block wx:for='{{item.mo}}' wx:key wx:for-item='its'>
  101 + <view>{{its.name}} {{its.num}}{{its.title}}</view>
  102 + </block>
  103 + </view>
  104 +
101 </view> 105 </view>
102 <!-- </text> --> 106 <!-- </text> -->
103 </view> 107 </view>
@@ -46,6 +46,15 @@ page { @@ -46,6 +46,15 @@ page {
46 color: #000; 46 color: #000;
47 } 47 }
48 48
  49 +.item_list2 {
  50 + display: flex;
  51 + align-items: flex-start;
  52 +}
  53 +
  54 +.list_info2 {
  55 + width: 80%;
  56 +}
  57 +
49 .list_title { 58 .list_title {
50 width: 190rpx; 59 width: 190rpx;
51 color: #000; 60 color: #000;
@@ -66,9 +75,10 @@ page { @@ -66,9 +75,10 @@ page {
66 display: flex; 75 display: flex;
67 align-items: center; 76 align-items: center;
68 justify-content: space-between; 77 justify-content: space-between;
69 - flex-wrap: wrap 78 + flex-wrap: wrap;
70 } 79 }
71 -.bottom_box image{ 80 +
  81 +.bottom_box image {
72 width: 330rpx; 82 width: 330rpx;
73 height: 330rpx; 83 height: 330rpx;
74 margin: 30rpx 0; 84 margin: 30rpx 0;
@@ -7,7 +7,8 @@ Page({ @@ -7,7 +7,8 @@ Page({
7 */ 7 */
8 data: { 8 data: {
9 inforlist: [], 9 inforlist: [],
10 - mainid: '' 10 + mainid: '',
  11 + cid: '',
11 }, 12 },
12 13
13 //添加保单 14 //添加保单
@@ -83,7 +84,7 @@ Page({ @@ -83,7 +84,7 @@ Page({
83 // cid = 5 & mainid=65 84 // cid = 5 & mainid=65
84 var mainid = this.data.mainid 85 var mainid = this.data.mainid
85 wx.navigateTo({ 86 wx.navigateTo({
86 - url: '../remind/remind?mainid=' + mainid, 87 + url: '../remind/remind?mainid=' + mainid + '&cid=' + this.data.cid,
87 }) 88 })
88 }, 89 },
89 90
@@ -91,8 +92,6 @@ Page({ @@ -91,8 +92,6 @@ Page({
91 getData() { 92 getData() {
92 let url = 'counselor/familyinfor'; 93 let url = 'counselor/familyinfor';
93 let that = this; 94 let that = this;
94 -  
95 -  
96 wx.showLoading({ 95 wx.showLoading({
97 title: '加载中', 96 title: '加载中',
98 success: function() { 97 success: function() {
@@ -100,10 +99,12 @@ Page({ @@ -100,10 +99,12 @@ Page({
100 app.post(url, { 99 app.post(url, {
101 FamilyId: that.data.FamilyId 100 FamilyId: that.data.FamilyId
102 }).then((res) => { 101 }).then((res) => {
  102 + console.log(res)
103 if (res.data.code == 200) { 103 if (res.data.code == 200) {
104 that.setData({ 104 that.setData({
105 inforlist: res.data.data.inforlist, 105 inforlist: res.data.data.inforlist,
106 - mainid: res.data.data.inforlist[0].def_id 106 + mainid: res.data.data.inforlist[0].def_id,
  107 + cid: res.data.data.cid
107 }) 108 })
108 } 109 }
109 }).catch((errMsg) => { 110 }).catch((errMsg) => {
@@ -102,7 +102,7 @@ picker { @@ -102,7 +102,7 @@ picker {
102 .verification_code { 102 .verification_code {
103 width: 320rpx; 103 width: 320rpx;
104 } 104 }
105 - 105 +
106 .code_btn { 106 .code_btn {
107 width: 230rpx; 107 width: 230rpx;
108 font-size: 28rpx; 108 font-size: 28rpx;
@@ -16,6 +16,7 @@ Page({ @@ -16,6 +16,7 @@ Page({
16 16
17 // 体检报告列表接口调取 17 // 体检报告列表接口调取
18 medicalReportList() { 18 medicalReportList() {
  19 + var that=this
19 let url = 'member/publishlist' 20 let url = 'member/publishlist'
20 let params = { 21 let params = {
21 UserId: app.globalData.UserId 22 UserId: app.globalData.UserId
@@ -27,7 +28,7 @@ Page({ @@ -27,7 +28,7 @@ Page({
27 app.post(url, params).then((res) => { 28 app.post(url, params).then((res) => {
28 console.log(res) 29 console.log(res)
29 if (res.data.code == 200) { 30 if (res.data.code == 200) {
30 - this.setData({ 31 + that.setData({
31 medicalreportlist: res.data.data.list, 32 medicalreportlist: res.data.data.list,
32 }) 33 })
33 } 34 }
@@ -54,12 +54,13 @@ Page({ @@ -54,12 +54,13 @@ Page({
54 var familymember = this.data.familymember 54 var familymember = this.data.familymember
55 var collect = this.data.collect 55 var collect = this.data.collect
56 var information = this.data.information 56 var information = this.data.information
  57 + console.log('information', information)
57 var information_user = this.data.information_user 58 var information_user = this.data.information_user
58 var index = e.currentTarget.dataset.index 59 var index = e.currentTarget.dataset.index
  60 +
59 familymember[index].member_state = !(familymember[index].member_state) 61 familymember[index].member_state = !(familymember[index].member_state)
60 62
61 for (var j = 0; j < collect.length; j++) { 63 for (var j = 0; j < collect.length; j++) {
62 - console.log(familymember[index].id == parseInt(collect[j].def_id))  
63 if (familymember[index].id == parseInt(collect[j].def_id)) { 64 if (familymember[index].id == parseInt(collect[j].def_id)) {
64 if (familymember[index].member_state) { 65 if (familymember[index].member_state) {
65 collect[j].collect_state = true 66 collect[j].collect_state = true
@@ -79,6 +80,7 @@ Page({ @@ -79,6 +80,7 @@ Page({
79 } 80 }
80 } 81 }
81 82
  83 +
82 for (var j = 0; j < information_user.length; j++) { 84 for (var j = 0; j < information_user.length; j++) {
83 if (familymember[index].id == parseInt(information_user[j].def_id)) { 85 if (familymember[index].id == parseInt(information_user[j].def_id)) {
84 if (familymember[index].member_state) { 86 if (familymember[index].member_state) {
@@ -207,67 +209,6 @@ Page({ @@ -207,67 +209,6 @@ Page({
207 }) 209 })
208 }, 210 },
209 211
210 - // 预览保单接口调取  
211 - listdetail() {  
212 - let url = 'counselor/publishlook'  
213 - let params = {  
214 - UserId: app.globalData.UserId,  
215 - DefId: this.data.mid,  
216 - DefIds: this.data.DefIds,  
217 - }  
218 - app.post(url, params).then((res) => {  
219 - console.log(res)  
220 - if (res.data.code == 200) {  
221 - //保单详情  
222 - var listdetail = res.data.data.list.information  
223 -  
224 - //家庭成员项选择  
225 - var familymember = res.data.data.list.family;  
226 - for (var j = 0; j < familymember.length; j++) {  
227 - familymember[j].member_state = false  
228 - }  
229 -  
230 - //保障汇总  
231 - var collect = res.data.data.list.collect;  
232 - for (var j = 0; j < collect.length; j++) {  
233 - collect[j].collect_state = false  
234 - }  
235 -  
236 - //保单明细  
237 - var information = res.data.data.list.information  
238 - for (var j = 0; j < information.length; j++) {  
239 - information[j].information_state = false  
240 - }  
241 -  
242 - //保险汇总表  
243 - var newsummary = []  
244 - var collect = res.data.data.list.collect  
245 - for (var i = 0; i < collect.length; i++) {  
246 - for (var j = 0; j < collect[i].list.length; j++) {  
247 - var summary = collect[i].list  
248 - summary[j].name = summary[j].name;  
249 - summary[j].text = summary[j].num;  
250 - summary[j].plan = ''  
251 - summary[j].gap = ''  
252 - }  
253 - newsummary.push(summary)  
254 - }  
255 -  
256 - var list_num = listdetail.length  
257 - this.setData({  
258 - familymember: familymember, //家庭成员  
259 - userinfo: res.data.data.list.counselor, //顾问信息  
260 - information: information,  
261 - advise: res.data.data.list.advise,  
262 - report: res.data.data.list.report,  
263 - guarantee: res.data.data.list.guarantee,  
264 - information_user: res.data.data.list.information_user,  
265 - collect: collect,  
266 - touser: res.data.data.list.touser, //发送人  
267 - })  
268 - }  
269 - })  
270 - },  
271 212
272 //建议保额 213 //建议保额
273 suggestForehead(e) { 214 suggestForehead(e) {
@@ -291,14 +232,11 @@ Page({ @@ -291,14 +232,11 @@ Page({
291 collect: collect 232 collect: collect
292 }) 233 })
293 } 234 }
294 - console.log(this.data.collect)  
295 }, 235 },
296 236
297 237
298 tempCollects() { 238 tempCollects() {
299 var collects = this.data.collect; 239 var collects = this.data.collect;
300 - console.log(collects)  
301 -  
302 var endcollects = []; 240 var endcollects = [];
303 for (let i in collects) { 241 for (let i in collects) {
304 let tem = {} 242 let tem = {}
@@ -382,7 +320,6 @@ Page({ @@ -382,7 +320,6 @@ Page({
382 userId: app.globalData.UserId 320 userId: app.globalData.UserId
383 } 321 }
384 app.post(url, params).then((res) => { 322 app.post(url, params).then((res) => {
385 - console.log(res)  
386 if (res.data.code == 200) { 323 if (res.data.code == 200) {
387 var caselist = res.data.data.list 324 var caselist = res.data.data.list
388 for (var i = 0; i < caselist.length; i++) { 325 for (var i = 0; i < caselist.length; i++) {
@@ -391,28 +328,10 @@ Page({ @@ -391,28 +328,10 @@ Page({
391 that.setData({ 328 that.setData({
392 caselist: caselist, 329 caselist: caselist,
393 }) 330 })
394 - console.log(that.data.caselist)  
395 - }  
396 - })  
397 - },  
398 -  
399 -  
400 - //预设方案列表  
401 - planList() {  
402 - let that = this;  
403 - let url = 'counselor/publishUrl';  
404 - let params = {  
405 - PublishId: that.data.plan_id  
406 - }  
407 - app.post(url, params).then((res) => {  
408 - console.log(res)  
409 - if (res.data.code == 200) {  
410 -  
411 } 331 }
412 }) 332 })
413 }, 333 },
414 334
415 -  
416 tempRecomment() { 335 tempRecomment() {
417 var caselist = this.data.caselist 336 var caselist = this.data.caselist
418 var temp_array = []; 337 var temp_array = [];
@@ -425,13 +344,11 @@ Page({ @@ -425,13 +344,11 @@ Page({
425 temp_array.push(temp) 344 temp_array.push(temp)
426 } 345 }
427 } 346 }
428 - console.log(temp_array)  
429 this.setData({ 347 this.setData({
430 recommend: temp_array 348 recommend: temp_array
431 }) 349 })
432 }, 350 },
433 351
434 -  
435 //发送给客户 352 //发送给客户
436 saveInfo() { 353 saveInfo() {
437 this.tempRecomment() 354 this.tempRecomment()
@@ -457,7 +374,6 @@ Page({ @@ -457,7 +374,6 @@ Page({
457 374
458 } 375 }
459 } 376 }
460 - console.log(ids)  
461 if (ids != '') { 377 if (ids != '') {
462 var that = this; 378 var that = this;
463 var report = this.data.report 379 var report = this.data.report
@@ -486,7 +402,8 @@ Page({ @@ -486,7 +402,8 @@ Page({
486 status: res.data.data.status, 402 status: res.data.data.status,
487 shareState: true, 403 shareState: true,
488 save_state: false, 404 save_state: false,
489 - plan_id: res.data.data.publish_id 405 + plan_id: res.data.data.publish_id,
  406 + PublishId: res.data.data.publish_id
490 }) 407 })
491 } 408 }
492 }) 409 })
@@ -498,6 +415,68 @@ Page({ @@ -498,6 +415,68 @@ Page({
498 } 415 }
499 }, 416 },
500 417
  418 + // 预览保单接口调取
  419 + listdetail() {
  420 + let url = 'counselor/publishlook'
  421 + let params = {
  422 + UserId: app.globalData.UserId,
  423 + DefId: this.data.mid,
  424 + DefIds: this.data.DefIds,
  425 + }
  426 + app.post(url, params).then((res) => {
  427 + console.log(res)
  428 + if (res.data.code == 200) {
  429 + //保单详情
  430 + var listdetail = res.data.data.list.information
  431 +
  432 + //家庭成员项选择
  433 + var familymember = res.data.data.list.family;
  434 + for (var j = 0; j < familymember.length; j++) {
  435 + familymember[j].member_state = false
  436 + }
  437 +
  438 + //保障汇总
  439 + var collect = res.data.data.list.collect;
  440 + for (var j = 0; j < collect.length; j++) {
  441 + collect[j].collect_state = false
  442 + }
  443 +
  444 + //保单明细
  445 + var information = res.data.data.list.information
  446 + for (var j = 0; j < information.length; j++) {
  447 + information[j].information_state = false
  448 + }
  449 +
  450 + //保险汇总表
  451 + var newsummary = []
  452 + var collect = res.data.data.list.collect
  453 + for (var i = 0; i < collect.length; i++) {
  454 + for (var j = 0; j < collect[i].list.length; j++) {
  455 + var summary = collect[i].list
  456 + summary[j].name = summary[j].name;
  457 + summary[j].text = summary[j].num;
  458 + summary[j].plan = ''
  459 + summary[j].gap = ''
  460 + }
  461 + newsummary.push(summary)
  462 + }
  463 +
  464 + var list_num = listdetail.length
  465 + this.setData({
  466 + familymember: familymember, //家庭成员
  467 + userinfo: res.data.data.list.counselor, //顾问信息
  468 + information: information,
  469 + advise: res.data.data.list.advise,
  470 + report: res.data.data.list.report,
  471 + guarantee: res.data.data.list.guarantee,
  472 + information_user: res.data.data.list.information_user,
  473 + collect: collect,
  474 + touser: res.data.data.list.touser, //发送人
  475 + })
  476 + }
  477 + })
  478 + },
  479 +
501 //预览保单接口 480 //预览保单接口
502 listDetail2() { 481 listDetail2() {
503 let url = 'counselor/publishdef' 482 let url = 'counselor/publishdef'
@@ -505,16 +484,36 @@ Page({ @@ -505,16 +484,36 @@ Page({
505 PublishId: this.data.PublishId 484 PublishId: this.data.PublishId
506 } 485 }
507 app.post(url, params).then((res) => { 486 app.post(url, params).then((res) => {
508 - console.log(res) 487 + var familymember = res.data.data.list.family;
  488 + for (var j = 0; j < familymember.length; j++) {
  489 + familymember[j].member_state = true
  490 + }
  491 +
  492 + //保障汇总
  493 + var collect = res.data.data.list.collect
  494 + for (var j = 0; j < collect.length; j++) {
  495 + collect[j].collect_state = false
  496 + for (var i = 0; i < collect[j].list.length; i++) {
  497 + collect[j].list[i].num = collect[j].list[i].text
  498 + collect[j].collect_state = true
  499 + }
  500 + }
  501 +
  502 + //保单明细
  503 + var information = res.data.data.list.information
  504 + for (var j = 0; j < information.length; j++) {
  505 + information[j].information_state = true
  506 + }
  507 +
509 if (res.data.code == 200) { 508 if (res.data.code == 200) {
510 this.setData({ 509 this.setData({
511 familymember: res.data.data.list.family, //家庭成员 510 familymember: res.data.data.list.family, //家庭成员
512 userinfo: res.data.data.list.counselor, //顾问信息 511 userinfo: res.data.data.list.counselor, //顾问信息
513 - information: res.data.data.list.information, 512 + information: information,
514 advise: res.data.data.list.advise, 513 advise: res.data.data.list.advise,
515 report: res.data.data.list.report, 514 report: res.data.data.list.report,
516 guarantee: res.data.data.list.guarantee, 515 guarantee: res.data.data.list.guarantee,
517 - collect: res.data.data.list.collect, 516 + collect: collect,
518 touser: res.data.data.list.touser, //发送人 517 touser: res.data.data.list.touser, //发送人
519 recommend: res.data.data.list.recommend 518 recommend: res.data.data.list.recommend
520 }) 519 })
@@ -522,6 +521,16 @@ Page({ @@ -522,6 +521,16 @@ Page({
522 }) 521 })
523 }, 522 },
524 523
  524 + //发送改变状态接口
  525 + saveState() {
  526 + let url = 'counselor/publishUrl'
  527 + let params = {
  528 + PublishId: this.data.PublishId
  529 + }
  530 + app.post(url, params).then((res) => {
  531 + console.log(res)
  532 + })
  533 + },
525 534
526 535
527 /** 536 /**
@@ -549,13 +558,14 @@ Page({ @@ -549,13 +558,14 @@ Page({
549 this.setData({ 558 this.setData({
550 PublishId: 0 559 PublishId: 0
551 }) 560 })
  561 + this.listdetail()
552 } else { 562 } else {
553 this.setData({ 563 this.setData({
554 PublishId: options.PublishId 564 PublishId: options.PublishId
555 }) 565 })
556 - // this.listDetail2() 566 + this.listDetail2()
557 } 567 }
558 - this.listdetail() 568 +
559 this.caseList() 569 this.caseList()
560 }, 570 },
561 571
@@ -605,16 +615,14 @@ Page({ @@ -605,16 +615,14 @@ Page({
605 * 用户点击右上角分享 615 * 用户点击右上角分享
606 */ 616 */
607 onShareAppMessage: function() { 617 onShareAppMessage: function() {
608 - var that = this; // 设置菜单中的转发按钮触发转发事件时的转发内容  
609 - that.planList() 618 + var that = this
610 var status = that.data.status; 619 var status = that.data.status;
  620 + that.saveState()
611 var shareObj = { 621 var shareObj = {
612 title: "转发的标题", 622 title: "转发的标题",
613 path: '/pages/start/start?status=' + status, 623 path: '/pages/start/start?status=' + status,
614 imgUrl: '', 624 imgUrl: '',
615 success: function(res) { 625 success: function(res) {
616 - // console.log(res)  
617 - that.planList()  
618 if (res.errMsg == 'shareAppMessage:ok') {} 626 if (res.errMsg == 'shareAppMessage:ok') {}
619 } 627 }
620 } 628 }
@@ -625,8 +633,5 @@ Page({ @@ -625,8 +633,5 @@ Page({
625 // shareObj.path = '/pages/start/start?status=' + status; 633 // shareObj.path = '/pages/start/start?status=' + status;
626 // }   // 返回shareObj 634 // }   // 返回shareObj
627 return shareObj; 635 return shareObj;
628 - that.planList()  
629 -  
630 -  
631 } 636 }
632 }) 637 })
@@ -187,6 +187,7 @@ @@ -187,6 +187,7 @@
187 <view class='list_title'>{{sit.name}}</view> 187 <view class='list_title'>{{sit.name}}</view>
188 </view> 188 </view>
189 </view> 189 </view>
  190 + {{item.information_state}}
190 <scroll-view scroll-x> 191 <scroll-view scroll-x>
191 <view class='scroll_content_box'> 192 <view class='scroll_content_box'>
192 <view class='list_content_box' wx:for='{{information}}' wx:key='' wx:if='{{item.information_state}}'> 193 <view class='list_content_box' wx:for='{{information}}' wx:key='' wx:if='{{item.information_state}}'>
@@ -23,6 +23,7 @@ Page({ @@ -23,6 +23,7 @@ Page({
23 collect: [], 23 collect: [],
24 caselist: [], 24 caselist: [],
25 recommend:[], 25 recommend:[],
  26 + status:''
26 }, 27 },
27 // 打电话 28 // 打电话
28 makePhoneCall() { 29 makePhoneCall() {
@@ -53,7 +54,7 @@ Page({ @@ -53,7 +54,7 @@ Page({
53 PublishId: this.data.PublishId 54 PublishId: this.data.PublishId
54 } 55 }
55 app.post(url, params).then((res) => { 56 app.post(url, params).then((res) => {
56 - console.log(res) 57 + console.log('22',this.data.PublishId,res)
57 if (res.data.code == 200) { 58 if (res.data.code == 200) {
58 this.setData({ 59 this.setData({
59 familymember: res.data.data.list.family, //家庭成员 60 familymember: res.data.data.list.family, //家庭成员
@@ -64,7 +65,8 @@ Page({ @@ -64,7 +65,8 @@ Page({
64 guarantee: res.data.data.list.guarantee, 65 guarantee: res.data.data.list.guarantee,
65 collect: res.data.data.list.collect, 66 collect: res.data.data.list.collect,
66 touser: res.data.data.list.touser, //发送人 67 touser: res.data.data.list.touser, //发送人
67 - recommend: res.data.data.list.recommend 68 + recommend: res.data.data.list.recommend,
  69 + status:res.data.data.status
68 }) 70 })
69 } 71 }
70 }) 72 })
@@ -157,6 +159,22 @@ Page({ @@ -157,6 +159,22 @@ Page({
157 * 用户点击右上角分享 159 * 用户点击右上角分享
158 */ 160 */
159 onShareAppMessage: function () { 161 onShareAppMessage: function () {
160 - 162 + var that = this
  163 + var status = that.data.status;
  164 + var shareObj = {
  165 + title: "转发的标题",
  166 + path: '/pages/start/start?status=' + status,
  167 + imgUrl: '',
  168 + success: function (res) {
  169 + if (res.errMsg == 'shareAppMessage:ok') { }
  170 + }
  171 + }
  172 + // if (options.from == 'button') {
  173 + // var status = that.data.status;
  174 + // console.log(that.data.status)
  175 + // // 此处可以修改 shareObj 中的内容
  176 + // shareObj.path = '/pages/start/start?status=' + status;
  177 + // }   // 返回shareObj
  178 + return shareObj;
161 } 179 }
162 }) 180 })
1 -/* pages/index/summaryList2/summaryList2.wxss */  
2 -@import '/pages/index/summaryList/summaryList.wxss';  
  1 +@import '/pages/index/summaryList/summaryList.wxss';
  2 +
  3 +.content_item_box {
  4 + background: #fff;
  5 + padding: 0 62rpx;
  6 + display: flex;
  7 + flex-wrap: nowrap;
  8 +}
  9 +
  10 +.list_title_box {
  11 + /* min-width: 185rpx; */
  12 + width: auto;
  13 +}
  14 +
  15 +.scroll_content_box {
  16 + width: 150%;
  17 + display: flex;
  18 + flex-wrap: nowrap;
  19 +}
  20 +
  21 +.list_content_box {
  22 + /* min-width: 300rpx; */
  23 + width: auto;
  24 + margin-right: 10rpx;
  25 +}
  26 +
  27 +.list_content_box:last-child {
  28 + margin-right: 30rpx;
  29 +}
@@ -5,11 +5,10 @@ Page({ @@ -5,11 +5,10 @@ Page({
5 * 页面的初始数据 5 * 页面的初始数据
6 */ 6 */
7 data: { 7 data: {
8 - imgUrls: ['/images/code.png'], 8 + imgUrls: [],
9 }, 9 },
10 //预览图片 10 //预览图片
11 previewImage(e) { 11 previewImage(e) {
12 - console.log(e)  
13 var current = e.target.dataset.src 12 var current = e.target.dataset.src
14 wx.previewImage({ 13 wx.previewImage({
15 current: current, // 当前显示图片的http链接 14 current: current, // 当前显示图片的http链接
@@ -20,7 +19,11 @@ Page({ @@ -20,7 +19,11 @@ Page({
20 * 生命周期函数--监听页面加载 19 * 生命周期函数--监听页面加载
21 */ 20 */
22 onLoad: function(options) { 21 onLoad: function(options) {
23 - 22 + var imgUrls = this.data.imgUrls
  23 + imgUrls.push(options.imgurl)
  24 + this.setData({
  25 + imgUrls: imgUrls
  26 + })
24 }, 27 },
25 28
26 /** 29 /**
1 <!--pages/indexs/code/code.wxml--> 1 <!--pages/indexs/code/code.wxml-->
2 2
3 <view class='code'> 3 <view class='code'>
4 - <!-- <view wx:for='{{imgUrls}}' wx:key=''> -->  
5 - <!-- data-src="{{item}}" -->  
6 - <image src='/images/code.png' bindtap="previewImage"></image>  
7 - <!-- </view> --> 4 + <block wx:for='{{imgUrls}}' wx:key=''>
  5 + <image src='{{item}}' data-src="{{item}}" bindtap="previewImage"></image>
  6 + </block>
8 </view> 7 </view>
1 // pages/index/verigyCode/verigyCode.js 1 // pages/index/verigyCode/verigyCode.js
  2 +const app = getApp()
  3 +var interval = null //倒计时函数
2 Page({ 4 Page({
3 5
4 /** 6 /**
5 * 页面的初始数据 7 * 页面的初始数据
6 */ 8 */
7 data: { 9 data: {
  10 + report_state: false,
  11 + mobile: '',
  12 + date: '请选择日期',
  13 + time: '获取验证码', //倒计时
  14 + currentTime: 60,
  15 + disabled: true,
  16 + code:'',
  17 + },
  18 +
  19 + //体检报告详情检测
  20 + reportInfo() {
  21 + let that = this;
  22 + let url = 'member/publishverify';
  23 + let params = {
  24 + PubilshId: this.data.PublishId,
  25 + userId: app.globalData.UserId
  26 + }
  27 + app.post(url, params).then((res) => {
  28 + console.log('11', res, this.data.PublishId)
  29 + if (res.data.code == 200) {
  30 + this.setData({
  31 + type: res.data.data.type,
  32 + mobile: res.data.data.mobile
  33 + })
  34 + if (res.data.data.type == -1) {
  35 + this.setData({
  36 + report_state: true
  37 + })
  38 + } else {
  39 + wx.navigateTo({
  40 + url: '/pages/index/summaryList2/summaryList2?PublishId=' + this.data.PublishId,
  41 + })
  42 + }
  43 + }
  44 + }).catch((errMsg) => {
  45 + console.log(errMsg)
  46 + })
  47 + },
  48 +
  49 + //体检报告详情检测
  50 + reportInfo2() {
  51 + let that = this;
  52 + if (that.data.code == '') {
  53 + wx.showToast({
  54 + title: '请输入验证码',
  55 + icon: 'none'
  56 + })
  57 + } else {
  58 + let url = 'member/verifyPost';
  59 + let params = {
  60 + PubilshId: that.data.PublishId,
  61 + userId: app.globalData.UserId,
  62 + code: that.data.code
  63 + }
  64 + app.post(url, params).then((res) => {
  65 + console.log(that.data.PublishId, app.globalData.UserId, that.data.code)
  66 + if (res.data.code == 200) {
  67 + if(res.data.data.type==1){
  68 + wx.navigateTo({
  69 + url: '/pages/index/summaryList2/summaryList2?PublishId=' + that.data.PublishId,
  70 + })
  71 + }else{
  72 + wx.showToast({
  73 + title: '验证码超时',
  74 + icon:'none'
  75 + })
  76 + }
  77 + }
  78 + }).catch((errMsg) => {
  79 + console.log(errMsg)
  80 + })
  81 + }
  82 + },
  83 +
  84 + getCode(e){
  85 + this.setData({
  86 + code:e.detail.value
  87 + })
  88 + },
  89 +
  90 + // 倒计时按钮变化
  91 + getVerificationCode() {
  92 + if (!(/^1(3|4|5|7|8)\d{9}$/.test(this.data.mobile))) {
  93 + wx.showToast({
  94 + title: '手机号不正确',
  95 + icon: 'none',
  96 + })
  97 + } else {
  98 + this.getInfo();
  99 + let url = 'pubilc/code'
  100 + let params = {
  101 + mobile: this.data.mobile
  102 + }
  103 + app.post(url, params).then((res) => {
  104 + console.log('验证码',res)
  105 + if(res.data.data.type==1){
  106 + this.setData({
  107 + disabled: true,
  108 + })
  109 + }else{
  110 + wx.showToast({
  111 + title: '验证码错误',
  112 + icon:'none'
  113 + })
  114 + }
  115 + })
  116 + }
  117 + },
8 118
  119 + // 倒计时
  120 + getInfo() {
  121 + var that = this;
  122 + var currentTime = that.data.currentTime
  123 + interval = setInterval(function() {
  124 + currentTime--;
  125 + that.setData({
  126 + disabled: false,
  127 + time: currentTime + '秒',
  128 + })
  129 + if (currentTime <= 0) {
  130 + clearInterval(interval)
  131 + that.setData({
  132 + disabled: true,
  133 + time: '重新发送',
  134 + currentTime: 60,
  135 + })
  136 + }
  137 + }, 1000)
9 }, 138 },
10 139
  140 +
  141 +
  142 +
11 /** 143 /**
12 * 生命周期函数--监听页面加载 144 * 生命周期函数--监听页面加载
13 */ 145 */
14 - onLoad: function (options) { 146 + onLoad: function(options) {
  147 + options.PublishId ? (this.setData({
  148 + PublishId: options.PublishId
  149 + }), this.reportInfo()) : ''
15 150
16 }, 151 },
17 152
18 /** 153 /**
19 * 生命周期函数--监听页面初次渲染完成 154 * 生命周期函数--监听页面初次渲染完成
20 */ 155 */
21 - onReady: function () { 156 + onReady: function() {
22 157
23 }, 158 },
24 159
25 /** 160 /**
26 * 生命周期函数--监听页面显示 161 * 生命周期函数--监听页面显示
27 */ 162 */
28 - onShow: function () { 163 + onShow: function() {
29 164
30 }, 165 },
31 166
32 /** 167 /**
33 * 生命周期函数--监听页面隐藏 168 * 生命周期函数--监听页面隐藏
34 */ 169 */
35 - onHide: function () { 170 + onHide: function() {
36 171
37 }, 172 },
38 173
39 /** 174 /**
40 * 生命周期函数--监听页面卸载 175 * 生命周期函数--监听页面卸载
41 */ 176 */
42 - onUnload: function () { 177 + onUnload: function() {
43 178
44 }, 179 },
45 180
46 /** 181 /**
47 * 页面相关事件处理函数--监听用户下拉动作 182 * 页面相关事件处理函数--监听用户下拉动作
48 */ 183 */
49 - onPullDownRefresh: function () { 184 + onPullDownRefresh: function() {
50 185
51 }, 186 },
52 187
53 /** 188 /**
54 * 页面上拉触底事件的处理函数 189 * 页面上拉触底事件的处理函数
55 */ 190 */
56 - onReachBottom: function () { 191 + onReachBottom: function() {
57 192
58 }, 193 },
59 194
60 /** 195 /**
61 * 用户点击右上角分享 196 * 用户点击右上角分享
62 */ 197 */
63 - onShareAppMessage: function () { 198 + onShareAppMessage: function() {
64 199
65 } 200 }
66 }) 201 })
1 <!--pages/index/verigyCode/verigyCode.wxml--> 1 <!--pages/index/verigyCode/verigyCode.wxml-->
2 <!-- 判断是否需要验证 --> 2 <!-- 判断是否需要验证 -->
3 - <!-- wx:if='{{report_state}}' -->  
4 -<view class='mask_box' catchtap='cancleMask3'> 3 +<!-- wx:if='{{report_state}}' -->
  4 +<view class='mask_box' catchtap='cancleMask3' wx:if='{{report_state}}'>
5 <view class='popup_box' style='align-items:flex-start;height:400rpx'> 5 <view class='popup_box' style='align-items:flex-start;height:400rpx'>
6 <view class='popup_title'>验证码</view> 6 <view class='popup_title'>验证码</view>
7 <view class='popup_content'> 7 <view class='popup_content'>
8 - <input placeholder='请输入验证码' bindinput='setCode'></input> 8 + <view class='list_input'>
  9 + <input type='number' placeholder='请填写验证码' class='verification_code' name='code' value='{{code}}' bindinput='getCode' placeholder-class='pl_style'></input>
  10 + <view class='code_btn' wx:if='{{disabled}}' bindtap="getVerificationCode">{{time}}</view>
  11 + <view class='code_btn' wx:else>{{time}}</view>
  12 + </view>
9 <view class='popup_active' bindtap='reportInfo2'>确认</view> 13 <view class='popup_active' bindtap='reportInfo2'>确认</view>
10 </view> 14 </view>
11 </view> 15 </view>
12 -</view>  
  16 +</view>
@@ -109,3 +109,25 @@ @@ -109,3 +109,25 @@
109 align-items: center; 109 align-items: center;
110 justify-content: center; 110 justify-content: center;
111 } 111 }
  112 +
  113 +.list_input {
  114 + display: flex;
  115 +}
  116 +
  117 +.list_input input {
  118 + width: 100%;
  119 + height: 100%;
  120 + border: 0;
  121 + outline: none;
  122 + font-size: 30rpx;
  123 +}
  124 +.verification_code {
  125 + font-size: 32rpx;
  126 +}
  127 +.code_btn {
  128 + width: 230rpx;
  129 + font-size: 28rpx;
  130 + color: #de1b22;
  131 + background-color: #fff;
  132 + text-align: right;
  133 +}
@@ -20,6 +20,12 @@ Page({ @@ -20,6 +20,12 @@ Page({
20 status: '', 20 status: '',
21 }, 21 },
22 22
  23 + charge() {
  24 + wx.redirectTo({
  25 + url: '/pages/start/start',
  26 + })
  27 + },
  28 +
23 //点击切换 29 //点击切换
24 tabCharge(e) { 30 tabCharge(e) {
25 var that = this; 31 var that = this;
@@ -42,7 +48,7 @@ Page({ @@ -42,7 +48,7 @@ Page({
42 paylist: paylist 48 paylist: paylist
43 }) 49 })
44 }, 50 },
45 - 51 +
46 //展开收起 52 //展开收起
47 tabExpand2(e) { 53 tabExpand2(e) {
48 var indexs = e.currentTarget.dataset.indexs 54 var indexs = e.currentTarget.dataset.indexs
@@ -99,7 +105,7 @@ Page({ @@ -99,7 +105,7 @@ Page({
99 }) 105 })
100 } else if (res.data.data.type == -1) { 106 } else if (res.data.data.type == -1) {
101 wx.showToast({ 107 wx.showToast({
102 - title: 'T币数值错误', 108 + title: '正在人工审核',
103 icon: 'none', 109 icon: 'none',
104 duration: 2000, 110 duration: 2000,
105 }) 111 })
@@ -168,16 +174,16 @@ Page({ @@ -168,16 +174,16 @@ Page({
168 174
169 //会员充值 175 //会员充值
170 vipCharge() { 176 vipCharge() {
171 - // if (app.globalData.UserType == 4) {  
172 - // wx.showToast({  
173 - // title: '暂无权限',  
174 - // icon: 'none'  
175 - // })  
176 - // } else { 177 + if (app.globalData.UserType == 4) {
  178 + wx.showToast({
  179 + title: '暂无权限',
  180 + icon: 'none'
  181 + })
  182 + } else {
177 wx.navigateTo({ 183 wx.navigateTo({
178 url: '../index/VipRecharge/VipRecharge', 184 url: '../index/VipRecharge/VipRecharge',
179 }) 185 })
180 - // } 186 + }
181 }, 187 },
182 188
183 //报告浏览记录 189 //报告浏览记录
@@ -224,15 +230,20 @@ Page({ @@ -224,15 +230,20 @@ Page({
224 }, 230 },
225 231
226 //下载专属二维码 232 //下载专属二维码
227 - twoCode() { 233 + twoCode(e) {
  234 + let imgurl = e.currentTarget.dataset.imgurl
  235 + console.log(e)
228 if (app.globalData.UserType == 4) { 236 if (app.globalData.UserType == 4) {
229 wx.showToast({ 237 wx.showToast({
230 title: '暂无权限', 238 title: '暂无权限',
231 icon: 'none' 239 icon: 'none'
232 }) 240 })
233 } else { 241 } else {
  242 + // wx.navigateTo({
  243 + // url: '../index/twoCode/twoCode',
  244 + // })
234 wx.navigateTo({ 245 wx.navigateTo({
235 - url: '../index/twoCode/twoCode', 246 + url: '/pages/index/twoCode/twoCode?imgurl=' + imgurl,
236 }) 247 })
237 } 248 }
238 249
@@ -259,6 +270,8 @@ Page({ @@ -259,6 +270,8 @@ Page({
259 }) 270 })
260 }, 271 },
261 272
  273 + //////////// 客户个人中心 ////////////////
  274 +
262 //保单列表 275 //保单列表
263 policyList() { 276 policyList() {
264 wx.navigateTo({ 277 wx.navigateTo({
@@ -367,18 +380,20 @@ Page({ @@ -367,18 +380,20 @@ Page({
367 * 生命周期函数--监听页面加载 380 * 生命周期函数--监听页面加载
368 */ 381 */
369 onLoad: function(options) { 382 onLoad: function(options) {
370 - var that=this 383 + var that = this
371 that.setData({ 384 that.setData({
372 user_type: app.globalData.UserType 385 user_type: app.globalData.UserType
373 }) 386 })
374 - console.log(2,that.data.user_type) 387 + console.log('user-type', that.data.user_type)
375 if (app.globalData.UserType === 2 && app.globalData.UserType === app.globalData.user_index) { 388 if (app.globalData.UserType === 2 && app.globalData.UserType === app.globalData.user_index) {
376 - console.log(app.globalData.UserType, app.globalData.user_index) 389 + wx.setNavigationBarTitle({
  390 + title: '客户个人中心'
  391 + })
  392 + } else if (app.globalData.UserType === 2){
377 wx.setNavigationBarTitle({ 393 wx.setNavigationBarTitle({
378 title: '客户个人中心' 394 title: '客户个人中心'
379 }) 395 })
380 } else if (app.globalData.UserType === 3 && app.globalData.UserType === app.globalData.user_index || app.globalData.temp_UserType == app.globalData.user_index) { 396 } else if (app.globalData.UserType === 3 && app.globalData.UserType === app.globalData.user_index || app.globalData.temp_UserType == app.globalData.user_index) {
381 - console.log(app.globalData.UserType, app.globalData.user_index)  
382 wx.setNavigationBarTitle({ 397 wx.setNavigationBarTitle({
383 title: '顾问个人中心' 398 title: '顾问个人中心'
384 }) 399 })
@@ -386,7 +401,6 @@ Page({ @@ -386,7 +401,6 @@ Page({
386 temp_UserType: 3 401 temp_UserType: 3
387 }) 402 })
388 } else if (app.globalData.UserType === 4 && app.globalData.UserType === app.globalData.user_index) { 403 } else if (app.globalData.UserType === 4 && app.globalData.UserType === app.globalData.user_index) {
389 - console.log(app.globalData.UserType, app.globalData.user_index)  
390 wx.setNavigationBarTitle({ 404 wx.setNavigationBarTitle({
391 title: '传播大使个人中心' 405 title: '传播大使个人中心'
392 }) 406 })
@@ -410,7 +424,7 @@ Page({ @@ -410,7 +424,7 @@ Page({
410 that.setData({ 424 that.setData({
411 user_type: app.globalData.UserType 425 user_type: app.globalData.UserType
412 }) 426 })
413 - console.log(2, that.data.user_type) 427 + console.log('user-type', that.data.user_type)
414 if (app.globalData.UserType === 2 && app.globalData.UserType === app.globalData.user_index) { 428 if (app.globalData.UserType === 2 && app.globalData.UserType === app.globalData.user_index) {
415 console.log(app.globalData.UserType, app.globalData.user_index) 429 console.log(app.globalData.UserType, app.globalData.user_index)
416 wx.setNavigationBarTitle({ 430 wx.setNavigationBarTitle({
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 </view> 5 </view>
6 <view class='head_info_box'> 6 <view class='head_info_box'>
7 <view class='user_name'>{{user_info.name}} 7 <view class='user_name'>{{user_info.name}}
8 - <image wx:if='{{user_info.approve==1}}' src='/images/verify.png'></image> 8 + <image wx:if='{{user_info.approve==1}}' src='/images/verify.png'></image>
9 </view> 9 </view>
10 <view>{{user_info.mobile}}</view> 10 <view>{{user_info.mobile}}</view>
11 <view>{{user_info.work}}</view> 11 <view>{{user_info.work}}</view>
@@ -15,6 +15,9 @@ @@ -15,6 +15,9 @@
15 <view class='iconfont icon-xiugai'></view> 15 <view class='iconfont icon-xiugai'></view>
16 <view>修改个人资料</view> 16 <view>修改个人资料</view>
17 </view> 17 </view>
  18 + <view class='edit_box edit2' bindtap='charge' wx:if='{{user_type==4}}'>
  19 + <view>身份切换</view>
  20 + </view>
18 </view> 21 </view>
19 <!-- 顾问个人中心 --> 22 <!-- 顾问个人中心 -->
20 <view class='content_box' wx:if='{{user_type==3||temp_UserType==3}}'> 23 <view class='content_box' wx:if='{{user_type==3||temp_UserType==3}}'>
@@ -84,7 +87,7 @@ @@ -84,7 +87,7 @@
84 <view class='iconfont icon-jinru'></view> 87 <view class='iconfont icon-jinru'></view>
85 </view> 88 </view>
86 </view> 89 </view>
87 - <view class='item_list' bindtap='twoCode'> 90 + <view class='item_list' bindtap='twoCode' data-imgurl='{{counselor.wechat_code}}'>
88 <view class='list_icon'> 91 <view class='list_icon'>
89 <text class='iconfont icon-xiazai'></text> 92 <text class='iconfont icon-xiazai'></text>
90 </view> 93 </view>
@@ -193,7 +196,7 @@ @@ -193,7 +196,7 @@
193 <block wx:if='{{currentTab==1}}'> 196 <block wx:if='{{currentTab==1}}'>
194 <view class='share_box'> 197 <view class='share_box'>
195 <view class='envoy_content_box share'> 198 <view class='envoy_content_box share'>
196 - <textarea class='share_content' value='{{sharetext}}' bindinput='shareText'></textarea> 199 + <textarea class='share_content' value='{{sharetext}}' bindinput='shareText'></textarea>
197 <view> 200 <view>
198 <button class='share_btn' open-type='share' data-status='{{status}}' data-sharetext='{{sharetext}}'> 201 <button class='share_btn' open-type='share' data-status='{{status}}' data-sharetext='{{sharetext}}'>
199 <text>立即分享</text> 202 <text>立即分享</text>
@@ -203,7 +206,7 @@ @@ -203,7 +206,7 @@
203 </view> 206 </view>
204 </view> 207 </view>
205 <view class='content_box'> 208 <view class='content_box'>
206 - <view class='item_list' bindtap='sharecode' data-imgurl='{{popularize.wechat_code}}'> 209 + <view class='item_list' bindtap='twoCode' data-imgurl='{{counselor.wechat_code}}'>
207 <view class='list_icon'> 210 <view class='list_icon'>
208 <text class='iconfont icon-jisuanqi'></text> 211 <text class='iconfont icon-jisuanqi'></text>
209 </view> 212 </view>
@@ -253,6 +256,7 @@ @@ -253,6 +256,7 @@
253 </view> 256 </view>
254 </view> 257 </view>
255 <view class='popup_btn' catchtap='confirmWithdrawal'>确认提现</view> 258 <view class='popup_btn' catchtap='confirmWithdrawal'>确认提现</view>
  259 + <view class='popup_info'>提示:提现到微信零钱包</view>
256 </view> 260 </view>
257 </view> 261 </view>
258 </view> 262 </view>
@@ -64,7 +64,19 @@ page { @@ -64,7 +64,19 @@ page {
64 top: 50%; 64 top: 50%;
65 transform: translateY(-50%); 65 transform: translateY(-50%);
66 } 66 }
67 - 67 +.edit2{
  68 + display: flex;
  69 + align-items: center;
  70 + font-size: 26rpx;
  71 + color: #f80;
  72 + background: #fff;
  73 + border-radius: 26rpx 0 0 26rpx;
  74 + padding: 13rpx;
  75 + position: absolute;
  76 + right: 0;
  77 + top: 77%;
  78 + transform: translateY(-50%);
  79 +}
68 .icon-xiugai { 80 .icon-xiugai {
69 font-size: 26rpx; 81 font-size: 26rpx;
70 margin-right: 11rpx; 82 margin-right: 11rpx;
@@ -314,7 +326,11 @@ page { @@ -314,7 +326,11 @@ page {
314 border-bottom: 1rpx solid #ebebeb; 326 border-bottom: 1rpx solid #ebebeb;
315 padding: 30rpx 0; 327 padding: 30rpx 0;
316 } 328 }
317 - 329 +.popup_info{
  330 + font-size: 25rpx;
  331 + color: #999;
  332 + text-align: center;
  333 +}
318 .popup_content { 334 .popup_content {
319 padding: 35rpx 22rpx; 335 padding: 35rpx 22rpx;
320 } 336 }
@@ -10,7 +10,10 @@ Page({ @@ -10,7 +10,10 @@ Page({
10 clientState: false, 10 clientState: false,
11 elcheeState: false, 11 elcheeState: false,
12 report_state: false, 12 report_state: false,
  13 + share_state: false,
13 PublishId: '', 14 PublishId: '',
  15 + img: '',
  16 + GoId: '',
14 }, 17 },
15 18
16 //登录 19 //登录
@@ -28,7 +31,7 @@ Page({ @@ -28,7 +31,7 @@ Page({
28 status: that.data.status //分享进入的需要此参数 31 status: that.data.status //分享进入的需要此参数
29 } 32 }
30 app.post(url, params).then((res) => { 33 app.post(url, params).then((res) => {
31 - console.log('start', res.data.data.UserType, res.data.data.checkstatus, res.data.data.PublishId) 34 + // console.log('start', res.data.data.UserType, res.data.data.checkstatus, res.data.data.PublishId)
32 if (res.data.code == '200') { 35 if (res.data.code == '200') {
33 app.globalData.OpenId = res.data.data.OpenId; 36 app.globalData.OpenId = res.data.data.OpenId;
34 app.globalData.UserId = res.data.data.UserId; 37 app.globalData.UserId = res.data.data.UserId;
@@ -37,8 +40,8 @@ Page({ @@ -37,8 +40,8 @@ Page({
37 app.globalData.checkstatus = res.data.data.checkstatus; //分享参数(0无,1保单,2注册,3文章) 40 app.globalData.checkstatus = res.data.data.checkstatus; //分享参数(0无,1保单,2注册,3文章)
38 res.data.data.PublishId ? that.setData({ 41 res.data.data.PublishId ? that.setData({
39 PublishId: res.data.data.PublishId 42 PublishId: res.data.data.PublishId
40 - }):''  
41 - 43 + }) : ''
  44 +
42 if (res.data.data.UserType == 4) { 45 if (res.data.data.UserType == 4) {
43 app.globalData.temp_UserType = 3 46 app.globalData.temp_UserType = 3
44 } 47 }
@@ -52,9 +55,11 @@ Page({ @@ -52,9 +55,11 @@ Page({
52 url: '../index/index' 55 url: '../index/index'
53 }) 56 })
54 } else if (res.data.data.checkstatus == '1') { //1为保单分享 57 } else if (res.data.data.checkstatus == '1') { //1为保单分享
55 - // that.reportInfo(res.data.data.PublishId)  
56 wx.navigateTo({ 58 wx.navigateTo({
57 - url: '/pages/index/summaryList2/summaryList2?PublishId=' + res.data.data.PublishId, 59 + url: '/pages/index/verigyCode/verigyCode?PublishId=' + res.data.data.PublishId,
  60 + })
  61 + this.setData({
  62 + share_state: true
58 }) 63 })
59 } else if (res.data.data.checkstatus == '2') { //2为注册分享 64 } else if (res.data.data.checkstatus == '2') { //2为注册分享
60 wx.navigateTo({ 65 wx.navigateTo({
@@ -64,6 +69,9 @@ Page({ @@ -64,6 +69,9 @@ Page({
64 wx.navigateTo({ 69 wx.navigateTo({
65 url: '/pages/index/ArticleDetails/ArticleDetails?NewsId=' + res.data.data.NewsId + '&GoId=' + res.data.data.GoId 70 url: '/pages/index/ArticleDetails/ArticleDetails?NewsId=' + res.data.data.NewsId + '&GoId=' + res.data.data.GoId
66 }) 71 })
  72 + this.setData({
  73 + GoId: res.data.data.GoId
  74 + })
67 } else if (res.data.data.checkstatus == undefined) { //分享失败 75 } else if (res.data.data.checkstatus == undefined) { //分享失败
68 76
69 } else { 77 } else {
@@ -75,50 +83,33 @@ Page({ @@ -75,50 +83,33 @@ Page({
75 wx.switchTab({ 83 wx.switchTab({
76 url: '../personalCenter/personalCenter' 84 url: '../personalCenter/personalCenter'
77 }) 85 })
78 - // if (app.globalData.user_index != 2) {  
79 - // this.setData({  
80 - // clientState: true,  
81 - // })  
82 - // } else if (app.globalData.user_index == 2) {  
83 - // wx.switchTab({  
84 - // url: '../personalCenter/personalCenter'  
85 - // })  
86 - // }  
87 } else if (res.data.data.UserType === 4 && res.data.data.UserType == user_index) { 86 } else if (res.data.data.UserType === 4 && res.data.data.UserType == user_index) {
88 wx.switchTab({ 87 wx.switchTab({
89 url: '../personalCenter/personalCenter' 88 url: '../personalCenter/personalCenter'
90 }) 89 })
91 - // if (app.globalData.user_index != 4) {  
92 - // this.setData({  
93 - // elcheeState: true  
94 - // })  
95 - // } else if (app.globalData.user_index == 4) {  
96 - // wx.switchTab({  
97 - // url: '../personalCenter/personalCenter'  
98 - // })  
99 - // }  
100 } else if (res.data.data.UserType === 3 && res.data.data.UserType == user_index || app.globalData.temp_UserType == user_index) { 90 } else if (res.data.data.UserType === 3 && res.data.data.UserType == user_index || app.globalData.temp_UserType == user_index) {
101 wx.switchTab({ 91 wx.switchTab({
102 url: '../index/index', 92 url: '../index/index',
103 }) 93 })
104 } else { 94 } else {
105 - // wx.showToast({  
106 - // title: '没有权限',  
107 - // icon: 'none'  
108 - // })  
109 if (app.globalData.UserType == 2) { 95 if (app.globalData.UserType == 2) {
110 - console.log(111)  
111 if (app.globalData.user_index != 2) { 96 if (app.globalData.user_index != 2) {
112 - this.setData({  
113 - clientState: true,  
114 - }) 97 + if (this.data.share_state) {
  98 + this.setData({
  99 + clientState: false,
  100 + })
  101 + } else {
  102 + this.setData({
  103 + clientState: true,
  104 + })
  105 + }
115 } 106 }
116 } else if (app.globalData.UserType != 4) { 107 } else if (app.globalData.UserType != 4) {
117 - console.log(222)  
118 if (app.globalData.user_index == 4) { 108 if (app.globalData.user_index == 4) {
119 this.setData({ 109 this.setData({
120 elcheeState: true 110 elcheeState: true
121 }) 111 })
  112 + this.getCode()
122 } 113 }
123 if (app.globalData.user_index == 2) { 114 if (app.globalData.user_index == 2) {
124 wx.showToast({ 115 wx.showToast({
@@ -126,8 +117,7 @@ Page({ @@ -126,8 +117,7 @@ Page({
126 icon: 'none' 117 icon: 'none'
127 }) 118 })
128 } 119 }
129 - } else if (app.globalData.UserType == 3 || app.globalData.UserType ==4) {  
130 - console.log(333) 120 + } else if (app.globalData.UserType == 3 || app.globalData.UserType == 4) {
131 if (app.globalData.user_index == 2) { 121 if (app.globalData.user_index == 2) {
132 wx.showToast({ 122 wx.showToast({
133 title: '没有权限', 123 title: '没有权限',
@@ -160,9 +150,9 @@ Page({ @@ -160,9 +150,9 @@ Page({
160 }, 150 },
161 151
162 cancleMask3() { 152 cancleMask3() {
163 - this.setData({  
164 - report_state: false  
165 - }) 153 + // this.setData({
  154 + // report_state: false
  155 + // })
166 }, 156 },
167 157
168 getpower() { //用户授权 158 getpower() { //用户授权
@@ -191,12 +181,14 @@ Page({ @@ -191,12 +181,14 @@ Page({
191 this.setData({ 181 this.setData({
192 elcheeState: true 182 elcheeState: true
193 }) 183 })
  184 + this.getCode()
194 } 185 }
195 } else if (app.globalData.UserType == 4) { 186 } else if (app.globalData.UserType == 4) {
196 if (app.globalData.user_index != 4) { 187 if (app.globalData.user_index != 4) {
197 this.setData({ 188 this.setData({
198 elcheeState: true 189 elcheeState: true
199 }) 190 })
  191 + this.getCode()
200 } else if (app.globalData.user_index == 4) { 192 } else if (app.globalData.user_index == 4) {
201 wx.switchTab({ 193 wx.switchTab({
202 url: '../personalCenter/personalCenter' 194 url: '../personalCenter/personalCenter'
@@ -252,7 +244,6 @@ Page({ @@ -252,7 +244,6 @@ Page({
252 PubilshId: PublishId, 244 PubilshId: PublishId,
253 UserId: app.globalData.UserId 245 UserId: app.globalData.UserId
254 }).then((res) => { 246 }).then((res) => {
255 - console.log('detail', res, PublishId)  
256 if (res.data.code == 200) { 247 if (res.data.code == 200) {
257 this.setData({ 248 this.setData({
258 type: res.data.data.type, 249 type: res.data.data.type,
@@ -276,8 +267,11 @@ Page({ @@ -276,8 +267,11 @@ Page({
276 267
277 //体检报告详情检测 268 //体检报告详情检测
278 reportInfo2() { 269 reportInfo2() {
  270 + console.log(that.data.PubilshId,'aa')
279 let that = this; 271 let that = this;
280 - console.log(that.data.PubilshId) 272 + that.setData({
  273 + report_state: false
  274 + })
281 if (that.data.code == '') { 275 if (that.data.code == '') {
282 wx.showToast({ 276 wx.showToast({
283 title: '请输入验证码', 277 title: '请输入验证码',
@@ -304,6 +298,23 @@ Page({ @@ -304,6 +298,23 @@ Page({
304 }, 298 },
305 299
306 300
  301 + getCode() {
  302 + let that = this;
  303 + let url = 'pubilc/Dimension';
  304 + let params = {}
  305 + app.post(url, params).then((res) => {
  306 + if (res.data.code == 200) {
  307 + that.setData({
  308 + img: res.data.data.piclur
  309 + })
  310 + console.log(that.data.img)
  311 + }
  312 + }).catch((errMsg) => {
  313 + console.log(errMsg)
  314 + })
  315 + },
  316 +
  317 +
307 setCode(e) { 318 setCode(e) {
308 this.setData({ 319 this.setData({
309 code: e.detail.value 320 code: e.detail.value
@@ -27,6 +27,7 @@ @@ -27,6 +27,7 @@
27 </button> 27 </button>
28 </view> 28 </view>
29 </view> 29 </view>
  30 +<view class='bottom_info' wx:if="{{GoId!=''}}">提示:非注册用户点击我是客户进入文章浏览</view>
30 31
31 <!-- 提示弹窗 --> 32 <!-- 提示弹窗 -->
32 <view class='mask_box' wx:if='{{clientState}}' catchtap='cancleMask'> 33 <view class='mask_box' wx:if='{{clientState}}' catchtap='cancleMask'>
@@ -46,7 +47,8 @@ @@ -46,7 +47,8 @@
46 <view class='code_content'>如果您是保险行业大咖,请扫二维码(或 保存图片再打开微信识别)联系我们 47 <view class='code_content'>如果您是保险行业大咖,请扫二维码(或 保存图片再打开微信识别)联系我们
47 </view> 48 </view>
48 <view class='code_img'> 49 <view class='code_img'>
49 - <image src='/images/img2.png'></image> 50 + <!-- <image src='/images/img2.png'></image> -->
  51 + <image src='{{img}}'></image>
50 </view> 52 </view>
51 </view> 53 </view>
52 </view> 54 </view>
@@ -57,7 +59,7 @@ @@ -57,7 +59,7 @@
57 <view class='popup_title'>验证码</view> 59 <view class='popup_title'>验证码</view>
58 <view class='popup_content'> 60 <view class='popup_content'>
59 <input placeholder='请输入验证码' bindinput='setCode'></input> 61 <input placeholder='请输入验证码' bindinput='setCode'></input>
60 - <view class='popup_active' bindtap='reportInfo2'>确认</view> 62 + <view class='popup_active' catchtap='reportInfo2'>确认</view>
61 </view> 63 </view>
62 </view> 64 </view>
63 </view> 65 </view>
@@ -74,7 +74,11 @@ @@ -74,7 +74,11 @@
74 .bottom_btn .promoter_btn { 74 .bottom_btn .promoter_btn {
75 background: linear-gradient(to right, #21ccc4, #3ee4ba); 75 background: linear-gradient(to right, #21ccc4, #3ee4ba);
76 } 76 }
77 - 77 +.bottom_info{
  78 + text-align: center;
  79 + font-size: 30rpx;
  80 + color: #999;
  81 +}
78 /* mask_box */ 82 /* mask_box */
79 83
80 .mask_box { 84 .mask_box {
@@ -37,22 +37,9 @@ @@ -37,22 +37,9 @@
37 "list": [] 37 "list": []
38 }, 38 },
39 "miniprogram": { 39 "miniprogram": {
40 - "current": 10, 40 + "current": 9,
41 "list": [ 41 "list": [
42 { 42 {
43 - "id": 0,  
44 - "name": "保单添加",  
45 - "pathName": "pages/index/addListDetail/addListDetail",  
46 - "query": "",  
47 - "scene": null  
48 - },  
49 - {  
50 - "id": -1,  
51 - "name": "保单体检",  
52 - "pathName": "pages/index/periodicReviews/periodicReviews",  
53 - "query": ""  
54 - },  
55 - {  
56 "id": 2, 43 "id": 2,
57 "name": "保单体检", 44 "name": "保单体检",
58 "pathName": "pages/index/periodicReviews/periodicReviews", 45 "pathName": "pages/index/periodicReviews/periodicReviews",
@@ -109,6 +96,13 @@ @@ -109,6 +96,13 @@
109 "pathName": "pages/index/policyManage/policyManage", 96 "pathName": "pages/index/policyManage/policyManage",
110 "query": "FamilyId=19", 97 "query": "FamilyId=19",
111 "scene": null 98 "scene": null
  99 + },
  100 + {
  101 + "id": -1,
  102 + "name": "保单添加",
  103 + "pathName": "pages/index/addListDetail/addListDetail",
  104 + "query": "def_id=135&FamilyId=70&name=333",
  105 + "scene": null
112 } 106 }
113 ] 107 ]
114 } 108 }