作者 刘晓艳

家庭保险

... ... @@ -286,6 +286,10 @@ Page({
warn = "请填写您的性别";
} else if (list.family_role == '') {
warn = '请填写您的家庭角色'
} else if (list.mobile == '') {
warn = '请填写您的手机号'
} else if (!(/^[1][3,4,5,7,8][0-9]{9}$/.test(list.mobile))) {
warn = "手机号格式不正确";
} else if (list.birthday == '') {
warn = "请填选择您的出生日期"
} else {
... ... @@ -400,11 +404,10 @@ Page({
app.post(url, {
family_id: this.data.familyid
}).then((res) => {
console.log(res)
if (res.data.code == 200) {
var list = that.data.list
console.log(list)
list.address = res.data.data.address
list.mobile=res.data.data.mobile
that.setData({
list: list
})
... ...
... ... @@ -37,8 +37,11 @@
<view>万</view>
</view>
</view>
<view class='item_list' >
<view class='list_title'>手机号 </view>
<view class='item_list'>
<view class='list_title'>
<text class='list_icon'>*</text>
<text>手机号</text>
</view>
<view class='list_input'>
<input type='number' placeholder='请输入手机号' value='{{list.mobile}}' bindinput='setMobile'></input>
</view>
... ... @@ -71,7 +74,7 @@
<view class='list_title'>家庭地址 </view>
<view class='list_input'>
<!-- wx:if='{{list.address}}' -->
<textarea type='text' placeholder='请输入家庭地址' value='{{list.address}}' bindinput='setSddress' ></textarea>
<textarea type='text' placeholder='请输入家庭地址' value='{{list.address}}' bindinput='setSddress'></textarea>
</view>
</view>
... ...
... ... @@ -64,7 +64,8 @@ Page({
edit_state3: false,
coverage: '',
focus: false,
sub_index: ''
sub_index: '',
birthday:''
},
//回到顶部
... ... @@ -81,32 +82,13 @@ Page({
}
},
//取消弹窗
cancleMask() {
// if (this.data.inforid != 0) {
// if (this.data.edit_state3) {
// this.setData({
// edit_state: false,
// edit_state2: false
// })
// } else {
// this.setData({
// edit_state: true,
// edit_state2: true
// })
// }
// } else {
// this.setData({
// edit_state: false,
// edit_state2: false
// })
// }
// console.log(this.data.edit_state)
this.setData({
popup_state: false,
})
},
//保单号
policyNum(e) {
this.setData({
... ... @@ -124,9 +106,10 @@ Page({
//投保人
insureSelect(e) {
var insure = this.data.insure
console.log(insure)
this.setData({
insureindex: e.detail.value,
applicant_name: insure[e.detail.value],
applicant_name: insure[e.detail.value].name,
})
},
... ... @@ -153,7 +136,6 @@ Page({
})
},
//保费
yearMoney(e) {
this.setData({
... ... @@ -203,18 +185,30 @@ Page({
let that = this;
let type = e.currentTarget.dataset.type;
let index = e.currentTarget.dataset.xulie;
// 复制保障项目模板
// let tempProjectlist = Object.assign({}, this.data.projectlist);
let tempProjectlist = JSON.parse(JSON.stringify(this.data.projectlist));
// for (var i = 0; i < tempProjectlist.length; i++) {
// for (var j = 0; j < tempProjectlist[i].title.length; j++) {
// tempProjectlist[i].title[0].label_state = true
// }
// }
var sub_index = that.data.sub_index
var edit_state3 = that.data.edit_state3
// 已经添加的附加险
let risk_list = Object.assign([],this.data.risk_list);
this.setData({
type: type,
xielie: index
})
let risk_list = Object.assign([], this.data.risk_list);
// this.setData({
// type: type,
// xielie: index
// })
if (type == 'fujiaxian') {
this.setData({
... ... @@ -222,7 +216,7 @@ Page({
})
}
// 已经添加的主险
let tempMain_list = Object.assign([],this.data.main_array)
let tempMain_list = Object.assign([], this.data.main_array)
this.data.inforid != 0 && this.data.inforid != undefined
if (type == 'zhuxian') {
if (tempMain_list.length > 0) {
... ... @@ -234,6 +228,8 @@ Page({
for (let g in tempProjectlist[i].title) {
if (tempProjectlist[i].title[g].t_id == tempMain_list[j].t_id) {
tempProjectlist[i].title[g].label_state = true
} else {
tempProjectlist[i].title[g].label_state = false
}
}
}
... ... @@ -251,6 +247,8 @@ Page({
for (let g in tempProjectlist[i].title) {
if (tempProjectlist[i].title[g].t_id == tempRist[j].t_id) {
tempProjectlist[i].title[g].label_state = true
} else {
tempProjectlist[i].title[g].label_state = false
}
}
}
... ... @@ -258,10 +256,11 @@ Page({
}
}
}
// }
wx.setNavigationBarTitle({
title: '选择保障项目',
})
this.setData({
popup_state: true,
addType: type,
... ... @@ -285,7 +284,7 @@ Page({
projectlist[i].title[j].label_state = false
}
// projectlist[i].title[0].current = 0
// projectlist[i].title[0].label_state = true
projectlist[i].title[0].label_state = true
}
this.setData({
projectlist: res.data.data.def,
... ... @@ -339,6 +338,7 @@ Page({
this.setData({
showProjectlist: projectlist,
})
if (this.data.inforid != 0) {
edit_state: false;
edit_state2: false
... ... @@ -347,34 +347,23 @@ Page({
//确认选择的推荐方案
confirmCase() {
// if (this.data.type == 'fujiaxian') {
// this.setData({
// edit_state2: false
// })
// } else {
// this.setData({
// edit_state: false
// })
// }
let index = this.data.xulie;
let type = this.data.addType;
var that = this
var main_array = []
var projectlist = Object.assign([], this.data.showProjectlist)
for (var i = 0; i < projectlist.length; i++) {
if (projectlist[i].choose_status) {
let baseData = Object.assign({}, projectlist[i]);
console.log(baseData)
let temprist = projectlist[i];
for (var j in temprist.title){
if (temprist.title[j].label_state){
for (var j in temprist.title) {
if (temprist.title[j].label_state) {
baseData.title = temprist.title[j].name;
baseData.t_id = temprist.title[j].t_id;
baseData.choose_status = temprist.title[j].choose_status;
}else{
break;
} else {
baseData.title = '';
}
}
... ... @@ -390,7 +379,6 @@ Page({
if (type == 'fujiaxian') {
let tempRist = that.data.risk_list;
console.log(tempRist)
tempRist[index]['mo'] = main_array;
that.setData({
risk_list: tempRist,
... ... @@ -401,6 +389,7 @@ Page({
})
}
}
setTimeout(function() {
that.ensureProjectList()
that.setData({
... ... @@ -410,6 +399,7 @@ Page({
title: '添加保单',
})
}, 800)
},
//重组主险的保障项目
... ... @@ -443,7 +433,8 @@ Page({
var index = e.currentTarget.dataset.index
risk_list[index].name = e.detail.value
this.setData({
risk_list: risk_list
risk_list: risk_list,
focus: false
})
},
... ... @@ -483,7 +474,6 @@ Page({
// }
// }
// }
// console.log(temp_risk)
// }
this.setData({
... ... @@ -493,29 +483,20 @@ Page({
//选择受益人姓名
beneficiarySelect(e) {
if (this.data.inforid != 0) {
// this.setData({
// edit_state: true,
// edit_state2: true
// })
}
var index = e.currentTarget.dataset.mindex
var beneficiary_list = Object.assign({}, this.data.projectlist)
// 获取当前已选择的收益人
let tempBenefice = Object.assign({}, this.data.projectlist)
// 当前选择的收益人
// let nowPerson = beneficiary_list[index].name_array[e.detail.value];
// let nowPerson = beneficiary_list[index].beneficiary_name
let nowPerson = beneficiary_list[index].name
// 判断受益人是否已经添加
const add = tempBenefice.every((tempBenefice) => {
return tempBenefice != nowPerson
})
if (add) {
// beneficiary_list[index].beneficiary_name = nowPerson;
beneficiary_list[index].name = nowPerson;
tempBenefice.push(nowPerson)
console.log(tempBenefice)
} else {
wx.showToast({
title: '请不要重复添加受益人',
... ... @@ -545,6 +526,7 @@ Page({
beneficiary_list: beneficiary_list,
})
},
//添加收益比例
addUnit2(e) {
var beneficiary_list = this.data.beneficiary_list;
... ... @@ -613,7 +595,6 @@ Page({
icon: 'none'
})
} else if (list[len - 1].unit == '') {
console.log('unit')
wx.showToast({
title: '请输入收益比',
icon: 'none'
... ... @@ -628,7 +609,6 @@ Page({
this.setData({
beneficiary_list: list
})
console.log(this.data.beneficiary_list)
},
//重组添加受益人
... ... @@ -646,15 +626,14 @@ Page({
this.setData({
tempfavoree: tempfavoree1
})
}
},
//删除收益人
deletebenefict(e) {
let index = e.currentTarget.dataset.index;
let tempbenefict = Object.assign({},this.data.beneficiary_list);
let beneficiaryList = Object.assign({},this.data.beneficiaryList);
let tempbenefict = this.data.beneficiary_list
let beneficiaryList = this.data.beneficiaryList
// 获取当前选项的受益人
// let person = tempbenefict[index].beneficiary_name;
let person = tempbenefict[index].name;
... ... @@ -669,13 +648,8 @@ Page({
//添加附加险
addRisk() {
if (this.data.inforid != 0) {
// this.setData({
// edit_state: false,
// edit_state2: false
// })
}
var risk_list = Object.assign({},this.data.risk_list);
// var risk_list = Object.assign({}, this.data.risk_list);
var risk_list = this.data.risk_list;
var len = risk_list.length
risk_list[len] = {
name: '',
... ... @@ -685,14 +659,15 @@ Page({
num: ''
}
this.setData({
risk_list: risk_list
risk_list: risk_list,
focus: false
})
},
//删除附加险
deleteRisk(e) {
let index = e.currentTarget.dataset.index;
let risk_list = Object.assign({},this.data.risk_list);
let risk_list = this.data.risk_list;
risk_list.splice(index, 1);
this.setData({
risk_list: risk_list
... ... @@ -770,10 +745,7 @@ Page({
},
complete: () => {
i++;
if (i == length) {
} else { //递归调用uploadDIY函数
if (i == length) {} else { //递归调用uploadDIY函数
this.uploadAllfile(filePaths, successUp, failUp, i, length);
}
},
... ... @@ -785,9 +757,7 @@ Page({
var imgs = this.data.imgs
var current = e.currentTarget.dataset.index
wx.previewImage({
//当前显示图片
current: imgs[current],
//所有图片
urls: imgs
})
},
... ... @@ -804,12 +774,6 @@ Page({
//保障期
warrantyTwo(e) {
if (this.data.inforid != 0) {
// this.setData({
// edit_state: false,
// edit_state2: false
// })
}
var guarantee_name = e.detail.value
var warranty_two = this.data.warranty_two
var impletion_time = this.data.impletion_time
... ... @@ -823,7 +787,6 @@ Page({
//选择各项单位
selectUnit(e) {
console.log(e)
var unit = e.currentTarget.dataset.unit
this.setData({
unit: unit,
... ... @@ -832,7 +795,7 @@ Page({
if (unit == '终身') {
this.setData({
'warranty_two.num': '',
'warranty_one':''
'warranty_one': ''
})
this.setData({
warranty_info: '',
... ... @@ -857,7 +820,6 @@ Page({
// warranty_two: warranty_two
// })
this.data.warranty_two.title = this.data.unit
console.log(this.data.warranty_two)
},
... ... @@ -871,9 +833,8 @@ Page({
var day = parseInt(new Date(compact_time).getDate())
var warranty_one = this.data.warranty_one
var tempbirth_time = ''
var birthday = ''
var birthday = this.data.birthday
var birthday_year = parseInt(new Date(birthday).getFullYear())
if (compact_time == '') {
wx.showToast({
title: '请选择合同生效日',
... ... @@ -885,16 +846,16 @@ Page({
var temp_day = day - 1
if (month < 10) month = "0" + month;
if (temp_day < 10) temp_day = "0" + temp_day;
warranty_one = guarantee_name ? (temp_year + '-' + month + '-' + temp_day):''
// warranty_one = temp_year + '-' + month + '-' + temp_day
warranty_one = guarantee_name ? (temp_year + '-' + month + '-' + temp_day) : ''
warranty_one = temp_year + '-' + month + '-' + temp_day
} else if (unit == '岁') {
var temp_year = (birthday_year + guarantee_name - 1)
var temp_year2 = (birthday_year + guarantee_name)
// var temp_year = (birthday_year + guarantee_name - 1)
var temp_year = (birthday_year + guarantee_name)
var temp_month = month
if (temp_month < 10) temp_month = "0" + temp_month;
if (month < 10) month = "0" + month;
if (day < 10) day = "0" + day;
warranty_one = guarantee_name ? (temp_year2 + '-' + month + '-' + day) : ''
warranty_one = guarantee_name ? (temp_year + '-' + month + '-' + day) : ''
// warranty_one = temp_year2 + '-' + month + '-' + day
} else if (unit == '终身') {
warranty_one = '终身'
... ... @@ -928,7 +889,7 @@ Page({
this.data.long_money.title = unit;
if (unit == '终身') {
this.setData({
'long_money.num':''
'long_money.num': ''
})
this.setData({
warranty_info1: '',
... ... @@ -968,7 +929,7 @@ Page({
var day = parseInt(new Date(compact_time).getDate())
var impletion_time = this.data.impletion_time
var tempbirth_time = ''
var birthday = ''
var birthday = this.data.birthday
var birthday_year = parseInt(new Date(birthday).getFullYear())
if (compact_time == '') {
... ... @@ -1015,20 +976,17 @@ Page({
selectUnit4(e) {
var unit = e.currentTarget.dataset.unit;
let index = e.currentTarget.dataset.index;
let risk_list = Object.assign([],this.data.risk_list);
var focus=this.data.focus
// let risk_list = Object.assign([], this.data.risk_list);
let risk_list = this.data.risk_list
risk_list[index].title = unit
if (risk_list[index].title == '终身') {
risk_list[index].num = ''
this.setData({
risk_state: true
})
} else {
this.setData({
risk_state: false
})
focus=true
}
this.setData({
risk_list: risk_list
risk_list: risk_list,
focus: focus
})
},
... ... @@ -1040,17 +998,17 @@ Page({
FamilyId: FamilyId || id,
}
app.post(url, params).then((res) => {
console.log(res)
// 受益人数组
// var beneficiary_list = this.data.beneficiary_list
// for (var i in beneficiary_list) {
// beneficiary_list[i].name_array = res.data.data.list
// }
if (res.data.code == 200) {
this.setData({
insure: res.data.data.list,
recognizee: res.data.data.list,
birthday:res.data.data.list[0].birthday
// beneficiary_list: beneficiary_list,
})
}
... ... @@ -1129,7 +1087,6 @@ Page({
def_id: this.data.def_id,
}
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code == 200) {
var warranty_two = res.data.data.def.warranty_two
var unit = this.data.unit
... ... @@ -1176,10 +1133,6 @@ Page({
bank_num: res.data.data.def.bank_num,
risk_list: res.data.data.def.more,
beneficiary_list: beneficiary_list,
// edit_state: true,
// edit_state2: true,
// edit_state3: true,
temp_state: true
})
}
})
... ... @@ -1187,7 +1140,6 @@ Page({
//完成保单添加
listVerify(e) {
console.log(e)
if (this.data.inforid == 0 || this.data.inforid == undefined) {
this.tempBeneficiary()
this.tempWarranty()
... ... @@ -1380,7 +1332,6 @@ Page({
},
//获取编辑保单接口
getlistVerify(id) {
let url = 'counselor/infordef'
... ... @@ -1388,7 +1339,6 @@ Page({
InfoId: this.data.inforid || id,
}
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code == 200) {
var warranty_two = res.data.data.def.warranty_two
var unit = this.data.unit
... ... @@ -1409,7 +1359,7 @@ Page({
}
var risk_list = res.data.data.def.more
var projectlist = Object.assign({},this.data.projectlist)
var projectlist = Object.assign({}, this.data.projectlist)
for (var i = 0; i < risk_list.length; i++) {
for (var j = 0; j < projectlist.length; j++) {
... ... @@ -1453,10 +1403,6 @@ Page({
bank_num: res.data.data.def.bank_num,
risk_list: risk_list,
beneficiary_list: beneficiary_list,
// edit_state: true,
// edit_state2: true,
// edit_state3: true,
temp_state: true,
guarantee_name: guarantee_name,
time_name: time_name,
})
... ...
... ... @@ -38,19 +38,19 @@
<text>保单号</text>
</view>
<view class='list_input'>
<input type='text' placeholder='请输入' name='policy_num' value='{{in_num}}' bindinput='policyNum'></input>
<input type='text' placeholder='请输入' name='policy_num' value="{{in_num!='undefined'?in_num:''}}" bindinput='policyNum'></input>
</view>
</view>
<view class='item_list'>
<view class='list_title'>所属公司</view>
<view class='list_input'>
<input type='text' placeholder='请输入' name='company' value='{{firm}}' bindinput='setFirm'></input>
<input type='text' placeholder='请输入' name='company' value="{{firm!='undefined'?firm:''}}" bindinput='setFirm'></input>
</view>
</view>
<view class='item_list'>
<view class='list_title'>投保人</view>
<view class='list_input'>
<picker class='picker' range='{{insure}}' value='{{insureindex}}' bindchange='insureSelect'>
<picker class='picker' range='{{insure}}' value='{{insureindex}}' range-key='name' bindchange='insureSelect'>
<input type='text' placeholder='请选择' name='policy_holder' value='{{applicant_name}}' disabled='true'></input>
</picker>
</view>
... ...
... ... @@ -400,7 +400,7 @@ page {
}
.popup_label_item {
width: 82rpx;
width: 85rpx;
height: 62rpx;
background: rgba(255, 255, 255, 1);
border: 1rpx solid rgba(0, 122, 255, 1);
... ...
... ... @@ -12,11 +12,11 @@ Page({
// 跳转顾问认证
getList() {
var that=this
let url = 'member/counselorlist';
let params = {
UserId: app.globalData.UserId
}
wx.showLoading({
title: '加载中',
success: function() {
... ... @@ -24,7 +24,7 @@ Page({
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code = 200) {
this.setData({
that.setData({
list: res.data.data.list
})
}
... ...
... ... @@ -15,9 +15,20 @@ Page({
signature: '',
worktime: '',
hasimg: '',
approve_pic: ''
approve_pic: '',
imgs: [],
mobile:'',
},
//预览图片
viewImg(e) {
var imgs = this.data.imgs
var current = e.currentTarget.dataset.index
wx.previewImage({
current: imgs[current],
urls: imgs
})
},
//获取资料详情
userInfo() {
... ... @@ -26,11 +37,18 @@ Page({
UserId: app.globalData.UserId
}
app.post(url, params).then((res) => {
console.log(res.data.data.list.work_time == '0000-00-00')
console.log(res)
var worktime = res.data.data.list.work_time
if (res.data.data.list.work_time == '0000-00-00') {
worktime = ''
}
var picture = res.data.data.list.approve_pic
if (picture == 'https://insurance.w.broteam.cn/upload/') {
picture = ''
}
var imgs = this.data.imgs
var picurl = res.data.data.list.avatar
imgs.push(picurl)
if (res.data.code == 200) {
this.setData({
userinfo: res.data.data.list,
... ... @@ -38,11 +56,13 @@ Page({
work: res.data.data.list.work,
workpost: res.data.data.list.work_post,
city: res.data.data.list.city,
mobile: res.data.data.list.mobile,
honor: res.data.data.list.honor,
signature: res.data.data.list.signature,
worktime: worktime,
hasimg: res.data.data.list.avatar,
approve_pic: res.data.data.list.approve_pic,
approve_pic: picture,
imgs: imgs
})
}
})
... ... @@ -75,8 +95,11 @@ Page({
var data = JSON.parse(res.data);
var picurl = data.data.picurl;
picurl = picurl.indexOf('http') != '-1' ? picurl : "http://" + picurl
var imgs = that.data.imgs
imgs.push(picurl)
that.setData({
hasimg: picurl
hasimg: picurl,
imgs: imgs
})
}
... ... @@ -145,6 +168,12 @@ Page({
})
},
//
getPhone(e) {
this.setData({
mobile: e.detail.value
})
},
//
honor(e) {
this.setData({
honor: e.detail.value
... ... @@ -173,6 +202,7 @@ Page({
Work: this.data.work,
WorkPost: this.data.workpost,
City: this.data.city,
Mobile:this.data.mobile,
Honor: this.data.honor,
Signature: this.data.signature,
WorkTime: this.data.worktime,
... ...
<!--pages/my/editProfile/editProfile.wxml-->
<view class='banner_box' bindtap='chooseimg'>
<view class='banner_box' catchtap='chooseimg'>
<view class='header_portrait' wx:if='{{!hasimg}}'>
<image src="{{userinfo.avatar}}"></image>
<!-- <image src="{{userinfo.avatar}}"></image> -->
<view class='iconfont icon-bi'></view>
<block wx:for='{{imgs}}' wx:key>
<image src="{{item}}" catchtap='viewImg'></image>
</block>
</view>
<view class='header_portrait'>
<!-- <view class='iconfont icon-zhaoxiangji1'></view> -->
<view class='iconfont icon-bi'></view>
<image src="{{hasimg}}"></image>
<block wx:for='{{imgs}}' wx:key>
<image src="{{item}}" catchtap='viewImg'></image>
</block>
</view>
</view>
<view class="content_item">
... ... @@ -46,6 +50,12 @@
<input type="text" placeholder='请输入' placeholder-class='pl_style' value="{{city}}" class="input_item" bindinput='city'></input>
</view>
</view>
<view class="item_list">
<view class="list_title">手机号</view>
<view class="list_content">
<input type="text" placeholder='请输入' placeholder-class='pl_style' value="{{mobile}}" class="input_item" bindinput='getPhone'></input>
</view>
</view>
</view>
<view class="content_item">
<view class="item_list">
... ... @@ -72,7 +82,7 @@
<view class='upload_box' bindtap='chooseimg2'>
<view wx:if="{{approve_pic==''}}">
<view class='iconfont icon-add'></view>
<view>上传照片</view>
<view>上传奖项或荣誉照片</view>
</view>
<view class='popup_img' wx:else>
<!-- <view class='iconfont icon-guanbi' catchtap='deleteImg' data-index='{{index}}'></view> -->
... ...
... ... @@ -16,16 +16,25 @@ Page({
signature: '',
worktime: '',
hasimg: '',
approve_pic: ''
approve_pic: '',
imgs:[],
},
//预览图片
viewImg(e) {
var imgs = this.data.imgs
var current = e.currentTarget.dataset.index
wx.previewImage({
current: imgs[current],
urls: imgs
})
},
//获取资料详情
userInfo() {
let url = 'member/counselordef'
let params = {
CounselorId: this.data.CounselorId
// CounselorId: 413
}
app.post(url, params).then((res) => {
console.log(res)
... ... @@ -34,6 +43,9 @@ Page({
if (res.data.data.data.work_time == '0000-00-00') {
worktime = ''
}
var avatar = res.data.data.data.avatar
var imgs=this.data.imgs
imgs.push(avatar)
if (res.data.code == 200) {
this.setData({
userinfo: res.data.data.data,
... ... @@ -45,6 +57,7 @@ Page({
signature: res.data.data.data.signature,
worktime: worktime,
avatar: res.data.data.data.avatar,
imgs: imgs,
approve_pic: res.data.data.data.approve_pic,
})
}
... ... @@ -57,7 +70,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
console.log(11,options.CounselorId)
console.log(11, options.CounselorId)
this.setData({
CounselorId: options.CounselorId
})
... ...
<!--pages/my/editProfile/editProfile.wxml-->
<view class='banner_box' bindtap='chooseimg'>
<view class='header_portrait'>
<image src="{{avatar}}"></image>
<!-- <image src="{{avatar}}" catchtap='viewImg'></image> -->
<block wx:for='{{imgs}}' wx:key>
<image src="{{item}}" catchtap='viewImg'></image>
</block>
<!-- <view class='iconfont icon-bi'></view> -->
</view>
<!-- <view class='header_portrait'>
... ... @@ -60,13 +64,9 @@
</view>
<view class='box'>
<!-- 上传图片 -->
<view class='upload_box' bindtap='chooseimg2'>
<!-- <view wx:if="{{approve_pic==''}}">
<view class='iconfont icon-add'></view>
<view>上传照片</view>
</view> -->
<view class='upload_box'>
<view class='popup_img'>
<image src='{{approve_pic}}' bindtap='viewImg' data-index='{{index}}'></image>
<image src='{{approve_pic}}' data-index='{{index}}'></image>
</view>
</view>
</view>
... ...
... ... @@ -21,6 +21,12 @@ Page({
duration: 500, //滑动时间
},
charge(){
wx.redirectTo({
url: '/pages/start/start',
})
},
//轮播图
swiperChange: function(e) {
this.setData({
... ...
... ... @@ -29,3 +29,5 @@
<view class='cell' style='background-image:url({{modules[3].picurl}});'bindtap='weikaifa'>
</view>
</view>
<!-- <view class='null_box'></view>
<view class='bottom_btn' bindtap='charge'>切换身份</view> -->
\ No newline at end of file
... ...
... ... @@ -11,6 +11,7 @@ swiper {
}
/*用来包裹所有的小圆点 */
.dots {
width: 156rpx;
height: 36rpx;
... ... @@ -83,7 +84,7 @@ page {
.cell {
width: 350rpx;
height: 200rpx;
margin:0 0 20rpx 0;
margin: 0 0 20rpx 0;
/* padding:20rpx 30rpx 30rpx 30rpx; */
border-radius: 5rpx;
background-position: center;
... ... @@ -97,12 +98,30 @@ page {
color: #fff;
font-size: 36rpx;
font-weight: bold;
margin:30rpx 0 0 30rpx;
margin: 30rpx 0 0 30rpx;
}
.cell_subtitle {
color: #fff;
opacity: 0.4;
font-size: 24rpx;
margin:10rpx 0 0 30rpx;
margin: 10rpx 0 0 30rpx;
}
.null_box{
width: 100%;
height: 100rpx;
}
.bottom_btn {
position: fixed;
bottom: 30rpx;
left: 30rpx;
width: 92%;
height: 80rpx;
border-radius: 60rpx;
background: #248dff;
font-size: 32rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
}
... ...
... ... @@ -2,7 +2,7 @@
<view class='banner_box' id='{{VipId}}'>
<view>{{title}}</view>
<!-- <text class='money'>100</text> 元 </view>-->
<view class='banner_hint'>返{{moneyt}}T币</view>
<view class='banner_hint'>微信支付返{{moneyt}}T币</view>
</view>
<view class='content_item'>
<view class='item_list' bindtap='setpaytype1'>
... ...
... ... @@ -27,7 +27,6 @@ Page({
that.setData({
personalpolicylist: res.data.data.list
})
console.log(res.data.data.list)
}
})
}, 100)
... ... @@ -53,7 +52,6 @@ Page({
that.setData({
DefId: options.DefId
})
this.personalPolicyList()
},
... ...
... ... @@ -5,7 +5,7 @@
<view class='item_list'>
<view class='list_title_box'>
<view>
<text class='user_name'>{{item.recognizee}}</text>
<text class='user_name'>顾问:{{item.counselor}}</text>
<text class='phone_num'>{{item.umobile}}</text>
</view>
<view class='list_icon_box' catchtap='makePhoneCall' data-index='{{index}}'>
... ... @@ -18,7 +18,7 @@
</view>
<view>
<text class='list_title'>主险名称</text>
<text>平安保险</text>
<text>{{item.main_risks}}</text>
</view>
<view>
<text class='list_title'>生效日</text>
... ... @@ -30,7 +30,7 @@
</view>
<view>
<text class='list_title'>保费</text>
<text>10万元</text>
<text>{{item.year_money}}万元</text>
</view>
</view>
</view>
... ...
... ... @@ -75,7 +75,7 @@
</view>
<view class='item_list'>
<view class='list_title'>续费账号</view>
<view class='list_input'>{{listdetail.bank_num}}</view>
<view class='list_input' wx:if='{{listdetail.bank_num!=0}}'>{{listdetail.bank_num}}</view>
</view>
<view class='item_list'>
<view class='list_title'>缴费期满日</view>
... ... @@ -91,13 +91,17 @@
<!-- <text class='list_input'> -->
<view>
<text class='list_title' style='margin-right:20rpx;'>附加险名称 </text>
<text class='list_title' style='margin-right:60rpx;'>附加险名称 </text>
<text>{{item.name}}</text>
</view>
<view>
<text class='list_title' style='margin-right:50rpx;'>保障项目 </text>
<text wx:for='{{item.mo}}' wx:key wx:for-item='its'>
<text style='margin-right:30rpx;'>{{its.name}} {{its.num}}{{its.title}}</text></text>
<view class='item_list2'>
<view class='list_title' style='margin-right:50rpx;'>保障项目 </view>
<view class='list_info2'>
<block wx:for='{{item.mo}}' wx:key wx:for-item='its'>
<view>{{its.name}} {{its.num}}{{its.title}}</view>
</block>
</view>
</view>
<!-- </text> -->
</view>
... ...
... ... @@ -46,6 +46,15 @@ page {
color: #000;
}
.item_list2 {
display: flex;
align-items: flex-start;
}
.list_info2 {
width: 80%;
}
.list_title {
width: 190rpx;
color: #000;
... ... @@ -66,9 +75,10 @@ page {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap
flex-wrap: wrap;
}
.bottom_box image{
.bottom_box image {
width: 330rpx;
height: 330rpx;
margin: 30rpx 0;
... ...
... ... @@ -7,7 +7,8 @@ Page({
*/
data: {
inforlist: [],
mainid: ''
mainid: '',
cid: '',
},
//添加保单
... ... @@ -83,7 +84,7 @@ Page({
// cid = 5 & mainid=65
var mainid = this.data.mainid
wx.navigateTo({
url: '../remind/remind?mainid=' + mainid,
url: '../remind/remind?mainid=' + mainid + '&cid=' + this.data.cid,
})
},
... ... @@ -91,8 +92,6 @@ Page({
getData() {
let url = 'counselor/familyinfor';
let that = this;
wx.showLoading({
title: '加载中',
success: function() {
... ... @@ -100,10 +99,12 @@ Page({
app.post(url, {
FamilyId: that.data.FamilyId
}).then((res) => {
console.log(res)
if (res.data.code == 200) {
that.setData({
inforlist: res.data.data.inforlist,
mainid: res.data.data.inforlist[0].def_id
mainid: res.data.data.inforlist[0].def_id,
cid: res.data.data.cid
})
}
}).catch((errMsg) => {
... ...
... ... @@ -16,6 +16,7 @@ Page({
// 体检报告列表接口调取
medicalReportList() {
var that=this
let url = 'member/publishlist'
let params = {
UserId: app.globalData.UserId
... ... @@ -27,7 +28,7 @@ Page({
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code == 200) {
this.setData({
that.setData({
medicalreportlist: res.data.data.list,
})
}
... ...
... ... @@ -54,12 +54,13 @@ Page({
var familymember = this.data.familymember
var collect = this.data.collect
var information = this.data.information
console.log('information', information)
var information_user = this.data.information_user
var index = e.currentTarget.dataset.index
familymember[index].member_state = !(familymember[index].member_state)
for (var j = 0; j < collect.length; j++) {
console.log(familymember[index].id == parseInt(collect[j].def_id))
if (familymember[index].id == parseInt(collect[j].def_id)) {
if (familymember[index].member_state) {
collect[j].collect_state = true
... ... @@ -79,6 +80,7 @@ Page({
}
}
for (var j = 0; j < information_user.length; j++) {
if (familymember[index].id == parseInt(information_user[j].def_id)) {
if (familymember[index].member_state) {
... ... @@ -207,67 +209,6 @@ Page({
})
},
// 预览保单接口调取
listdetail() {
let url = 'counselor/publishlook'
let params = {
UserId: app.globalData.UserId,
DefId: this.data.mid,
DefIds: this.data.DefIds,
}
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code == 200) {
//保单详情
var listdetail = res.data.data.list.information
//家庭成员项选择
var familymember = res.data.data.list.family;
for (var j = 0; j < familymember.length; j++) {
familymember[j].member_state = false
}
//保障汇总
var collect = res.data.data.list.collect;
for (var j = 0; j < collect.length; j++) {
collect[j].collect_state = false
}
//保单明细
var information = res.data.data.list.information
for (var j = 0; j < information.length; j++) {
information[j].information_state = false
}
//保险汇总表
var newsummary = []
var collect = res.data.data.list.collect
for (var i = 0; i < collect.length; i++) {
for (var j = 0; j < collect[i].list.length; j++) {
var summary = collect[i].list
summary[j].name = summary[j].name;
summary[j].text = summary[j].num;
summary[j].plan = ''
summary[j].gap = ''
}
newsummary.push(summary)
}
var list_num = listdetail.length
this.setData({
familymember: familymember, //家庭成员
userinfo: res.data.data.list.counselor, //顾问信息
information: information,
advise: res.data.data.list.advise,
report: res.data.data.list.report,
guarantee: res.data.data.list.guarantee,
information_user: res.data.data.list.information_user,
collect: collect,
touser: res.data.data.list.touser, //发送人
})
}
})
},
//建议保额
suggestForehead(e) {
... ... @@ -291,14 +232,11 @@ Page({
collect: collect
})
}
console.log(this.data.collect)
},
tempCollects() {
var collects = this.data.collect;
console.log(collects)
var endcollects = [];
for (let i in collects) {
let tem = {}
... ... @@ -382,7 +320,6 @@ Page({
userId: app.globalData.UserId
}
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code == 200) {
var caselist = res.data.data.list
for (var i = 0; i < caselist.length; i++) {
... ... @@ -391,28 +328,10 @@ Page({
that.setData({
caselist: caselist,
})
console.log(that.data.caselist)
}
})
},
//预设方案列表
planList() {
let that = this;
let url = 'counselor/publishUrl';
let params = {
PublishId: that.data.plan_id
}
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code == 200) {
}
})
},
tempRecomment() {
var caselist = this.data.caselist
var temp_array = [];
... ... @@ -425,13 +344,11 @@ Page({
temp_array.push(temp)
}
}
console.log(temp_array)
this.setData({
recommend: temp_array
})
},
//发送给客户
saveInfo() {
this.tempRecomment()
... ... @@ -457,7 +374,6 @@ Page({
}
}
console.log(ids)
if (ids != '') {
var that = this;
var report = this.data.report
... ... @@ -486,7 +402,8 @@ Page({
status: res.data.data.status,
shareState: true,
save_state: false,
plan_id: res.data.data.publish_id
plan_id: res.data.data.publish_id,
PublishId: res.data.data.publish_id
})
}
})
... ... @@ -498,6 +415,68 @@ Page({
}
},
// 预览保单接口调取
listdetail() {
let url = 'counselor/publishlook'
let params = {
UserId: app.globalData.UserId,
DefId: this.data.mid,
DefIds: this.data.DefIds,
}
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code == 200) {
//保单详情
var listdetail = res.data.data.list.information
//家庭成员项选择
var familymember = res.data.data.list.family;
for (var j = 0; j < familymember.length; j++) {
familymember[j].member_state = false
}
//保障汇总
var collect = res.data.data.list.collect;
for (var j = 0; j < collect.length; j++) {
collect[j].collect_state = false
}
//保单明细
var information = res.data.data.list.information
for (var j = 0; j < information.length; j++) {
information[j].information_state = false
}
//保险汇总表
var newsummary = []
var collect = res.data.data.list.collect
for (var i = 0; i < collect.length; i++) {
for (var j = 0; j < collect[i].list.length; j++) {
var summary = collect[i].list
summary[j].name = summary[j].name;
summary[j].text = summary[j].num;
summary[j].plan = ''
summary[j].gap = ''
}
newsummary.push(summary)
}
var list_num = listdetail.length
this.setData({
familymember: familymember, //家庭成员
userinfo: res.data.data.list.counselor, //顾问信息
information: information,
advise: res.data.data.list.advise,
report: res.data.data.list.report,
guarantee: res.data.data.list.guarantee,
information_user: res.data.data.list.information_user,
collect: collect,
touser: res.data.data.list.touser, //发送人
})
}
})
},
//预览保单接口
listDetail2() {
let url = 'counselor/publishdef'
... ... @@ -505,16 +484,36 @@ Page({
PublishId: this.data.PublishId
}
app.post(url, params).then((res) => {
console.log(res)
var familymember = res.data.data.list.family;
for (var j = 0; j < familymember.length; j++) {
familymember[j].member_state = true
}
//保障汇总
var collect = res.data.data.list.collect
for (var j = 0; j < collect.length; j++) {
collect[j].collect_state = false
for (var i = 0; i < collect[j].list.length; i++) {
collect[j].list[i].num = collect[j].list[i].text
collect[j].collect_state = true
}
}
//保单明细
var information = res.data.data.list.information
for (var j = 0; j < information.length; j++) {
information[j].information_state = true
}
if (res.data.code == 200) {
this.setData({
familymember: res.data.data.list.family, //家庭成员
userinfo: res.data.data.list.counselor, //顾问信息
information: res.data.data.list.information,
information: information,
advise: res.data.data.list.advise,
report: res.data.data.list.report,
guarantee: res.data.data.list.guarantee,
collect: res.data.data.list.collect,
collect: collect,
touser: res.data.data.list.touser, //发送人
recommend: res.data.data.list.recommend
})
... ... @@ -522,6 +521,16 @@ Page({
})
},
//发送改变状态接口
saveState() {
let url = 'counselor/publishUrl'
let params = {
PublishId: this.data.PublishId
}
app.post(url, params).then((res) => {
console.log(res)
})
},
/**
... ... @@ -549,13 +558,14 @@ Page({
this.setData({
PublishId: 0
})
this.listdetail()
} else {
this.setData({
PublishId: options.PublishId
})
// this.listDetail2()
this.listDetail2()
}
this.listdetail()
this.caseList()
},
... ... @@ -605,16 +615,14 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage: function() {
var that = this; // 设置菜单中的转发按钮触发转发事件时的转发内容
that.planList()
var that = this
var status = that.data.status;
that.saveState()
var shareObj = {
title: "转发的标题",
path: '/pages/start/start?status=' + status,
imgUrl: '',
success: function(res) {
// console.log(res)
that.planList()
if (res.errMsg == 'shareAppMessage:ok') {}
}
}
... ... @@ -625,8 +633,5 @@ Page({
// shareObj.path = '/pages/start/start?status=' + status;
// }   // 返回shareObj
return shareObj;
that.planList()
}
})
\ No newline at end of file
... ...
... ... @@ -187,6 +187,7 @@
<view class='list_title'>{{sit.name}}</view>
</view>
</view>
{{item.information_state}}
<scroll-view scroll-x>
<view class='scroll_content_box'>
<view class='list_content_box' wx:for='{{information}}' wx:key='' wx:if='{{item.information_state}}'>
... ...
... ... @@ -23,6 +23,7 @@ Page({
collect: [],
caselist: [],
recommend:[],
status:''
},
// 打电话
makePhoneCall() {
... ... @@ -53,7 +54,7 @@ Page({
PublishId: this.data.PublishId
}
app.post(url, params).then((res) => {
console.log(res)
console.log('22',this.data.PublishId,res)
if (res.data.code == 200) {
this.setData({
familymember: res.data.data.list.family, //家庭成员
... ... @@ -64,7 +65,8 @@ Page({
guarantee: res.data.data.list.guarantee,
collect: res.data.data.list.collect,
touser: res.data.data.list.touser, //发送人
recommend: res.data.data.list.recommend
recommend: res.data.data.list.recommend,
status:res.data.data.status
})
}
})
... ... @@ -157,6 +159,22 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage: function () {
var that = this
var status = that.data.status;
var shareObj = {
title: "转发的标题",
path: '/pages/start/start?status=' + status,
imgUrl: '',
success: function (res) {
if (res.errMsg == 'shareAppMessage:ok') { }
}
}
// if (options.from == 'button') {
// var status = that.data.status;
// console.log(that.data.status)
// // 此处可以修改 shareObj 中的内容
// shareObj.path = '/pages/start/start?status=' + status;
// }   // 返回shareObj
return shareObj;
}
})
\ No newline at end of file
... ...
/* pages/index/summaryList2/summaryList2.wxss */
@import '/pages/index/summaryList/summaryList.wxss';
.content_item_box {
background: #fff;
padding: 0 62rpx;
display: flex;
flex-wrap: nowrap;
}
.list_title_box {
/* min-width: 185rpx; */
width: auto;
}
.scroll_content_box {
width: 150%;
display: flex;
flex-wrap: nowrap;
}
.list_content_box {
/* min-width: 300rpx; */
width: auto;
margin-right: 10rpx;
}
.list_content_box:last-child {
margin-right: 30rpx;
}
... ...
... ... @@ -5,11 +5,10 @@ Page({
* 页面的初始数据
*/
data: {
imgUrls: ['/images/code.png'],
imgUrls: [],
},
//预览图片
previewImage(e) {
console.log(e)
var current = e.target.dataset.src
wx.previewImage({
current: current, // 当前显示图片的http链接
... ... @@ -20,7 +19,11 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
var imgUrls = this.data.imgUrls
imgUrls.push(options.imgurl)
this.setData({
imgUrls: imgUrls
})
},
/**
... ...
<!--pages/indexs/code/code.wxml-->
<view class='code'>
<!-- <view wx:for='{{imgUrls}}' wx:key=''> -->
<!-- data-src="{{item}}" -->
<image src='/images/code.png' bindtap="previewImage"></image>
<!-- </view> -->
<block wx:for='{{imgUrls}}' wx:key=''>
<image src='{{item}}' data-src="{{item}}" bindtap="previewImage"></image>
</block>
</view>
\ No newline at end of file
... ...
// pages/index/verigyCode/verigyCode.js
const app = getApp()
var interval = null //倒计时函数
Page({
/**
* 页面的初始数据
*/
data: {
report_state: false,
mobile: '',
date: '请选择日期',
time: '获取验证码', //倒计时
currentTime: 60,
disabled: true,
code:'',
},
//体检报告详情检测
reportInfo() {
let that = this;
let url = 'member/publishverify';
let params = {
PubilshId: this.data.PublishId,
userId: app.globalData.UserId
}
app.post(url, params).then((res) => {
console.log('11', res, this.data.PublishId)
if (res.data.code == 200) {
this.setData({
type: res.data.data.type,
mobile: res.data.data.mobile
})
if (res.data.data.type == -1) {
this.setData({
report_state: true
})
} else {
wx.navigateTo({
url: '/pages/index/summaryList2/summaryList2?PublishId=' + this.data.PublishId,
})
}
}
}).catch((errMsg) => {
console.log(errMsg)
})
},
//体检报告详情检测
reportInfo2() {
let that = this;
if (that.data.code == '') {
wx.showToast({
title: '请输入验证码',
icon: 'none'
})
} else {
let url = 'member/verifyPost';
let params = {
PubilshId: that.data.PublishId,
userId: app.globalData.UserId,
code: that.data.code
}
app.post(url, params).then((res) => {
console.log(that.data.PublishId, app.globalData.UserId, that.data.code)
if (res.data.code == 200) {
if(res.data.data.type==1){
wx.navigateTo({
url: '/pages/index/summaryList2/summaryList2?PublishId=' + that.data.PublishId,
})
}else{
wx.showToast({
title: '验证码超时',
icon:'none'
})
}
}
}).catch((errMsg) => {
console.log(errMsg)
})
}
},
getCode(e){
this.setData({
code:e.detail.value
})
},
// 倒计时按钮变化
getVerificationCode() {
if (!(/^1(3|4|5|7|8)\d{9}$/.test(this.data.mobile))) {
wx.showToast({
title: '手机号不正确',
icon: 'none',
})
} else {
this.getInfo();
let url = 'pubilc/code'
let params = {
mobile: this.data.mobile
}
app.post(url, params).then((res) => {
console.log('验证码',res)
if(res.data.data.type==1){
this.setData({
disabled: true,
})
}else{
wx.showToast({
title: '验证码错误',
icon:'none'
})
}
})
}
},
// 倒计时
getInfo() {
var that = this;
var currentTime = that.data.currentTime
interval = setInterval(function() {
currentTime--;
that.setData({
disabled: false,
time: currentTime + '秒',
})
if (currentTime <= 0) {
clearInterval(interval)
that.setData({
disabled: true,
time: '重新发送',
currentTime: 60,
})
}
}, 1000)
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
onLoad: function(options) {
options.PublishId ? (this.setData({
PublishId: options.PublishId
}), this.reportInfo()) : ''
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
<!--pages/index/verigyCode/verigyCode.wxml-->
<!-- 判断是否需要验证 -->
<!-- wx:if='{{report_state}}' -->
<view class='mask_box' catchtap='cancleMask3'>
<!-- wx:if='{{report_state}}' -->
<view class='mask_box' catchtap='cancleMask3' wx:if='{{report_state}}'>
<view class='popup_box' style='align-items:flex-start;height:400rpx'>
<view class='popup_title'>验证码</view>
<view class='popup_content'>
<input placeholder='请输入验证码' bindinput='setCode'></input>
<view class='list_input'>
<input type='number' placeholder='请填写验证码' class='verification_code' name='code' value='{{code}}' bindinput='getCode' placeholder-class='pl_style'></input>
<view class='code_btn' wx:if='{{disabled}}' bindtap="getVerificationCode">{{time}}</view>
<view class='code_btn' wx:else>{{time}}</view>
</view>
<view class='popup_active' bindtap='reportInfo2'>确认</view>
</view>
</view>
... ...
... ... @@ -109,3 +109,25 @@
align-items: center;
justify-content: center;
}
.list_input {
display: flex;
}
.list_input input {
width: 100%;
height: 100%;
border: 0;
outline: none;
font-size: 30rpx;
}
.verification_code {
font-size: 32rpx;
}
.code_btn {
width: 230rpx;
font-size: 28rpx;
color: #de1b22;
background-color: #fff;
text-align: right;
}
\ No newline at end of file
... ...
... ... @@ -20,6 +20,12 @@ Page({
status: '',
},
charge() {
wx.redirectTo({
url: '/pages/start/start',
})
},
//点击切换
tabCharge(e) {
var that = this;
... ... @@ -99,7 +105,7 @@ Page({
})
} else if (res.data.data.type == -1) {
wx.showToast({
title: 'T币数值错误',
title: '正在人工审核',
icon: 'none',
duration: 2000,
})
... ... @@ -168,16 +174,16 @@ Page({
//会员充值
vipCharge() {
// if (app.globalData.UserType == 4) {
// wx.showToast({
// title: '暂无权限',
// icon: 'none'
// })
// } else {
if (app.globalData.UserType == 4) {
wx.showToast({
title: '暂无权限',
icon: 'none'
})
} else {
wx.navigateTo({
url: '../index/VipRecharge/VipRecharge',
})
// }
}
},
//报告浏览记录
... ... @@ -224,15 +230,20 @@ Page({
},
//下载专属二维码
twoCode() {
twoCode(e) {
let imgurl = e.currentTarget.dataset.imgurl
console.log(e)
if (app.globalData.UserType == 4) {
wx.showToast({
title: '暂无权限',
icon: 'none'
})
} else {
// wx.navigateTo({
// url: '../index/twoCode/twoCode',
// })
wx.navigateTo({
url: '../index/twoCode/twoCode',
url: '/pages/index/twoCode/twoCode?imgurl=' + imgurl,
})
}
... ... @@ -259,6 +270,8 @@ Page({
})
},
//////////// 客户个人中心 ////////////////
//保单列表
policyList() {
wx.navigateTo({
... ... @@ -367,18 +380,20 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
var that=this
var that = this
that.setData({
user_type: app.globalData.UserType
})
console.log(2,that.data.user_type)
console.log('user-type', that.data.user_type)
if (app.globalData.UserType === 2 && app.globalData.UserType === app.globalData.user_index) {
console.log(app.globalData.UserType, app.globalData.user_index)
wx.setNavigationBarTitle({
title: '客户个人中心'
})
} else if (app.globalData.UserType === 2){
wx.setNavigationBarTitle({
title: '客户个人中心'
})
} else if (app.globalData.UserType === 3 && app.globalData.UserType === app.globalData.user_index || app.globalData.temp_UserType == app.globalData.user_index) {
console.log(app.globalData.UserType, app.globalData.user_index)
wx.setNavigationBarTitle({
title: '顾问个人中心'
})
... ... @@ -386,7 +401,6 @@ Page({
temp_UserType: 3
})
} else if (app.globalData.UserType === 4 && app.globalData.UserType === app.globalData.user_index) {
console.log(app.globalData.UserType, app.globalData.user_index)
wx.setNavigationBarTitle({
title: '传播大使个人中心'
})
... ... @@ -410,7 +424,7 @@ Page({
that.setData({
user_type: app.globalData.UserType
})
console.log(2, that.data.user_type)
console.log('user-type', that.data.user_type)
if (app.globalData.UserType === 2 && app.globalData.UserType === app.globalData.user_index) {
console.log(app.globalData.UserType, app.globalData.user_index)
wx.setNavigationBarTitle({
... ...
... ... @@ -15,6 +15,9 @@
<view class='iconfont icon-xiugai'></view>
<view>修改个人资料</view>
</view>
<view class='edit_box edit2' bindtap='charge' wx:if='{{user_type==4}}'>
<view>身份切换</view>
</view>
</view>
<!-- 顾问个人中心 -->
<view class='content_box' wx:if='{{user_type==3||temp_UserType==3}}'>
... ... @@ -84,7 +87,7 @@
<view class='iconfont icon-jinru'></view>
</view>
</view>
<view class='item_list' bindtap='twoCode'>
<view class='item_list' bindtap='twoCode' data-imgurl='{{counselor.wechat_code}}'>
<view class='list_icon'>
<text class='iconfont icon-xiazai'></text>
</view>
... ... @@ -203,7 +206,7 @@
</view>
</view>
<view class='content_box'>
<view class='item_list' bindtap='sharecode' data-imgurl='{{popularize.wechat_code}}'>
<view class='item_list' bindtap='twoCode' data-imgurl='{{counselor.wechat_code}}'>
<view class='list_icon'>
<text class='iconfont icon-jisuanqi'></text>
</view>
... ... @@ -253,6 +256,7 @@
</view>
</view>
<view class='popup_btn' catchtap='confirmWithdrawal'>确认提现</view>
<view class='popup_info'>提示:提现到微信零钱包</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -64,7 +64,19 @@ page {
top: 50%;
transform: translateY(-50%);
}
.edit2{
display: flex;
align-items: center;
font-size: 26rpx;
color: #f80;
background: #fff;
border-radius: 26rpx 0 0 26rpx;
padding: 13rpx;
position: absolute;
right: 0;
top: 77%;
transform: translateY(-50%);
}
.icon-xiugai {
font-size: 26rpx;
margin-right: 11rpx;
... ... @@ -314,7 +326,11 @@ page {
border-bottom: 1rpx solid #ebebeb;
padding: 30rpx 0;
}
.popup_info{
font-size: 25rpx;
color: #999;
text-align: center;
}
.popup_content {
padding: 35rpx 22rpx;
}
... ...
... ... @@ -10,7 +10,10 @@ Page({
clientState: false,
elcheeState: false,
report_state: false,
share_state: false,
PublishId: '',
img: '',
GoId: '',
},
//登录
... ... @@ -28,7 +31,7 @@ Page({
status: that.data.status //分享进入的需要此参数
}
app.post(url, params).then((res) => {
console.log('start', res.data.data.UserType, res.data.data.checkstatus, res.data.data.PublishId)
// console.log('start', res.data.data.UserType, res.data.data.checkstatus, res.data.data.PublishId)
if (res.data.code == '200') {
app.globalData.OpenId = res.data.data.OpenId;
app.globalData.UserId = res.data.data.UserId;
... ... @@ -37,7 +40,7 @@ Page({
app.globalData.checkstatus = res.data.data.checkstatus; //分享参数(0无,1保单,2注册,3文章)
res.data.data.PublishId ? that.setData({
PublishId: res.data.data.PublishId
}):''
}) : ''
if (res.data.data.UserType == 4) {
app.globalData.temp_UserType = 3
... ... @@ -52,9 +55,11 @@ Page({
url: '../index/index'
})
} else if (res.data.data.checkstatus == '1') { //1为保单分享
// that.reportInfo(res.data.data.PublishId)
wx.navigateTo({
url: '/pages/index/summaryList2/summaryList2?PublishId=' + res.data.data.PublishId,
url: '/pages/index/verigyCode/verigyCode?PublishId=' + res.data.data.PublishId,
})
this.setData({
share_state: true
})
} else if (res.data.data.checkstatus == '2') { //2为注册分享
wx.navigateTo({
... ... @@ -64,6 +69,9 @@ Page({
wx.navigateTo({
url: '/pages/index/ArticleDetails/ArticleDetails?NewsId=' + res.data.data.NewsId + '&GoId=' + res.data.data.GoId
})
this.setData({
GoId: res.data.data.GoId
})
} else if (res.data.data.checkstatus == undefined) { //分享失败
} else {
... ... @@ -75,50 +83,33 @@ Page({
wx.switchTab({
url: '../personalCenter/personalCenter'
})
// if (app.globalData.user_index != 2) {
// this.setData({
// clientState: true,
// })
// } else if (app.globalData.user_index == 2) {
// wx.switchTab({
// url: '../personalCenter/personalCenter'
// })
// }
} else if (res.data.data.UserType === 4 && res.data.data.UserType == user_index) {
wx.switchTab({
url: '../personalCenter/personalCenter'
})
// if (app.globalData.user_index != 4) {
// this.setData({
// elcheeState: true
// })
// } else if (app.globalData.user_index == 4) {
// wx.switchTab({
// url: '../personalCenter/personalCenter'
// })
// }
} else if (res.data.data.UserType === 3 && res.data.data.UserType == user_index || app.globalData.temp_UserType == user_index) {
wx.switchTab({
url: '../index/index',
})
} else {
// wx.showToast({
// title: '没有权限',
// icon: 'none'
// })
if (app.globalData.UserType == 2) {
console.log(111)
if (app.globalData.user_index != 2) {
if (this.data.share_state) {
this.setData({
clientState: false,
})
} else {
this.setData({
clientState: true,
})
}
}
} else if (app.globalData.UserType != 4) {
console.log(222)
if (app.globalData.user_index == 4) {
this.setData({
elcheeState: true
})
this.getCode()
}
if (app.globalData.user_index == 2) {
wx.showToast({
... ... @@ -126,8 +117,7 @@ Page({
icon: 'none'
})
}
} else if (app.globalData.UserType == 3 || app.globalData.UserType ==4) {
console.log(333)
} else if (app.globalData.UserType == 3 || app.globalData.UserType == 4) {
if (app.globalData.user_index == 2) {
wx.showToast({
title: '没有权限',
... ... @@ -160,9 +150,9 @@ Page({
},
cancleMask3() {
this.setData({
report_state: false
})
// this.setData({
// report_state: false
// })
},
getpower() { //用户授权
... ... @@ -191,12 +181,14 @@ Page({
this.setData({
elcheeState: true
})
this.getCode()
}
} else if (app.globalData.UserType == 4) {
if (app.globalData.user_index != 4) {
this.setData({
elcheeState: true
})
this.getCode()
} else if (app.globalData.user_index == 4) {
wx.switchTab({
url: '../personalCenter/personalCenter'
... ... @@ -252,7 +244,6 @@ Page({
PubilshId: PublishId,
UserId: app.globalData.UserId
}).then((res) => {
console.log('detail', res, PublishId)
if (res.data.code == 200) {
this.setData({
type: res.data.data.type,
... ... @@ -276,8 +267,11 @@ Page({
//体检报告详情检测
reportInfo2() {
console.log(that.data.PubilshId,'aa')
let that = this;
console.log(that.data.PubilshId)
that.setData({
report_state: false
})
if (that.data.code == '') {
wx.showToast({
title: '请输入验证码',
... ... @@ -304,6 +298,23 @@ Page({
},
getCode() {
let that = this;
let url = 'pubilc/Dimension';
let params = {}
app.post(url, params).then((res) => {
if (res.data.code == 200) {
that.setData({
img: res.data.data.piclur
})
console.log(that.data.img)
}
}).catch((errMsg) => {
console.log(errMsg)
})
},
setCode(e) {
this.setData({
code: e.detail.value
... ...
... ... @@ -27,6 +27,7 @@
</button>
</view>
</view>
<view class='bottom_info' wx:if="{{GoId!=''}}">提示:非注册用户点击我是客户进入文章浏览</view>
<!-- 提示弹窗 -->
<view class='mask_box' wx:if='{{clientState}}' catchtap='cancleMask'>
... ... @@ -46,7 +47,8 @@
<view class='code_content'>如果您是保险行业大咖,请扫二维码(或 保存图片再打开微信识别)联系我们
</view>
<view class='code_img'>
<image src='/images/img2.png'></image>
<!-- <image src='/images/img2.png'></image> -->
<image src='{{img}}'></image>
</view>
</view>
</view>
... ... @@ -57,7 +59,7 @@
<view class='popup_title'>验证码</view>
<view class='popup_content'>
<input placeholder='请输入验证码' bindinput='setCode'></input>
<view class='popup_active' bindtap='reportInfo2'>确认</view>
<view class='popup_active' catchtap='reportInfo2'>确认</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -74,7 +74,11 @@
.bottom_btn .promoter_btn {
background: linear-gradient(to right, #21ccc4, #3ee4ba);
}
.bottom_info{
text-align: center;
font-size: 30rpx;
color: #999;
}
/* mask_box */
.mask_box {
... ...
... ... @@ -37,22 +37,9 @@
"list": []
},
"miniprogram": {
"current": 10,
"current": 9,
"list": [
{
"id": 0,
"name": "保单添加",
"pathName": "pages/index/addListDetail/addListDetail",
"query": "",
"scene": null
},
{
"id": -1,
"name": "保单体检",
"pathName": "pages/index/periodicReviews/periodicReviews",
"query": ""
},
{
"id": 2,
"name": "保单体检",
"pathName": "pages/index/periodicReviews/periodicReviews",
... ... @@ -109,6 +96,13 @@
"pathName": "pages/index/policyManage/policyManage",
"query": "FamilyId=19",
"scene": null
},
{
"id": -1,
"name": "保单添加",
"pathName": "pages/index/addListDetail/addListDetail",
"query": "def_id=135&FamilyId=70&name=333",
"scene": null
}
]
}
... ...