作者 刘晓艳

修改天假保单

... ... @@ -145,36 +145,18 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage: function (options) {
console.log(options)
// console.log(options)
this.prizeshare()
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: options.target.dataset.title, // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?status=' + options.target.dataset.status + '&GoId=' + app.globalData.UserId, // 默认是当前页面,必须是以‘/’开头的完整路径
imgUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
path: '/pages/start/start?status=' + options.target.dataset.status + '&GoId=' + app.globalData.UserId,
imgUrl: '',
}  
if (options.from == 'button') {
// var eData = options.target.dataset;
// console.log(eData.name); // shareBtn
// 此处可以修改 shareObj 中的内容
shareObj.path = '/pages/start/start?status=' + options.target.dataset.status
}   // 返回shareObj
}  
return shareObj;
}
... ...
... ... @@ -47,14 +47,9 @@ Page({
Status: this.data.currentTab,
KeyWord: that.data.KeyWord
}
console.log(param)
app.post(url, param).then((res) => {
let data = res.data;
console.log(data.code)
console.log(res.data.data.list)
if (data.code == 200) {
console.log(1)
console.log(data.data.list)
that.setData({
list: data.data.list
})
... ...
... ... @@ -48,7 +48,7 @@
</view>
<view class='null_box'></view>
<view class='bottom'>
<view class='bottom_box' bindtap="{{vip_state?'addFamily':''}}">创建新家庭</view>
<view class='bottom_box' style='100%;' bindtap="{{vip_state?'addFamily':''}}">创建新家庭</view>
<view class='bottom_box' bindtap="goIndex">回到首页</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -6,6 +6,24 @@
background: #f5f6fa;
}
.go_index {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
position: fixed;
right: 30rpx;
bottom: 120rpx;
background: #0286ff;
font-size: 30rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
padding: 20rpx;
box-sizing: border-box;
}
.search_box {
width: 100%;
display: flex;
... ... @@ -110,6 +128,7 @@
justify-content: center;
flex-direction: column;
margin-left: 15rpx;
position: relative;
/* position: absolute;
left: 0;
top: -20rpx; */
... ...
... ... @@ -36,10 +36,8 @@ Page({
})
},
//名字
setName(e) {
// console.log(e)
var list = this.data.list;
list.name = e.detail.value;
this.setData({
... ... @@ -118,7 +116,7 @@ Page({
let list = this.data.list;
list.address = e.detail.value;
var address = list.address
if(this.data.familyid==0){
if (this.data.familyid == 0) {
wx.setStorageSync('address', address)
}
this.setData({
... ... @@ -176,7 +174,6 @@ Page({
let url = 'counselor/DefAdd';
let params = {}
app.post(url, params).then((res) => {
// console.log(res)
if (res.data.code == 200) {
var list = this.data.list
that.setData({
... ... @@ -203,10 +200,8 @@ Page({
return label_ids != id
})
// if (add) {
// console.log(add)
if (!(label_list[mindex].data[sindex].status)) {
label_ids.push(id)
console.log(22, label_ids)
} else {
for (var i = 0; i < label_ids.length; i++) {
// if (!(label_list[mindex].data[sindex].status)) {
... ... @@ -218,10 +213,6 @@ Page({
}
}
// }
// console.log(label_list, label_ids)
label_list[mindex].data[sindex].status = !(label_list[mindex].data[sindex].status)
this.setData({
label_list: label_list,
... ... @@ -267,7 +258,6 @@ Page({
})
},
//成员信息的修改,新增
listVerify(e) {
let that = this;
... ... @@ -320,9 +310,13 @@ Page({
wx.setStorageSync('familyid', res.data.data.family_id)
setTimeout(() => {
if (this.data.familyid == 0) {
wx.redirectTo({
url: '/pages/index/CustomerManagement/CustomerManagement',
// wx.redirectTo({
// url: '/pages/index/CustomerManagement/CustomerManagement',
// })
wx.navigateTo({
url: '/pages/index/addNewFamily/addNewFamily',
})
} else {
wx.navigateBack()
}
... ... @@ -354,7 +348,6 @@ Page({
DefId: that.data.DefId
}
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code == 200) {
var list = res.data.data.list
if (res.data.data.list.picurl != '') {
... ... @@ -390,6 +383,26 @@ Page({
})
},
//获取家庭地址
getAddress() {
let that = this;
let url = 'counselor/addUserAds';
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
that.setData({
list: list
})
}
}).catch((errMsg) => {
console.log(errMsg)
})
},
/**
* 生命周期函数--监听页面加载
... ... @@ -409,6 +422,10 @@ Page({
})
this.getUserInfo();
}
if (this.data.familyid != '') {
this.getAddress()
}
},
/**
... ...
... ... @@ -54,16 +54,40 @@ Page({
InfoId: 0,
def_id: '',
edit_state: false,
edit_state2: false,
// risk_listitm: '',
storge_state: false,
warranty_info: '请输入',
warranty_state: false,
warranty_info1: '请输入',
warranty_state1: false,
edit_state3: false,
coverage: '',
focus: false,
sub_index: ''
},
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,
})
... ... @@ -102,20 +126,16 @@ Page({
//主险名称
setRiskName(e) {
// console.log(e)
this.setData({
main_risks: e.detail.value,
})
// console.log(this.data.main_risks)
},
//主险名称
setRiskMoney(e) {
// console.log(e)
this.setData({
coverage: e.detail.value,
})
// console.log(this.data.main_risks)
},
... ... @@ -165,30 +185,30 @@ Page({
//保障项目弹窗
ensureProject(e) {
if (this.data.inforid != 0) {
this.setData({
edit_state: true
})
}
let that = this;
let type = e.currentTarget.dataset.type;
let index = e.currentTarget.dataset.xulie;
let tempProjectlist = Object.assign(this.data.projectlist, {});
var sub_index = that.data.sub_index
var edit_state3 = that.data.edit_state3
// 已经添加的附加险
let risk_list = Object.assign(this.data.risk_list, {});
let tempRist = risk_list[index].mo;
this.setData({
type: type
})
if (type == 'fujiaxian') {
this.setData({
focus: true
})
}
// 已经添加的主险
let tempMain_list = Object.assign(this.data.main_array, {})
// this.data.inforid != 0 && this.data.inforid != undefined
if (that.data.temp_state) {
if (!edit_state3) {
if (type == 'zhuxian') {
if (tempMain_list.length > 0) {
for (let i in tempProjectlist) {
... ... @@ -196,9 +216,15 @@ Page({
if (tempProjectlist[i].id == tempMain_list[j].id) {
tempProjectlist[i].choose_status = true
tempProjectlist[i].num = tempMain_list[j].num
console.log(tempProjectlist, tempMain_list)
for (let g in tempProjectlist[i].title) {
tempProjectlist[i].title[g].t_id == tempMain_list[j].t_id ? tempProjectlist[i].title[g].label_state = true : ''
if (tempProjectlist[i].title[g].t_id == tempMain_list[j].t_id) {
tempProjectlist[i].title[g].label_state = true
if (tempProjectlist[i].title[g].name == tempMain_list[j].title) {
tempProjectlist[i].title[g].current = parseInt(g)
sub_index = parseInt(g)
}
}
}
}
}
... ... @@ -212,7 +238,60 @@ Page({
tempProjectlist[i].choose_status = true
tempProjectlist[i].num = tempRist[j].num
for (let g in tempProjectlist[i].title) {
tempProjectlist[i].title[g].t_id == tempRist[j].t_id ? tempProjectlist[i].title[g].label_state = true : ''
if (tempProjectlist[i].title[g].t_id == tempRist[j].t_id) {
tempProjectlist[i].title[g].label_state = true
if (tempProjectlist[i].title[g].name == tempRist[j].title) {
tempProjectlist[i].title[g].current = parseInt(g)
sub_index = parseInt(g)
}
}
}
}
}
}
}
}
} else {
if (type == 'zhuxian') {
if (tempMain_list.length > 0) {
for (let i in tempProjectlist) {
for (let j in tempMain_list) {
if (tempProjectlist[i].id == tempMain_list[j].id) {
tempProjectlist[i].choose_status = true
tempProjectlist[i].num = tempMain_list[j].num
for (let g in tempProjectlist[i].title) {
for (let k in tempMain_list[j].title) {
if (tempMain_list[j].title[k].label_state) {
if (tempProjectlist[i].title[g].t_id == tempMain_list[j].title[k].t_id) {
tempProjectlist[i].title[g].label_state = true
tempProjectlist[i].title[g].current = tempMain_list[j].title[k].current
sub_index = tempMain_list[j].title[k].current
}
}
}
}
}
}
}
}
} else {
if (tempRist.length) {
for (let i in tempProjectlist) {
for (let j in tempRist) {
if (tempProjectlist[i].id == tempRist[j].id) {
tempProjectlist[i].choose_status = true
tempProjectlist[i].num = tempRist[j].num
for (let g in tempProjectlist[i].title) {
for (let k in tempRist[j].title) {
if (tempRist[j].title[k].label_state) {
if (tempProjectlist[i].title[g].t_id == tempRist[j].title[k].t_id) {
tempProjectlist[i].title[g].label_state = true
tempProjectlist[i].title[g].current = tempRist[j].title[k].current
sub_index = tempRist[j].title[k].current
}
}
}
}
}
}
}
... ... @@ -220,15 +299,62 @@ Page({
}
}
} else {
if (type == 'zhuxian') {
if (tempMain_list.length > 0) {
for (let i in tempProjectlist) {
for (let j in tempMain_list) {
if (tempProjectlist[i].id == tempMain_list[j].id) {
tempProjectlist[i].choose_status = true
tempProjectlist[i].num = tempMain_list[j].num
for (let g in tempProjectlist[i].title) {
for (let k in tempMain_list[j].title) {
if (tempMain_list[j].title[k].label_state) {
if (tempProjectlist[i].title[g].t_id == tempMain_list[j].title[k].t_id) {
tempProjectlist[i].title[g].label_state = true
tempProjectlist[i].title[g].current = tempMain_list[j].title[k].current
sub_index = tempMain_list[j].title[k].current
}
}
}
}
}
}
}
}
} else {
if (tempRist.length) {
for (let i in tempProjectlist) {
for (let j in tempRist) {
if (tempProjectlist[i].id == tempRist[j].id) {
tempProjectlist[i].choose_status = true
tempProjectlist[i].num = tempRist[j].num
for (let g in tempProjectlist[i].title) {
for (let k in tempRist[j].title) {
if (tempRist[j].title[k].label_state) {
if (tempProjectlist[i].title[g].t_id == tempRist[j].title[k].t_id) {
tempProjectlist[i].title[g].label_state = true
tempProjectlist[i].title[g].current = tempRist[j].title[k].current
sub_index = tempRist[j].title[k].current
}
}
}
}
}
}
}
}
}
}
wx.setNavigationBarTitle({
title: '选择保障项目',
})
console.log(tempProjectlist)
this.setData({
popup_state: true,
addType: type,
xulie: index,
projectlist: tempProjectlist
projectlist: tempProjectlist,
sub_index: sub_index
})
},
... ... @@ -245,13 +371,12 @@ Page({
for (var j = 0; j < projectlist[i].title.length; j++) {
projectlist[i].title[j].label_state = false
}
projectlist[i].title[0].current = 0
projectlist[i].title[0].label_state = true
// projectlist[i].title[0].current = 0
// projectlist[i].title[0].label_state = true
}
this.setData({
projectlist: res.data.data.def
})
// console.log(this.data.projectlist)
}
})
},
... ... @@ -275,6 +400,7 @@ Page({
}
this.setData({
projectlist: projectlist,
sub_index: sindex
})
},
... ... @@ -288,7 +414,6 @@ Page({
this.setData({
projectlist: projectlist
})
console.log(projectlist)
},
//选择保障项目
... ... @@ -301,15 +426,23 @@ Page({
projectlist: projectlist,
})
if (this.data.inforid != 0) {
edit_state: false
edit_state: false;
edit_state2: false
}
},
//确认选择的推荐方案
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;
... ... @@ -320,7 +453,6 @@ Page({
for (var i = 0; i < projectlist.length; i++) {
if (projectlist[i].choose_status) {
main_array.push(projectlist[i])
console.log(main_array)
}
}
... ... @@ -336,15 +468,12 @@ Page({
tempRist[index]['mo'] = main_array;
that.setData({
risk_list: tempRist,
// risk_listitm: tempRist
})
console.log(this.data.risk_list)
} else {
that.setData({
main_array: main_array,
})
}
console.log(this.data.main_array)
}
setTimeout(function() {
that.ensureProjectList()
... ... @@ -355,16 +484,12 @@ Page({
title: '添加保单',
})
}, 800)
console.log(this.data.risk_list)
},
//重组主险的保障项目
tempMain() {
var main_array = this.data.main_array
var warranty_one1 = []
// console.log(main_array)
for (var i = 0; i < main_array.length; i++) {
var temp = {}
for (var j = 0; j < main_array[i].title.length; j++) {
... ... @@ -398,23 +523,17 @@ Page({
//主险保障其
addRiskUnit(e) {
console.log(e)
var risk_list = this.data.risk_list
console.log(risk_list)
var index = e.currentTarget.dataset.index
risk_list[index].num = e.detail.value
console.log(risk_list)
this.setData({
risk_list: risk_list
})
},
//重组附加险整体数据结构
tempAddRisk() {
console.log('storte')
var risk_list = this.data.risk_list
console.log(risk_list)
var sub_array = []
var temp_risk = this.data.risk_list;
var temp = this.data.risk_list;
... ... @@ -428,7 +547,6 @@ Page({
temp_risk[i].name = temp[i].name
temp_risk[i].num = temp[i].num
temp_risk[i].title = temp[i].title
console.log(temp[i].title, temp_risk[i].title)
temp_risk[i].mo[j].t_id = temp[i].mo[j].title[k].t_id
temp_risk[i].mo[j].id = temp[i].mo[j].id
temp_risk[i].mo[j].name = temp[i].mo[j].name
... ... @@ -451,7 +569,8 @@ Page({
beneficiarySelect(e) {
if (this.data.inforid != 0) {
this.setData({
edit_state: true
edit_state: true,
edit_state2: true
})
}
var index = e.currentTarget.dataset.mindex
... ... @@ -519,10 +638,7 @@ Page({
//添加受益人名字
addPeople(e) {
// console.log(e)
console.log(this.data.beneficiary_list)
var beneficiary_list = this.data.beneficiary_list;
var index = e.currentTarget.dataset.index
// beneficiary_list[beneficiary_list.length - 1].beneficiary_name = e.detail.value;
beneficiary_list[index].name = e.detail.value;
... ... @@ -559,7 +675,6 @@ Page({
this.setData({
beneficiary_list: list
})
// console.log(this.data.beneficiary_list)
},
//添加受益人
... ... @@ -629,7 +744,8 @@ Page({
addRisk() {
if (this.data.inforid != 0) {
this.setData({
edit_state: false
edit_state: false,
edit_state2: false
})
}
var risk_list = Object.assign(this.data.risk_list, {});
... ... @@ -728,8 +844,9 @@ Page({
complete: () => {
i++;
if (i == length) {
// console.log('总共' + successUp + '张上传成功,' + failUp + '张上传失败!');
} else { //递归调用uploadDIY函数
this.uploadAllfile(filePaths, successUp, failUp, i, length);
}
},
... ... @@ -762,7 +879,8 @@ Page({
warrantyTwo(e) {
if (this.data.inforid != 0) {
this.setData({
edit_state: false
edit_state: false,
edit_state2: false
})
}
var guarantee_name = e.detail.value
... ... @@ -809,14 +927,11 @@ Page({
var unit = this.data.unit
var compact_time = this.data.compact_time
var year = parseInt(new Date(compact_time).getFullYear())
console.log(year)
var month = parseInt(new Date(compact_time).getMonth() + 1)
var day = parseInt(new Date(compact_time).getDate())
// var impletion_time = this.data.impletion_time
var warranty_one = this.data.warranty_one
var tempbirth_time = ''
var birthday = '1995-04-20'
var birthday = ''
var birthday_year = parseInt(new Date(birthday).getFullYear())
if (compact_time == '') {
... ... @@ -830,7 +945,6 @@ Page({
var temp_day = day - 1
if (month < 10) month = "0" + month;
if (temp_day < 10) temp_day = "0" + temp_day;
// impletion_time = temp_year + '-' + month + '-' + temp_day
warranty_one = temp_year + '-' + month + '-' + temp_day
} else if (unit == '岁') {
var temp_year = (birthday_year + guarantee_name - 1)
... ... @@ -839,14 +953,11 @@ Page({
if (temp_month < 10) temp_month = "0" + temp_month;
if (month < 10) month = "0" + month;
if (day < 10) day = "0" + day;
// impletion_time = temp_year + '-' + temp_month + '-' + day
warranty_one = temp_year2 + '-' + month + '-' + day
} else if (unit == '终身') {
// impletion_time = '终身缴费'
warranty_one = '终身'
}
this.setData({
// impletion_time: impletion_time,
warranty_one: warranty_one
})
}
... ... @@ -856,7 +967,8 @@ Page({
burningTime(e) {
if (this.data.inforid != 0) {
this.setData({
edit_state: false
edit_state: false,
edit_state2: false,
})
}
var time_name = e.detail.value
... ... @@ -905,10 +1017,8 @@ Page({
var month = parseInt(new Date(compact_time).getMonth() + 1)
var day = parseInt(new Date(compact_time).getDate())
var impletion_time = this.data.impletion_time
// var warranty_one = this.data.warranty_one
var tempbirth_time = ''
var birthday = '1995-04-20'
var birthday = ''
var birthday_year = parseInt(new Date(birthday).getFullYear())
if (compact_time == '') {
... ... @@ -923,7 +1033,6 @@ Page({
if (month < 10) month = "0" + month;
if (temp_day < 10) temp_day = "0" + temp_day;
impletion_time = temp_year + '-' + month + '-' + temp_day
// warranty_one = temp_year + '-' + month + '-' + temp_day
} else if (unit == '岁') {
var temp_year = (birthday_year + time_name - 1)
var temp_year2 = (birthday_year + time_name)
... ... @@ -932,14 +1041,11 @@ Page({
if (month < 10) month = "0" + month;
if (day < 10) day = "0" + day;
impletion_time = temp_year + '-' + temp_month + '-' + day
// warranty_one = temp_year2 + '-' + month + '-' + day
} else if (unit == '终身') {
impletion_time = '终身缴费'
// warranty_one = '终身'
}
this.setData({
impletion_time: impletion_time,
// warranty_one: warranty_one
})
}
},
... ... @@ -1110,6 +1216,9 @@ Page({
risk_list: res.data.data.def.more,
beneficiary_list: beneficiary_list,
edit_state: true,
edit_state2: true,
edit_state3: false,
temp_state:true
})
}
})
... ... @@ -1132,7 +1241,7 @@ Page({
var long_money = JSON.stringify(this.data.long_money)
var more = JSON.stringify(this.data.more)
var guarantee = JSON.stringify(this.data.guarantee)
} else if (this.data.edit_state || wx.getStorageSync('storge_state')) {
} else if (this.data.edit_state || this.data.edit_state2 || wx.getStorageSync('storge_state')) {
var favoree = JSON.stringify(this.data.beneficiary_list)
var warranty_two = JSON.stringify(this.data.warranty_two)
var long_money = JSON.stringify(this.data.long_money)
... ... @@ -1309,7 +1418,6 @@ Page({
},
//获取编辑保单接口
getlistVerify(id) {
let url = 'counselor/infordef'
... ... @@ -1334,10 +1442,6 @@ Page({
beneficiary_list[obj].name = beneficiary_list[obj].name
beneficiary_list[obj].unit = beneficiary_list[obj].unit
// beneficiary_list[obj].name_array = this.data.insure
} else {
// beneficiary_list[0].name = ''
// beneficiary_list[0].unit = ''
// beneficiary_list[obj].name_array = this.data.insure
}
}
... ... @@ -1387,6 +1491,9 @@ Page({
risk_list: risk_list,
beneficiary_list: beneficiary_list,
edit_state: true,
edit_state2: true,
edit_state3: false,
temp_state: true,
guarantee_name: guarantee_name,
time_name: time_name,
})
... ... @@ -1398,12 +1505,12 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
this.ensureProjectList()
let that = this;
options.inforid ? (that.getlistVerify(options.inforid), that.setData({
inforid: options.inforid,
edit_state: true
edit_state: true,
edit_state2: true,
}), wx.setNavigationBarTitle({
title: '编辑保单',
})) : ""
... ... @@ -1420,6 +1527,7 @@ Page({
if (wx.getStorageSync('storge_state') && options.inforid == undefined) {
this.getStorage()
}
},
/**
... ...
... ... @@ -95,7 +95,7 @@
<input type='text' placeholder='请输入' value='{{item.name}}' data-index='{{its}}' bindinput='addPeople'></input>
</view>
<view class='list_input'>
<input class='income_input' type='text' placeholder='受益比例' value='{{item.unit}}' data-index='{{its}}' bindinput='addUnit2'></input>
<input class='income_input' type='number' placeholder='受益比例' value='{{item.unit}}' data-index='{{its}}' bindinput='addUnit2'></input>
<text>%</text>
</view>
</view>
... ... @@ -114,7 +114,7 @@
<text>主险名称</text>
</view>
<view class='list_input'>
<input type='text' placeholder='请填写' name='main_risks' value='{{main_risks}}' bindinput='setRiskName'></input>
<input type='text' placeholder='请填写' name='main_risks' value="{{main_risks!='undefined'?main_risks:''}}" bindinput='setRiskName'></input>
</view>
</view>
<view class='item_list'>
... ... @@ -215,7 +215,7 @@
<view class='item_list'>
<view class='list_title'>续费银行</view>
<view class='list_input'>
<input type='text' placeholder='请填写' name='bank' value="{{bank}}" bindinput='setBank'></input>
<input type='text' placeholder='请填写' name='bank' value="{{bank!='undefined'?bank:''}}" bindinput='setBank'></input>
</view>
</view>
<view class='item_list'>
... ... @@ -254,7 +254,7 @@
<view class='protec_item' wx:for='{{item.mo}}' wx:for-item='project' wx:key=''>
<view>{{project.name}}</view>
<view class='protec_num'>{{project.num}}
<text wx:if='{{edit_state}}'>{{project.title}}</text>
<text wx:if='{{edit_state2}}'>{{project.title}}</text>
<block wx:else>
<block wx:for='{{project.title}}' wx:for-item='danwei' wx:key=''>
<text wx:if="{{danwei.label_state}}">{{danwei.name}}</text>
... ...
... ... @@ -45,7 +45,7 @@ page {
.currentWordNumber {
position: absolute;
bottom: 30rpx;
right: 100rpx;
right: 0;
color: #999;
}
... ...
... ... @@ -81,9 +81,9 @@ Page({
//添加成员
addPerson(e) {
var familyid = this.data.familyid
if (familyid == undefined){
if (familyid == undefined) {
this.setData({
familyid:0
familyid: 0
})
}
wx.navigateTo({
... ... @@ -173,14 +173,14 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
console.log(options.familyid)
// console.log(options.familyid)
let that = this;
options.flag ? that.setData({
flag: options.flag
}) : ""
options.familyid ? (that.setData({
familyid: options.familyid
}) && that.getdata() && wx.setStorageSync('familyid', options.familyid)):""
}) && that.getdata() && wx.setStorageSync('familyid', options.familyid)) : ""
},
/**
... ... @@ -195,8 +195,10 @@ Page({
*/
onShow: function() {
let familyid = wx.getStorageSync('familyid');
console.log(familyid)
familyid ? this.getdata():console.log(2)
familyid ? this.getdata() : console.log(2);
this.setData({
familyid: familyid
})
},
/**
... ...
... ... @@ -32,7 +32,6 @@ Page({
getIndex() {
let url = 'pubilc/index'
app.post(url, null).then((res) => {
console.log(res)
this.setData({
imgUrls: res.data.data.banner,
modules: res.data.data.modules,
... ...
... ... @@ -45,7 +45,6 @@ Page({
Page: that.data.Page
}
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code == 200) {
this.setData({
classify: res.data.data.menu,
... ... @@ -53,7 +52,6 @@ Page({
})
}
}).catch((errMsg) => {
console.log(errMsg)
})
},
... ...
... ... @@ -41,7 +41,8 @@
</view>
</view>
</view>
<view class='null_box'></view>
<view class='go_index' bindtap="goIndex">回到首页</view>
<!-- <view class='null_box'></view>
<view class='bottom'>
<view class='bottom_box' style='width:100%' bindtap="goIndex">回到首页</view>
</view>
\ No newline at end of file
</view> -->
\ No newline at end of file
... ...
... ... @@ -4,6 +4,24 @@ page {
background: #f5f6fa;
}
.go_index {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
position: fixed;
right: 30rpx;
bottom: 60rpx;
background: #0286ff;
font-size: 30rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
padding: 20rpx;
box-sizing: border-box;
}
.searn_box {
background: #fff;
padding: 12rpx 30rpx;
... ... @@ -63,9 +81,11 @@ page {
margin-bottom: 30rpx;
margin-right: 39rpx;
}
.classify_item:nth-child(3n){
.classify_item:nth-child(3n) {
margin-right: 0;
}
.classify_active {
border: 0;
background: #ffac2f;
... ... @@ -155,6 +175,7 @@ page {
.icon-shu {
font-size: 30rpx;
}
.bottom {
width: 100%;
height: 120rpx;
... ...
... ... @@ -210,7 +210,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function() {
this.getData()
this.getInfo()
},
/**
... ...
... ... @@ -46,7 +46,4 @@
</view>
</view>
</view>
<view class='null_box'></view>
<view class='bottom'>
<view class='bottom_box' style='width:100%' bindtap="goIndex">回到首页</view>
</view>
\ No newline at end of file
<view class='go_index' bindtap="goIndex">回到首页</view>
\ No newline at end of file
... ...
... ... @@ -41,8 +41,10 @@
</view>
<view class='item_list' style=' align-items: flex-start;'>
<view class='list_title'>主险保障项</view>
<view>
<view class='list_input' wx:for='{{listdetail.guarantee}}' wx:key wx:for-item='its'>{{its.name}} {{its.num}}{{its.title}} </view>
</view>
</view>
<view class='item_list'>
<view class='list_title'>合同生效日</view>
<view class='list_input'>{{listdetail.compact_time}}</view>
... ...
... ... @@ -47,13 +47,11 @@ page {
}
.list_title {
width: 160rpx;
/* font-size: 24rpx; */
width: 190rpx;
color: #000;
}
.list_input {
/* font-size: 24rpx; */
color: #000;
}
... ... @@ -73,5 +71,5 @@ page {
.bottom_box image{
width: 330rpx;
height: 330rpx;
margin-top: 30rpx;
margin: 30rpx 0;
}
... ...
... ... @@ -51,7 +51,6 @@ for (let i = 0; i <= 59; i++) {
}
Page({
/**
* 页面的初始数据
*/
... ... @@ -186,7 +185,6 @@ Page({
})
},
//完成
finish(e) {
var family_id = e.currentTarget.dataset.family_id
... ... @@ -207,18 +205,10 @@ Page({
})
this.getData()
this.setData({
edit_state: false
edit_state: true
})
}
})
// wx.showToast({
// title: '修改成功',
// icon:'none',
// })
// this.setData({
// edit_state: false
// })
},
... ... @@ -244,6 +234,7 @@ Page({
UserId: app.globalData.UserId,
DefId: that.data.mainid
}).then((res) => {
console.log(res)
if (res.data.code == 200) {
var time = res.data.data.warn.warn_time
var index = parseInt(time) - 1
... ... @@ -275,7 +266,6 @@ Page({
// 获取天数
days = getDays(val[0] + temp_year, val[1] + 1);
var follow_time = this.data.years[val[0]] + '-' + this.data.months[val[1]] + '-' + this.data.days[val[2]] + ' ' + this.data.hours[val[3]] + ':' + this.data.minutes[val[4]]
this.setData({
days: days,
year: this.data.years[val[0]],
... ... @@ -348,10 +338,6 @@ Page({
value: [nowYear - temp_year, nowMonth - 1, nowDay - 1, nowHour, nowMinute, nowSecond]
})
var follow_time = that.data.year + '-' + that.data.month + '-' + that.data.day + ' ' + that.data.hour + ':' + that.data.minute
that.setData({
// follow_time: follow_time
})
setTimeout(function(){
that.setData({
time_state:true
... ...
... ... @@ -30,6 +30,15 @@ Page({
plan_id: ''
},
//保单详情
summaryDetail(e) {
console.log(e)
var InId = e.currentTarget.dataset.inid
wx.navigateTo({
url: '/pages/index/policyListDetail/policyListDetail?InId=' + InId,
})
},
// 打电话
makePhoneCall() {
let that = this;
... ...
... ... @@ -26,7 +26,6 @@
<view class='popup_btn' bindtap='confirmCase'>确认</view>
</view>
<block wx:else>
<!-- 保单报告 -->
<view class='top_box'>
... ... @@ -48,7 +47,6 @@
</view>
<view>
<view class='name'>{{userinfo.name}}
<!-- <text class='position'>222</text> -->
</view>
<view>电话 {{userinfo.mobile}}</view>
</view>
... ... @@ -196,13 +194,10 @@
<view class='list_title'>{{item.recognizee}}</view>
</view>
<view class='item_list'>
<view class='list_title' bindtap='summaryDetail' data-InId='{{items.id}}'>{{item.in_num}}</view>
<view class='list_title' bindtap='summaryDetail' data-InId='{{item.id}}'>{{item.in_num}}</view>
</view>
<view class='item_list'>
<view class='list_title'>{{item.main_risks}}</view>
<!-- <view class='list_title' >你好的JFK第三</view> -->
<!-- style='white-space: normal;' -->
</view>
<view class='item_list'>
<view class='list_title' wx:if='{{item.firm}}'>{{item.firm}}</view>
... ... @@ -225,8 +220,12 @@
<!-- 底部按钮 -->
<view class='null_box'></view>
<view class='bottom_box'>
<button class='plan_btn' data-status='{{status}}' bindtap="{{save_state?'saveInfo':''}}">保存</button>
<button class="plan_btn2 {{shareState?'plan_active':''}}" open-type="{{shareState?'share':''}}" data-status='{{status}}'>发送给客户</button>
</view>
<cover-view class='bottom_box'>
<cover-view class='plan_btn'>
<button class='plan_btn' style='border:0;' data-status='{{status}}' bindtap="{{save_state?'saveInfo':''}}">保存</button>
</cover-view>
<cover-view class="plan_btn2 {{shareState?'plan_active':''}}">
<button class="plan_btn2 {{shareState?'plan_active':''}}" style='border:0;' open-type="{{shareState?'share':''}}" data-status='{{status}}'>发送给客户</button>
</cover-view>
</cover-view>
</block>
\ No newline at end of file
... ...
... ... @@ -403,6 +403,8 @@ page {
bottom: 0;
left: 0;
z-index: 100;
padding: 0 30rpx;
box-sizing: border-box;
}
.plan_btn {
... ...
... ... @@ -37,13 +37,14 @@
"list": []
},
"miniprogram": {
"current": 4,
"current": 0,
"list": [
{
"id": -1,
"id": 0,
"name": "保单添加",
"pathName": "pages/index/addListDetail/addListDetail",
"query": ""
"query": "",
"scene": null
},
{
"id": -1,
... ...