作者 刘晓艳

家庭保险

正在显示 68 个修改的文件 包含 2976 行增加422 行删除
{
"pages": [
"pages/start/start",
"pages/index/verigyCode/verigyCode",
"pages/index/summaryList2/summaryList2",
"pages/index/register/register",
"pages/about/about",
... ... @@ -44,7 +45,7 @@
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0286FF",
"navigationBarTitleText": "家庭保险",
"navigationBarTitleText": "保单体检专家",
"navigationBarTextStyle": "#fff"
},
"tabBar": {
... ...
... ... @@ -9,7 +9,7 @@
<text class='line'></text>
<text> {{articleDetail.create_time}}</text>
</view>
<view class='banner_box' wx:if="{{GoId!=''}}">
<view class='banner_box' wx:if="{{GoId!=''&&UserType!=3&&GoId!=UserId}}">
<view class='head_img'>
<image src='{{articleDetail.user.picurl}}'></image>
</view>
... ...
... ... @@ -131,3 +131,10 @@
text-indent: 2rem;
margin-top: 70rpx;
}
.wxParse-p{
width: 100%!important;
}
.wxParse-img{
width: 100%!important;
height: 100%;
}
\ No newline at end of file
... ...
... ... @@ -23,7 +23,7 @@ Page({
that.setData({
currentTab: e.target.dataset.current
})
that.getdata()
that.getInfo()
}
},
... ... @@ -36,7 +36,7 @@ Page({
},
//获取客户管理页面信息
getdata() {
getInfo() {
let that = this;
let url = 'counselor/familylist';
let param = {
... ... @@ -47,7 +47,68 @@ Page({
app.post(url, param).then((res) => {
console.log(res)
if (res.data.code == 200) {
if (res.data.data.type == '-13') {
that.setData({
list: res.data.data.list,
// cid: res.data.data.list[0].users[0].cid,
KeyWord: '',
// vip_state: true
})
// if (res.data.data.type == '-13') {
// wx.showToast({
// title: '会员到期,请充值',
// icon: 'none'
// }, 2000)
// that.setData({
// vip_state: false
// })
// } else if (res.data.data.type == '-12') {
// wx.showToast({
// title: '您已经被禁用,请联系管理员',
// icon: 'none'
// }, 2000)
// that.setData({
// vip_state: false
// })
// } else if (res.data.data.type == '-11') {
// wx.showToast({
// title: '您的权限不足',
// icon: 'none'
// }, 2000)
// that.setData({
// vip_state: false
// })
// } else if (res.data.data.type == '1') {
// that.setData({
// list: res.data.data.list,
// // cid: res.data.data.list[0].users[0].cid,
// KeyWord: '',
// // vip_state: true
// })
// if (res.data.data.list[0].users[0].cid != '') {
// that.setData({
// cid: res.data.data.list[0].users[0].cid,
// })
// }
// }
}
}).catch((errMsg) => {
// console.log(errMsg)
})
},
//获取客户管理页面信息
getdata() {
let that = this;
let url = 'pubilc/UserType';
let param = {
UserId: app.globalData.UserId,
}
app.post(url, param).then((res) => {
console.log(res, res.data.data.type)
if (res.data.code == 200) {
if (res.data.data.type == 5) {
wx.showToast({
title: '会员到期,请充值',
icon: 'none'
... ... @@ -55,15 +116,7 @@ Page({
that.setData({
vip_state: false
})
} else if (res.data.data.type == '-12') {
wx.showToast({
title: '您已经被禁用,请联系管理员',
icon: 'none'
}, 2000)
that.setData({
vip_state: false
})
} else if (res.data.data.type == '-11') {
} else if (res.data.data.type == 2) {
wx.showToast({
title: '您的权限不足',
icon: 'none'
... ... @@ -71,10 +124,9 @@ Page({
that.setData({
vip_state: false
})
} else if (res.data.data.type == '1') {
} else{
that.setData({
list: res.data.data.list,
// cid: res.data.data.list[0].users[0].cid,
KeyWord: '',
vip_state: true
})
... ... @@ -90,6 +142,8 @@ Page({
})
},
//家庭信息
familyData(e) {
var that = this
... ... @@ -144,6 +198,7 @@ Page({
*/
onLoad: function(options) {
this.getdata()
this.getInfo()
},
/**
... ... @@ -157,6 +212,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function() {
this.getInfo()
this.getdata()
},
... ...
... ... @@ -80,7 +80,8 @@
.item_list {
min-height: 222rpx;
display: flex;
align-items: center;
/* align-items: center; */
align-items: flex-start;
justify-content: space-between;
box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(0, 0, 0, 0.08);
border-radius: 5rpx;
... ... @@ -108,9 +109,9 @@
align-items: center;
justify-content: center;
flex-direction: column;
position: absolute;
/* position: absolute;
left: 0;
top: -20rpx;
top: -20rpx; */
}
.icon-jiating1 {
... ... @@ -138,11 +139,11 @@
}
.list_label_item {
/* width: 80%; */
width: 66%;
display: flex;
align-items: center;
flex-wrap: wrap;
margin-left: 170rpx;
margin-left: 20rpx;
}
.label_item {
... ... @@ -161,7 +162,8 @@
}
.list_right_box {
width: 20%;
width: 16%;
margin-top: 50rpx;
}
.list_btn_box {
... ...
// pages/EntryInformation/EntryInformation.js
const app = getApp();
Page({
data: {
sexArray: ['女', '男'],
card_Array: ['身份证', '护照', '出生证', '军官证', '港澳通行证'],
birth_date: '',
addsess_current: 0,
label_list: [],
list: {
name: '',
sex: '',
family_role: '',
money: '',
mobile: '',
birthday: '',
work: '',
work_address: '',
address: '',
mid: 0,
user_status: '',
status_num: '',
text: '',
},
label_ids: [],
familyid: 0, //家庭ID
hasimg: '',
DefId: ''
},
//获取成员详细信息
getUserInfo() {
let that = this;
let url = 'counselor/deflist';
let params = {
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 != '') {
this.setData({
hasimg: true
})
}
var label_ids = this.data.label_ids
var label_list = res.data.data.label_list
for (var i = 0; i < label_list.length; i++) {
for (var j = 0; j < label_list[i].data.length; j++) {
if (label_list[i].data[j].status == 1) {
label_ids.push(label_list[i].data[j].id)
}
}
}
var list = res.data.data.list;
list.sex = res.data.data.list.sex;
console.log(list.sex)
that.setData({
list: list,
label_list: res.data.data.label_list,
sex_index: res.data.data.list.sex,
card_index: parseInt(res.data.data.list.user_status) - 1,
addsess_current: res.data.data.list.mid,
label_ids: label_ids
})
}
}).catch((errMsg) => {
console.log(errMsg)
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
DefId: options.DefId,
})
if (options.DefId == undefined) {
this.setData({
DefId: ''
})
} else {
this.setData({
DefId: options.DefId
})
this.getUserInfo();
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--pages/EntryInformation/EntryInformation.wxml-->
<form bindsubmit='listVerify'>
<view class='content_item'>
<view class='item_list'>
<view class='list_title'>
<text>姓名</text>
</view>
<view class='list_input'>
<input type='text' placeholder='' value='{{list.name}}' disabled='true'></input>
</view>
</view>
<view class='item_list'>
<view class='list_title'>
<text>性别</text>
</view>
<view class='list_input'>
<view class='picker' range='{{sexArray}}' value='{{sex_index}}'>
<input placeholder='' value='{{sexArray[sex_index]}}' disabled='true'></input>
</view>
</view>
</view>
<view class='item_list'>
<view class='list_title'>
<text>家庭角色</text>
</view>
<view class='list_input'>
<input type='text' placeholder='' value='{{list.family_role}}' disabled='true' disabled='true'></input>
</view>
</view>
<view class='item_list'>
<view class='list_title'>个人年收入</view>
<view class='list_input'>
<input type='text' placeholder='' value='{{list.money}}' disabled='true' disabled='true'></input>
</view>
</view>
<view class='item_list'>
<view class='list_title'>手机号 </view>
<view class='list_input'>
<input type='text' placeholder='' value='{{list.mobile}}' disabled='true' disabled='true'></input>
</view>
</view>
<view class='item_list'>
<view class='list_title'>
<text>出生日期</text>
</view>
<view class='list_input'>
<view class='picker' mode="date" value='{{list.birthday}}' >
<input placeholder='' value='{{list.birthday}}' disabled='true'></input>
</view>
</view>
</view>
<view class='item_list'>
<view class='list_title'>单位名称 </view>
<view class='list_input'>
<input type='text' placeholder='' value='{{list.work}}' disabled='true' disabled='true'></input>
</view>
</view>
<view class='item_list'>
<view class='list_title'>单位地址 </view>
<view class='list_input'>
<input type='text' placeholder='' value='{{list.work_address}}' disabled='true' disabled='true'></input>
</view>
</view>
<view class='item_list'>
<view class='list_title'>家庭地址 </view>
<view class='list_input'>
<input type='text' placeholder='' value='{{list.address}}' disabled='true' disabled='true'></input>
</view>
</view>
<view class='item_list'>
<view class='list_title'>通讯地址 </view>
<view class='list_input'>
<view class="address_btn {{addsess_current==1?'unit_address':''}}" data-current='1' >家庭地址</view>
<view class="address_btn {{addsess_current==2?'unit_address':''}}" data-current='2' >单位地址</view>
</view>
</view>
<view class='item_list'>
<view class='list_title'>证件类型</view>
<view class='list_input'>
<view class='picker' range='{{card_Array}}' value='{{card_index}}' >
<input placeholder='' value='{{card_Array[card_index]}}' disabled='true'></input>
</view>
</view>
</view>
<view class='item_list'>
<view class='list_title'>证件号 </view>
<view class='list_input'>
<input type='text' placeholder='' value='{{list.status_num}}' disabled='true'></input>
</view>
</view>
</view>
<view class='box'>
<!-- 上传图片 -->
<view class='upload_box'>
<view class='popup_img' wx:if='{{hasimg}}'>
<image src='{{list.picurl}}' bindtap='viewImg'></image>
</view>
<view wx:else>
<view class='iconfont icon-add'></view>
<view>上传客户照片</view>
</view>
</view>
</view>
<view class='content_item'>
<view class='item_list'>
<view class='list_title'>用户描述</view>
</view>
<view class='list_textarea'>
<textarea placeholder='' value='{{list.text}}' placeholder-class='font_color' bindinput='descript' disabled='true'></textarea>
</view>
</view>
<view class='content_item'>
<view class='item_list'>
<view class='list_title'>添加用户标签</view>
</view>
<view class='item_list item_label_box' wx:for='{{label_list}}' wx:key='' wx:for-index='mindex'>
<view class='list_label_title'>{{item.label}} </view>
<view class='list_label'>
<view class="address_btn {{sub_its.status?'unit_address':''}}" data-id='{{sub_its.id}}' data-status='{{sub_its.status}}' wx:for='{{item.data}}' wx:for-item='sub_its' wx:key='' wx:for-index='sindex' data-sindex='{{sindex}}' data-mindex='{{mindex}}'>{{sub_its.name}}</view>
</view>
</view>
</view>
<!-- 底部按钮 -->
<!-- <view class='null_box'></view>
<view class='bottom_box'>
<button class='bottom_btn' data-type='complete' formType='submit'>完成</button>
</view> -->
</form>
\ No newline at end of file
... ...
/* pages/my/listDetail/listDetail.wxss */
page {
background: #f5f5fa;
}
.content_item {
background: #fff;
padding: 0 38rpx;
margin-top: 16rpx;
}
.item_list {
display: flex;
align-items: center;
border-bottom: 1rpx dashed #ebebeb;
padding: 23rpx 0;
}
.list_icon {
font-size: 30rpx;
color: #f00;
margin-right: 10rpx;
}
.list_title {
width: 185rpx;
font-size: 29rpx;
color: #000;
}
.list_label_title {
width: 140rpx;
font-size: 29rpx;
color: #000;
}
.project {
background: none;
}
.symbol_icon {
font-size: 27rpx;
color: red;
}
.list_input {
width: 75%;
display: flex;
align-items: center;
}
.list_input input {
border: 0;
outline: none;
font-size: 30rpx;
color: #000;
}
.list_input .picker {
width: 100%;
height: 53rpx;
font-size: 30rpx;
color: #000;
line-height: 53rpx;
}
.item_label_box {
align-items: flex-start;
}
.list_label {
width: 75%;
display: flex;
align-items: center;
flex-wrap: wrap;
}
.list_label .address_btn {
margin-bottom: 20rpx;
}
.list_textarea {
width: 100%;
}
.list_textarea textarea {
width: 100%;
padding: 30rpx 0;
box-sizing: border-box;
min-height: 140rpx;
}
.font_color {
font-size: 28rpx;
color: #999;
}
.icon-add {
font-size: 32rpx;
color: #ccc;
text-align: center;
padding: 20rpx 0;
}
.icon-jinru {
float: right;
color: #ccc;
}
.item {
justify-content: space-between;
}
.box {
padding: 0 32rpx;
}
.upload_box {
font-size: 28rpx;
color: #1a1a1a;
background: #fff;
margin-top: 16rpx;
text-align: center;
padding: 36rpx 0;
border-radius: 10rpx;
box-shadow: 2rpx 0rpx 3rpx rgba(235, 235, 235, 1);
}
.popup_img {
position: relative;
}
.icon-guanbi {
position: absolute;
top: 10rpx;
right: 20rpx;
color: #ccc;
}
.upload_box .icon-add {
font-size: 64rpx;
}
.content_info {
font-size: 24rpx;
color: #999;
margin-top: 22rpx;
}
.null_box {
width: 100%;
height: 120rpx;
}
.bottom_box {
width: 100%;
height: 100rpx;
background: rgba(255, 255, 255, 1);
box-shadow: 1rpx 0rpx 1rpx rgba(235, 233, 232, 1);
display: flex;
align-items: center;
justify-content: flex-end;
position: fixed;
bottom: 0;
padding: 0 32rpx;
z-index: 5;
box-sizing: border-box;
}
.bottom_btn {
width: 100%;
height: 80rpx;
font-size: 32rpx;
color: #fff;
background: rgba(2, 134, 255, 1);
border-radius: 44rpx;
display: flex;
align-items: center;
justify-content: center;
}
.add_btn {
width: 260rpx;
height: 80rpx;
font-size: 32rpx;
color: #1a1a1a;
background: #fff;
border: 1rpx solid #ebebeb;
border-radius: 40rpx;
display: flex;
align-items: center;
justify-content: center;
margin-left: 200rpx;
margin-right: 20rpx;
}
.addrisk {
width: 70%;
display: flex;
align-items: center;
justify-content: space-between;
text-align: left;
}
.unit {
text-align: left;
}
.address_btn {
background: none;
border: 1rpx solid #0286ff;
color: #0286ff;
font-size: 32rpx;
border-radius: 40rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20rpx;
padding: 8rpx 30rpx;
}
.unit_address {
color: #fff;
background: rgba(2, 134, 255, 1);
}
... ...
... ... @@ -248,7 +248,6 @@ Page({
allsave() {
let that = this;
let list = this.data.list;
console.log(list[list.length - 1].name)
if (list[list.length - 1].name != '' && list[list.length - 1].id == 0) {
let url = 'counselor/SchemeSave';
let params = {
... ... @@ -274,6 +273,9 @@ Page({
that.setData({
list: list
})
wx.navigateBack({
})
}
that.getlist();
console.log(that.data.list)
... ...
... ... @@ -17,7 +17,7 @@
</view>
<view class='scroll_box'>
<scroll-view scroll-y>
<view class="item_list" wx:for='{{tlist.payllist}}'>
<view class="item_list" wx:for='{{tlist.payllist}}' wx:key>
<view class="list_content">
<view>{{item.description}}</view>
</view>
... ...
... ... @@ -53,7 +53,9 @@ Page({
guarantee: [],
InfoId: 0,
def_id: '',
edit_state: false
edit_state: false,
risk_listitm: '',
storge_state: false,
},
//保单号
... ... @@ -152,9 +154,10 @@ Page({
let index = e.currentTarget.dataset.xulie;
let tempProjectlist = Object.assign(this.data.projectlist, {});
// 已经添加的附加险
let rist_list = Object.assign(this.data.risk_list, {});
console.log(rist_list)
let tempRist = rist_list[index].mo;
let risk_list = Object.assign(this.data.risk_list, {});
console.log(risk_list)
let tempRist = risk_list[index].mo;
console.log(tempRist)
// 已经添加的主险
let tempMain_list = Object.assign(this.data.main_array, {})
if (type == 'zhuxian') {
... ... @@ -271,29 +274,15 @@ Page({
let type = this.data.addType;
var that = this
var main_array = []
var projectlist = Object.assign(this.data.projectlist, {})
for (var i = 0; i < projectlist.length; i++) {
// for (var j = 0; j < projectlist[i].title.length; j++) {
if (projectlist[i].choose_status) {
// if (projectlist[i].title[j].current == ''){
// projectlist[i].title[j].label_state=false
main_array.push(projectlist[i])
// }
console.log(main_array)
}
// }
}
// for (var i = 0; i < projectlist.length; i++) {
// for (var j = 0; j < projectlist[i].title.length; j++) {
// if (projectlist[i].choose_status) {
// if (projectlist[i].title[j].current == '') {
// projectlist[i].title[j].label_state = false
// main_array.push(projectlist[i])
// }
// }
// }
// }
if (main_array != '') {
wx.showToast({
title: '添加成功',
... ... @@ -306,27 +295,15 @@ 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)
// var temp = main_array
// for (var i = 0; i < main_array.length; i++) {
// for (var j = 0; j < main_array[i].title.length; j++) {
// if (main_array[i].title[j].label_state) {
// main_array[i].title = main_array[i].title[j].name
// }
// console.log(main_array)
// }
// }
// that.setData({
// main_array: main_array
// })
}
setTimeout(function() {
that.ensureProjectList()
... ... @@ -336,18 +313,20 @@ Page({
wx.setNavigationBarTitle({
title: '添加保单',
})
}, 1000)
}, 800)
console.log(this.data.risk_list)
},
//重组主险的保障项目
tempMain() {
var main_array = this.data.main_array
var warranty_one1 = []
console.log(main_array)
// 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++) {
if (main_array[i].choose_status) {
if (main_array[i].title[j].label_state) {
temp.id = main_array[i].id
... ... @@ -359,7 +338,6 @@ Page({
}
}
warranty_one1.push(temp)
console.log(warranty_one1)
this.setData({
guarantee: warranty_one1
})
... ... @@ -390,35 +368,34 @@ Page({
//重组附加险整体数据结构
tempAddRisk() {
var risk_list = this.data.risk_list
var temp_risk = []
var sub_array = []
console.log(risk_list)
for (var i = 0; i < risk_list.length; i++) {
var temp = {}
for (var j = 0; j < risk_list[i].mo.length; j++) {
var subtemp = {}
for (var k = 0; k < risk_list[i].mo[j].title.length; k++) {
if (risk_list[i].name != '') {
if (risk_list[i].mo[j].choose_status) {
if (risk_list[i].mo[j].title[k].label_state) {
temp.name = risk_list[i].name
temp.num = risk_list[i].num
temp.title = risk_list[i].title
subtemp.id = risk_list[i].mo[j].id
subtemp.name = risk_list[i].mo[j].name
subtemp.num = risk_list[i].mo[j].num
subtemp.title = risk_list[i].mo[j].title[k].name
subtemp.t_id = risk_list[i].mo[j].title[k].t_id
var temp_risk = this.data.risk_listitm;
var temp = this.data.risk_listitm;
for (var i = 0; i < temp.length; i++) {
for (var j = 0; j < temp[i].mo.length; j++) {
for (var k = 0; k < temp[i].mo[j].title.length; k++) {
if (temp[i].name != '') {
// var temp = {}
// var subtemp = {}
if (temp[i].mo[j].choose_status) {
if (temp[i].mo[j].title[k].label_state) {
temp_risk[i].name = temp[i].name
temp_risk[i].num = temp[i].num
temp_risk[i].title = temp[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
temp_risk[i].mo[j].num = temp[i].mo[j].num
temp_risk[i].mo[j].title = temp[i].mo[j].title[k].name
console.log(temp_risk)
}
}
}
}
sub_array.push(subtemp)
}
temp.mo = sub_array
temp_risk.push(temp)
console.log(temp_risk)
this.setData({
more: temp_risk
})
... ... @@ -443,7 +420,6 @@ Page({
const add = tempBenefice.every((tempBenefice) => {
return tempBenefice != nowPerson
})
console.log()
if (add) {
beneficiary_list[index].beneficiary_name = nowPerson;
tempBenefice.push(nowPerson)
... ... @@ -665,8 +641,6 @@ Page({
});
},
//保障期
warrantyTwo(e) {
if (this.data.inforid != 0) {
... ... @@ -690,7 +664,6 @@ Page({
this.countImpletionTime2()
},
//重组保障期数据格式
tempWarranty() {
var guarantee_name = this.data.guarantee_name
... ... @@ -779,7 +752,6 @@ Page({
tempburningTime() {
var time_name = this.data.time_name
var unit = this.data.unit2
console.log(unit)
var long_money = this.data.long_money
long_money.num = time_name
long_money.title = unit
... ... @@ -793,7 +765,6 @@ Page({
countImpletionTime() {
var time_name = parseInt(this.data.time_name)
var unit = this.data.unit2
var compact_time = this.data.compact_time
var year = parseInt(new Date(compact_time).getFullYear())
var month = parseInt(new Date(compact_time).getMonth() + 1)
... ... @@ -858,7 +829,6 @@ Page({
})
},
//家庭成员
familyMember() {
var FamilyId = this.data.FamilyId
... ... @@ -884,6 +854,7 @@ Page({
})
},
//设置缓存
setStorge(e) {
this.tempBeneficiary()
this.tempWarranty()
... ... @@ -937,6 +908,11 @@ Page({
wx.navigateBack({
delta: 1,
})
this.setData({
storge_state: true
})
var storge_state = true
wx.setStorageSync('storge_state', storge_state)
}
})
},
... ... @@ -993,9 +969,8 @@ Page({
})
},
// 保单验证&&上传保单
//完成保单添加
listVerify(e) {
console.log(this.data.inforid)
if (this.data.inforid == 0 || this.data.inforid == undefined) {
this.tempBeneficiary()
this.tempWarranty()
... ... @@ -1043,6 +1018,9 @@ Page({
var bank_num = e.detail.value.bank_num
var picurl = JSON.stringify(this.data.imgs)
var continue1 = e.detail.target.dataset.type
var complete = e.detail.target.dataset.type
if (in_num == '') {
warn = '请输入保单号!'
} else if (firm == '') {
... ... @@ -1107,9 +1085,48 @@ Page({
}
app.post(url, params).then((res) => {
if (res.data.code == 200) {
wx.navigateBack({
delta: 1,
})
if (continue1 == 'continue1') {
wx.showToast({
title: '添加成功',
icon: 'none',
duration: 2000,
})
this.setData({
in_num:'',
firm:'',
applicant_name:'',
recognizee_name:'',
// beneficiary_list: [{
// name_array: [],
// unit: ''
// }],
main_risks:'',
main_array:'',
year_money:'',
compact_time:'',
warranty_two:'',
long_money:'',
bank:'',
bank_num:'',
impletion_time:'',
warranty_one:'',
// risk_list:'',
imgs:'',
unit:'',
unit2: '',
unit3: '',
unit4: '',
})
} else if (complete == 'complete') {
wx.showToast({
title: '添加成功',
icon: 'none',
duration: 2000,
})
wx.navigateBack({
delta: 1,
})
}
}
})
}
... ... @@ -1132,7 +1149,6 @@ Page({
InfoId: this.data.inforid,
}
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
... ... @@ -1151,6 +1167,7 @@ Page({
var risk_list = res.data.data.def.more
var projectlist = this.data.projectlist
for (var i = 0; i < risk_list.length; i++) {
for (var j = 0; j < projectlist.length; j++) {
for (var k = 0; k < projectlist[j].title.length; k++) {
... ... @@ -1158,7 +1175,6 @@ Page({
if (risk_list[i].title == projectlist[j].title[k].name) {
var title = {}
title.name = projectlist[j].title[k]
// risk_list[i].push(title)
}
}
}
... ... @@ -1222,8 +1238,10 @@ Page({
}
if (options.inforid != undefined) {
this.getlistVerify()
} else {
// this.getStorage()
}
if (wx.getStorageSync('storge_state') && options.inforid == undefined) {
this.getStorage()
}
},
... ...
... ... @@ -28,7 +28,7 @@
</view>
<!-- 表单部分 -->
<form bindsubmit='listVerify' bindreset="formReset">
<form bindsubmit='listVerify' >
<view class='content_item'>
<view class='item_list'>
<view class='list_title'>保单号</view>
... ... @@ -179,7 +179,7 @@
<view class='item_list'>
<view class='list_title'>续费账号</view>
<view class='list_input'>
<input type='text' placeholder='请填写' name='bank_num' value='{{bank_num}}' bindinput='setBankNum'></input>
<input type='text' placeholder='请输入末四位' name='bank_num' value='{{bank_num}}' bindinput='setBankNum'></input>
</view>
</view>
... ...
... ... @@ -18,6 +18,7 @@ Page({
userId: app.globalData.UserId,
}
app.post(url,params).then((res)=>{
console.log(res)
if(res.data.code==200){
that.setData({
list:res.data.data
... ...
... ... @@ -4,7 +4,7 @@
</view>
<view class='list_box'>
<view class="item_list" wx:for='{{list.list}}' wx:key>
<view class="list_content">{{item.name}}</view>
<view class="list_content">{{item.user_nickname}}</view>
<view class='list_info'>浏览{{item.num}}次</view>
</view>
</view>
... ...
// pages/editProfile/editProfile.js
const app=getApp()
const app = getApp()
Page({
/**
... ... @@ -15,7 +15,7 @@ Page({
signature: '',
worktime: '',
hasimg: '',
approve_pic:''
approve_pic: ''
},
... ... @@ -28,8 +28,8 @@ Page({
app.post(url, params).then((res) => {
console.log(res.data.data.list.work_time == '0000-00-00')
var worktime = res.data.data.list.work_time
if (res.data.data.list.work_time == '0000-00-00'){
worktime=''
if (res.data.data.list.work_time == '0000-00-00') {
worktime = ''
}
if (res.data.code == 200) {
this.setData({
... ... @@ -71,7 +71,7 @@ Page({
'strtime': strtime,
'token': app.strTime(strtime)
},
success: function (res) {
success: function(res) {
var data = JSON.parse(res.data);
var picurl = data.data.picurl;
picurl = picurl.indexOf('http') != '-1' ? picurl : "http://" + picurl
... ... @@ -106,7 +106,7 @@ Page({
'strtime': strtime,
'token': app.strTime(strtime)
},
success: function (res) {
success: function(res) {
var data = JSON.parse(res.data);
var picurl = data.data.picurl;
picurl = picurl.indexOf('http') != '-1' ? picurl : "http://" + picurl
... ... @@ -176,7 +176,7 @@ Page({
Honor: this.data.honor,
Signature: this.data.signature,
WorkTime: this.data.worktime,
ApprovePic:this.data.approve_pic
ApprovePic: this.data.approve_pic
}
app.post(url, params).then((res) => {
this.userInfo()
... ... @@ -192,59 +192,80 @@ Page({
}
})
},
// 获取职位名称的值
jobTitle(e) {
this.setData({
workpost: this.data.jobTitle_array[e.detail.value],
titleindex: e.detail.value,
})
},
//得到职业名称
getjobTitle() {
let url = 'member/work'
let params = {}
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code == 200) {
this.setData({
jobTitle_array: res.data.data.work,
})
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
onLoad: function(options) {
this.userInfo()
this.getjobTitle()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
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
... ...
... ... @@ -6,7 +6,7 @@
</view>
<view class='header_portrait'>
<!-- <view class='iconfont icon-zhaoxiangji1'></view> -->
<view class='iconfont icon-bi' ></view>
<view class='iconfont icon-bi'></view>
<image src="{{hasimg}}"></image>
</view>
... ... @@ -16,25 +16,34 @@
<view class="item_list">
<view class="list_title">姓名</view>
<view class="list_content">
<input type="text" placeholder='请输入' value="{{username?username:''}}" class="input_item" bindinput='userName'></input>
<input type="text" placeholder='请输入' placeholder-class='pl_style' value="{{username?username:''}}" class="input_item" bindinput='userName'></input>
</view>
</view>
<view class="item_list">
<view class="list_title">保险公司</view>
<view class="list_content">
<input type="text" placeholder='请输入' value="{{work}}" class="input_item" bindinput='work'></input>
<input type="text" placeholder='请输入' placeholder-class='pl_style' value="{{work}}" class="input_item" bindinput='work'></input>
</view>
</view>
<view class="item_list">
<!-- <view class="item_list">
<view class="list_title">职业名称</view>
<view class="list_content">
<input type="text" placeholder='请输入' value="{{workpost}}" class="input_item" bindinput='workPost'></input>
<input type="text" placeholder='请输入' placeholder-class='pl_style' value="{{workpost}}" class="input_item" bindinput='workPost'></input>
</view>
</view> -->
<view class='item_list'>
<view class='list_title'>职业名称</view>
<view class='list_input' bindtap='chargePicker'>
<picker class='list_picker' value='{{titleindex}}' range='{{jobTitle_array}}' bindchange="jobTitle">
<input placeholder='请选择当前职位' value='{{workpost}}' disabled='true' placeholder-class='pl_style'></input>
<view class='iconfont icon-xiala'></view>
</picker>
</view>
</view>
<view class="item_list">
<view class="list_title">所在城市</view>
<view class="list_content">
<input type="text" placeholder='请输入' value="{{city}}" class="input_item" bindinput='city'></input>
<input type="text" placeholder='请输入' placeholder-class='pl_style' value="{{city}}" class="input_item" bindinput='city'></input>
</view>
</view>
</view>
... ... @@ -42,20 +51,20 @@
<view class="item_list">
<view class="list_title">获得荣誉</view>
<view class="list_content">
<input type="text" placeholder='请输入' value="{{honor}}" class="input_item" bindinput='honor'></input>
<input type="text" placeholder='请输入' placeholder-class='pl_style' value="{{honor}}" class="input_item" bindinput='honor'></input>
</view>
</view>
<view class="item_list">
<view class="list_title">座右铭</view>
<view class="list_content">
<input type="text" placeholder='请输入' value="{{signature}}" class="input_item" bindinput='signature'></input>
<input type="text" placeholder='请输入' placeholder-class='pl_style' value="{{signature}}" class="input_item" bindinput='signature'></input>
</view>
</view>
<view class="item_list">
<view class="list_title">从业时间</view>
<view class="list_content">
<!-- 默认单位年 -->
<input type="text" placeholder='请输入' value='{{worktime}}' class="input_item" bindinput='workTime'></input>
<input type="text" placeholder='请输入' placeholder-class='pl_style' value='{{worktime}}' class="input_item" bindinput='workTime'></input>
</view>
</view>
<view class='box'>
... ...
... ... @@ -27,6 +27,7 @@ page {
align-items: center;
justify-content: center;
}
.icon-bi {
width: 40rpx;
height: 40rpx;
... ... @@ -43,6 +44,7 @@ page {
align-items: center;
justify-content: center;
}
.header_portrait image {
width: 100%;
height: 100%;
... ... @@ -103,6 +105,27 @@ page {
margin-right: 26rpx;
}
.pl_style {
font-size: 30rpx;
color: #999;
}
.list_input{
width: 60%;
font-size: 30rpx;
}
.list_picker {
width: 127%;
position: relative;
}
.icon-xiala {
font-size: 32rpx;
color: #ccc;
position: absolute;
right: 0;
top: 10rpx;
}
.list_content {
font-size: 30rpx;
color: #000;
... ... @@ -128,7 +151,7 @@ page {
}
.box {
padding:16rpx 32rpx;
padding: 16rpx 32rpx;
background: #fff;
}
... ... @@ -154,6 +177,6 @@ page {
.upload_box .icon-add {
font-size: 64rpx;
color: #CCCCCC;
color: #ccc;
margin-bottom: 30rpx;
}
... ...
// pages/editProfile/editProfile.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
CounselorId: '',
userinfo: [],
username: '',
work: '',
workpost: '',
city: '',
honor: '',
signature: '',
worktime: '',
hasimg: '',
approve_pic: ''
},
//获取资料详情
userInfo() {
let url = 'member/counselordef'
let params = {
CounselorId: this.data.CounselorId
// CounselorId: 413
}
app.post(url, params).then((res) => {
console.log(res)
var worktime = res.data.data.data.work_time
if (res.data.data.data.work_time == '0000-00-00') {
worktime = ''
}
if (res.data.code == 200) {
this.setData({
userinfo: res.data.data.data,
username: res.data.data.data.name,
work: res.data.data.data.work,
workpost: res.data.data.data.work_post,
city: res.data.data.data.city,
honor: res.data.data.data.honor,
signature: res.data.data.data.signature,
worktime: worktime,
avatar: res.data.data.data.avatar,
approve_pic: res.data.data.data.approve_pic,
})
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
console.log(11,options.CounselorId)
this.setData({
CounselorId: options.CounselorId
})
this.userInfo()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--pages/my/editProfile/editProfile.wxml-->
<view class='banner_box' bindtap='chooseimg'>
<view class='header_portrait'>
<image src="{{avatar}}"></image>
<!-- <view class='iconfont icon-bi'></view> -->
</view>
<!-- <view class='header_portrait'>
<!-- <view class='iconfont icon-zhaoxiangji1'></view> -->
<!-- <view class='iconfont icon-bi' ></view>
<image src="{{hasimg}}"></image>
</view> -->
</view>
<view class="content_item">
<view class="item_list">
<view class="list_title">姓名</view>
<view class="list_content">
<input type="text" placeholder='' value='{{username}}' class="input_item" bindinput='userName' disabled='true'></input>
</view>
</view>
<view class="item_list">
<view class="list_title">保险公司</view>
<view class="list_content">
<input type="text" placeholder='' value='{{work}}' class="input_item" bindinput='work' disabled='true'></input>
</view>
</view>
<view class="item_list">
<view class="list_title">职业名称</view>
<view class="list_content">
<input type="text" placeholder='' value='{{workpost}}' class="input_item" bindinput='workPost' disabled='true'></input>
</view>
</view>
<view class="item_list">
<view class="list_title">所在城市</view>
<view class="list_content">
<input type="text" placeholder='' value='{{city}}' class="input_item" bindinput='city' disabled='true'></input>
</view>
</view>
</view>
<view class="content_item">
<view class="item_list">
<view class="list_title">获得荣誉</view>
<view class="list_content">
<input type="text" placeholder='' value='{{honor}}' class="input_item" bindinput='honor' disabled='true'></input>
</view>
</view>
<view class="item_list">
<view class="list_title">座右铭</view>
<view class="list_content">
<input type="text" placeholder='' value='{{signature}}' class="input_item" bindinput='signature' disabled='true'></input>
</view>
</view>
<view class="item_list">
<view class="list_title">从业时间</view>
<view class="list_content">
<!-- 默认单位年 -->
<input type="text" placeholder='' value='{{worktime}}' class="input_item" bindinput='workTime' disabled='true'></input>
</view>
</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='popup_img'>
<image src='{{approve_pic}}' bindtap='viewImg' data-index='{{index}}'></image>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
/* pages/my/editProfile/editProfile.wxss */
page {
background-color: #f5f5fa;
}
.banner_box {
width: 750rpx;
height: 360rpx;
background: #fff;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.header_portrait {
width: 200rpx;
height: 200rpx;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 10;
display: flex;
align-items: center;
justify-content: center;
}
.icon-bi {
width: 40rpx;
height: 40rpx;
font-size: 26rpx;
color: #f80;
background: #f5f5fa;
opacity: 0.8;
border-radius: 50%;
position: absolute;
right: 0rpx;
bottom: 0;
z-index: 10;
display: flex;
align-items: center;
justify-content: center;
}
.header_portrait image {
width: 100%;
height: 100%;
border-radius: 50%;
}
.header_opacity {
width: 200rpx;
height: 200rpx;
background-color: rgba(0, 0, 0, 0.6);
border-radius: 50%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 20;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.icon-zhaoxiangji1 {
font-size: 56rpx;
color: #fff;
}
.header_opacity image {
width: 100%;
height: 100%;
opacity: 0.6;
border-radius: 50%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: -5;
}
.content_item {
margin-top: 20rpx;
}
.item_list {
display: flex;
flex-wrap: wrap;
align-items: center;
padding: 32rpx;
border-bottom: 1rpx solid #f5f5fa;
position: relative;
background-color: #fff;
}
.list_title {
width: 120rpx;
font-size: 30rpx;
color: #000;
margin-right: 26rpx;
}
.list_content {
font-size: 30rpx;
color: #000;
min-width: 78%;
}
.input_item {
border: 0;
outline: none;
}
.save_btn {
width: 100%;
height: 80rpx;
font-size: 36rpx;
color: #fff;
background-color: #0286ff;
border-radius: 40rpx;
display: flex;
align-items: center;
justify-content: center;
margin: 50rpx auto;
}
.box {
padding:16rpx 32rpx;
background: #fff;
}
.upload_box {
font-size: 28rpx;
color: #1a1a1a;
text-align: center;
padding: 36rpx 0;
border-radius: 10rpx;
box-shadow: 0rpx 5rpx 13rpx rgba(235, 235, 235, 1);
}
.popup_img {
position: relative;
}
.icon-guanbi {
position: absolute;
top: 10rpx;
right: 20rpx;
color: #ccc;
}
.upload_box .icon-add {
font-size: 64rpx;
color: #CCCCCC;
margin-bottom: 30rpx;
}
... ...
... ... @@ -9,17 +9,24 @@ Page({
tab_state:false,
invitalist:[]
},
//展开收起
tabExpand() {
tabExpand(e) {
var index = e.currentTarget.dataset.index
var invitalist = this.data.invitalist
invitalist[index].tab_state = !(invitalist[index].tab_state)
this.setData({
tab_state: !(this.data.tab_state)
invitalist: invitalist
})
},
invitationList() {
let url = 'counselor/invite'
let params = {
UserId: app.globalData.UserId,
// UserId: 166
}
app.post(url, params).then((res) => {
console.log(res)
... ...
... ... @@ -4,21 +4,21 @@
<text>邀请名单</text>
<text>充值记录</text>
</view>
<view class='box' wx:for='{{invitalist}}'>
<view class='box' wx:for='{{invitalist}}' wx:key>
<view class='envoy_content_box'>
<view>
<view class='envoy_title'>{{item.name}}</view>
</view>
<view bindtap='tabExpand'>
<text class="iconfont font_icon {{tab_state?'icon-shang':'icon-xiala'}}"></text>
<text class='envoy_hint' wx:if='{{tab_state}}'>收起</text>
<text class='envoy_hint' wx:else>展开</text>
<view bindtap='tabExpand' data-index='{{index}}'>
<text class="iconfont font_icon {{item.tab_state?'icon-shang':'icon-xiala'}}"></text>
<!-- <text class='envoy_hint' wx:if='{{item.tab_state}}'>收起</text>
<text class='envoy_hint' wx:else>展开</text> -->
</view>
</view>
<view class="envoy_info_box {{!tab_state?'expand':''}}" wx:if='{{item.paylog.length>0}}'>
<view class='envoy_content' wx:for='{{item.paylog}}' wx:key>
<view>{{item.time}}</view>
<view class='envoy_title'>{{item.log}}</view>
<view class="envoy_info_box {{!item.tab_state?'expand':''}}" wx:if='{{item.pg.length>0}}'>
<view class='envoy_content' wx:for='{{item.pg}}' wx:key>
<view>{{item.change}}</view>
<view class=''>{{item.time}}</view>
</view>
</view>
</view>
... ...
<!--pages/my/payWay/payWay.wxml-->
<view class='banner_box' id='{{VipId}}'>
<view>{{title}}</view>
<!-- <text class='money'>100</text> 元 </view>-->
<!-- <text class='money'>100</text> 元 </view>-->
<view class='banner_hint'>返{{moneyt}}T币</view>
</view>
<view class='content_item'>
<view class='item_list' bindtap='setpaytype1' >
<view class='item_list' bindtap='setpaytype1'>
<view class='method_box'>
<text class='iconfont icon-jinbi'></text>
<text>T币支付</text>
</view>
<view>
<view class='iconfont icon-xuanzhong1' wx:if='{{ PayType==1}}' ></view>
<view class='iconfont icon-yuancircle46' wx:else></view>
<text class='money'>{{moneyt}}T币</text>
<text class='iconfont icon-xuanzhong1' wx:if='{{PayType==1}}'></text>
<text class='iconfont icon-yuancircle46' wx:else></text>
</view>
</view>
<view class='item_list' bindtap='setpaytype2'>
<view class='item_list' bindtap='setpaytype2'>
<view class='method_box'>
<text class='iconfont icon-weixinzhifu'></text>
<text>微信支付</text>
</view>
<view>
<view class='iconfont icon-xuanzhong1' wx:if='{{ PayType==2}}'></view>
<view class='iconfont icon-xuanzhong1' wx:if='{{PayType==2}}'></view>
<view class='iconfont icon-yuancircle46' wx:else></view>
</view>
</view>
</view>
<view class='balance'>您的可用T币余额: <text>{{balance}}</text> </view>
<view class='balance'>您的到期时间: <text>{{end_time}}</text> </view>
<view class='bottom_btn' bindtap='gopay'>立即支付</view>
\ No newline at end of file
<view class='balance'>您的可用T币余额:
<text>{{balance}}</text> </view>
<view class='balance'>您的到期时间:
<text>{{end_time}}</text> </view>
<view class='bottom_btn' bindtap='gopay'>立即支付</view>
\ No newline at end of file
... ...
... ... @@ -3,17 +3,21 @@
page {
background: #f5f5fa;
}
.balance{
.balance {
font-size: 30rpx;
color: #1a1a1a;
margin-top: 50rpx;
margin-left: 33rpx;
}
.balance text{
.balance text {
font-size: 36rpx;
color: #bd1a21;
color: #bd1a21;
margin-left: 20rpx;
}
.banner_box {
font-size: 30rpx;
color: #333;
... ... @@ -91,7 +95,7 @@ page {
color: rgba(255, 255, 255, 1);
display: flex;
align-items: center;
justify-content: center;
justify-content: center;
margin: 0 auto;
margin-top: 52rpx;
}
... ...
... ... @@ -72,7 +72,7 @@ Page({
},
//
getData() {
getInfo() {
let that = this;
let url = 'counselor/familylist';
let param = {
... ... @@ -83,42 +83,87 @@ Page({
app.post(url, param).then((res) => {
console.log(res)
if (res.data.code == 200) {
if (res.data.data.type == '-13') {
that.setData({
list: res.data.data.list,
KeyWord: '',
// vip_state: true
})
// if (res.data.data.type == '-13') {
// wx.showToast({
// title: '会员到期,请充值',
// icon: 'none',
// duration: 2000,
// success: function() {}
// }, 2000)
// that.setData({
// vip_state: false
// })
// } else if (res.data.data.type == '-12') {
// wx.showToast({
// title: '您已经被禁用,请联系管理员',
// icon: 'none',
// success: function() {
// setTimeout(function() {
// wx.navigateTo({
// url: '/pages/index/index',
// })
// }, 2000)
// }
// }, 2000)
// that.setData({
// vip_state: false
// })
// } else if (res.data.data.type == '-11') {
// wx.showToast({
// title: '您的权限不足',
// icon: 'none',
// success: function() {
// setTimeout(function() {
// wx.navigateTo({
// url: '/pages/index/index',
// })
// })
// }
// }, 2000)
// that.setData({
// vip_state: false
// })
// } else {
// that.setData({
// list: res.data.data.list,
// KeyWord: '',
// vip_state: true
// })
// }
}
}).catch((errMsg) => {
console.log(errMsg)
})
},
//获取客户管理页面信息
getData() {
let that = this;
let url = 'pubilc/UserType';
let param = {
UserId: app.globalData.UserId,
}
app.post(url, param).then((res) => {
console.log(res)
if (res.data.code == 200) {
if (res.data.data.type == '5') {
wx.showToast({
title: '会员到期,请充值',
icon: 'none',
duration: 2000,
success: function() {}
icon: 'none'
}, 2000)
that.setData({
vip_state: false
})
} else if (res.data.data.type == '-12') {
wx.showToast({
title: '您已经被禁用,请联系管理员',
icon: 'none',
success: function() {
setTimeout(function() {
wx.navigateTo({
url: '/pages/index/index',
})
}, 2000)
}
}, 2000)
that.setData({
vip_state: false
})
} else if (res.data.data.type == '-11') {
} else if (res.data.data.type == '2') {
wx.showToast({
title: '您的权限不足',
icon: 'none',
success: function() {
setTimeout(function() {
wx.navigateTo({
url: '/pages/index/index',
})
})
}
icon: 'none'
}, 2000)
that.setData({
vip_state: false
... ... @@ -129,12 +174,16 @@ Page({
KeyWord: '',
vip_state: true
})
if (res.data.data.list[0].users[0].cid != '') {
that.setData({
cid: res.data.data.list[0].users[0].cid,
})
}
}
}
}).catch((errMsg) => {
console.log(errMsg)
// console.log(errMsg)
})
},
/**
... ... @@ -142,6 +191,7 @@ Page({
*/
onLoad: function(options) {
this.getData()
this.getInfo()
},
/**
... ...
... ... @@ -12,7 +12,7 @@
<view class='content_box'>
<view class='item_list' wx:for='{{list}}' wx:key='' wx:for-index='indexs' wx:for-item='items'>
<view class='list_left_box'>
<view class='list_label_box' bindtap='summaryList' data-num='{{items.infor}}' data-family_id='{{items.family_id}}' data-allinfo='{{items}}'>
<view class='list_label_box' bindtap="{{vip_state?'summaryList':''}}" data-num='{{items.infor}}' data-family_id='{{items.family_id}}' data-allinfo='{{items}}'>
<view class='iconfont icon-jiating1'></view>
<view>生成报告</view>
<text class='peoper_num'>{{items.infor}}</text>
... ...
... ... @@ -19,4 +19,7 @@
padding: 10rpx;
box-sizing: border-box;
text-align: center;
}
.list_right_box{
margin-top: 23rpx;
}
\ No newline at end of file
... ...
// pages/my/personalPolicyList/personalPolicyList.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
personalpolicylist: [],
DefId: ''//客户Id
},
// 个人保单列表接口调取
personalPolicyList() {
let url = 'counselor/definfor'
let params = {
DefId: this.data.DefId
}
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code == 200) {
this.setData({
personalpolicylist: res.data.data.list
})
console.log(res.data.data.list)
}
})
},
listDetail(e) {
console.log(e)
var InId = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/index/policyListDetail/policyListDetail?InId=' + InId,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that = this;
console.log(options.DefId);
that.setData({
DefId: options.DefId
})
this.personalPolicyList()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"navigationBarTitleText": "个人保单列表"
}
\ No newline at end of file
... ...
<!--pages/my/policyList/policyList.wxml-->
<view wx:if='{{personalpolicylist.length==0}}' class='no_data'>暂无数据</view>
<block wx:else>
<view class='content_item' bindtap='listDetail' wx:for='{{personalpolicylist}}' wx:key='' data-id='{{item.id}}'>
<view class='content_title'>{{item.firm}}</view>
<view class='content_type'>
<view class='type_title'>{{item.main_risks}}</view>
<view>保额:{{item.coverage}}万</view>
</view>
<view class='item_list'>
<text>被保人:</text>
<text>{{item.recognizee}}</text>
</view>
<view class='item_list'>
<text>生效日:</text>
<text>{{item.compact_time}}</text>
</view>
<view class='item_list'>
<text>期满日:</text>
<text>{{item.impletion_time}}</text>
</view>
<view class='item_list'>
<text>保单号:</text>
<text>{{item.in_num}}</text>
</view>
</view>
</block>
\ No newline at end of file
... ...
/* pages/my/policyList/policyList.wxss */
page{
background: #F5F5FA;
}
.content_item{
padding: 32rpx;
background-color: #fff;
margin-top: 16rpx;
}
.content_title{
font-size: 30rpx;
color: #000;
}
.content_type{
display: flex;
justify-content: space-between;
font-size: 30rpx;
color: #000;
margin-top: 29rpx;
}
.type_title{
color: #666666;
}
.item_list{
font-size: 28rpx;
color: #666666;
margin-top: 23rpx;
}
\ No newline at end of file
... ...
... ... @@ -9,6 +9,7 @@ Page({
InId: '',
listdetail: [], //保单详情列表
insurancetype: [], //保险类型
imgs:[],
},
// 保单详情接口调取
... ... @@ -22,10 +23,22 @@ Page({
this.setData({
listdetail: res.data.data.def,
insurancetype: res.data.data.def.more.in,
imgs: res.data.data.def.picurl
})
})
},
//预览图片
viewImg(e) {
var imgs = this.data.imgs
var current = e.currentTarget.dataset.index
wx.previewImage({
//当前显示图片
current: imgs[current],
//所有图片
urls: imgs
})
},
/**
* 生命周期函数--监听页面加载
*/
... ...
... ... @@ -30,12 +30,17 @@
<text>{{item.unit}}% </text>
</view>
</view>
<view class='item_list'>
<view class='list_title'>年缴保费</view>
<view class='list_input'>{{listdetail.year_money}}</view>
<view class='item_list' style=' align-items: flex-start;'>
<view class='list_title'>主险名称</view>
<view class='list_input'>{{listdetail.main_risks}}</view>
</view>
<view class='item_list' style=' align-items: flex-start;'>
<view class='list_title'>主险保障项</view>
<view class='list_input' wx:for='{{listdetail.guarantee}}' wx:key wx:for-item='its'>{{its.name}} {{its.num}}{{its.title}} </view>
</view>
<view class='item_list'>
<view class='list_title'>生效日</view>
<view class='list_title'>合同生效日</view>
<view class='list_input'>{{listdetail.compact_time}}</view>
</view>
<view class='item_list'>
... ... @@ -43,10 +48,22 @@
<view class='list_input'>{{listdetail.impletion_time}}</view>
</view>
<view class='item_list'>
<view class='list_title'>年缴保费</view>
<view class='list_input'>{{listdetail.year_money}}</view>
</view>
<view class='item_list'>
<view class='list_title'>保障期</view>
<view class='list_input'>{{listdetail.warranty_two.num}}{{listdetail.warranty_two.title}}</view>
</view>
<view class='item_list'>
<view class='list_title'>续费时长</view>
<view class='list_input'>{{listdetail.long_money.num}}{{listdetail.long_money.title}}</view>
</view>
<view class='item_list'>
<view class='list_title'>缴费方式</view>
<view class='list_input'>{{listdetail.type_money}}</view>
</view>
<view class='item_list'>
<view class='list_title'>续费银行</view>
<view class='list_input'>{{listdetail.bank}}</view>
</view>
... ... @@ -55,23 +72,24 @@
<view class='list_input'>{{listdetail.bank_num}}</view>
</view>
<view class='item_list'>
<view class='list_title'>主险名称</view>
<view class='list_input'>{{listdetail.main_risks}}</view>
<view class='list_title'>缴费期满日</view>
<view class='list_input'>{{listdetail.impletion_time}}</view>
</view>
<view class='item_list'>
<view class='list_title'>主险保额</view>
<view class='list_input'>{{listdetail.coverage}}</view>
</view>
<view class='item_list' wx:for='{{listdetail.more.in}}' wx:for-item='its' wx:key=''>
<view class='list_title'>{{its.name}}</view>
<view class='list_input'>{{its.num}}{{its.title}}</view>
<view class='list_title'>主险保障期</view>
<view class='list_input'>{{listdetail.warranty_one}}</view>
</view>
<view class='item_list' wx:for='{{listdetail.more.te}}' wx:for-item='its' wx:key=''>
<view class='list_title'>{{its.name}}</view>
<view class='list_input'>{{its.num}}{{its.title}}</view>
<view class='item_list' style=' align-items: flex-start;'>
<view class='list_title'>附加险名称 </view>
<view class='list_input' wx:for='{{listdetail.more}}' wx:key>
<view>{{item.name}}</view>
<view wx:for='{{item.mo}}' wx:key wx:for-item='its'>{{its.name}} {{its.num}}{{its.title}}</view>
</view>
</view>
</view>
<view class='bottom_box' wx:for='{{listdetail.more.picurl}}' wx:key=''>
<image src='{{item}}'></image>
<view class='bottom_box'>
<image src='{{item}}' wx:for='{{imgs}}' wx:key='' bindtap='viewImg' data-index='{{index}}'></image>
</view>
\ No newline at end of file
... ...
... ... @@ -62,10 +62,16 @@ page {
}
.bottom_box {
padding: 32rpx;
margin-top: 16rpx;
background: #fff;
padding: 0 32rpx;
/* margin-top: 16rpx;
background: #fff; */
display: flex;
align-items: center;
justify-content: center;
justify-content: space-between;
flex-wrap: wrap
}
.bottom_box image{
width: 330rpx;
height: 330rpx;
margin-top: 30rpx;
}
... ...
... ... @@ -21,6 +21,8 @@ Page({
disabled: true,
telnum: '',
sharetext: '',
user_info:[],
work:''
},
//注册顾问,默认推荐语
... ... @@ -38,12 +40,28 @@ Page({
})
},
//注册顾问
signType() {
let url = 'member/signtype'
let params = {
UserId: app.globalData.UserId
}
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code == 200) {
this.setData({
user_info: res.data.data
})
}
})
},
//获取机构值
getcompany() {
let url = 'member/firm'
let params = {}
app.post(url, params).then((res) => {
console.log(res)
console.log('firm',res)
if (res.data.code == 200) {
this.setData({
company_array: res.data.data.firm,
... ... @@ -55,8 +73,9 @@ Page({
// 获得保险公司的值
company(e) {
this.setData({
companyname: this.data.company_array[e.detail.value],
company_index: e.detail.value,
// companyname: this.data.company_array[e.detail.value],
// company_index: e.detail.value,
work:e.detail.value
})
},
... ... @@ -73,7 +92,7 @@ Page({
}
})
},
// 获取职位名称的值
jobTitle(e) {
... ... @@ -251,7 +270,7 @@ Page({
// 表单验证
formSubmit(e) {
var name = e.detail.value.name
var company = this.data.companyname
var company = this.data.work
var jobtitle = this.data.jobTitlename
var city = e.detail.value.city
var wx_num = e.detail.value.wx_num
... ... @@ -263,11 +282,10 @@ Page({
var warn = ""; //弹框时提示的内容
var flag = true; //判断信息输入是否完整
console.log(company)
if (name == '') {
warn = "请填写您的姓名";
} else if (this.data.index == -1) {
warn = "请选择所属机构"
} else if (this.data.work == '') {
warn = "请填写所属机构"
} else if (this.data.titleindex == -1) {
warn = "请选择职业名称"
} else if (city == '') {
... ... @@ -281,7 +299,6 @@ Page({
} else if (this.data.choose_state == false) {
warn = "请选择注册协议";
} else {
console.log(company)
flag = false; //若必要信息都填写,则不用弹框,且页面可以进行跳转
// 调取注册页面接口
let url = 'member/sign'
... ... @@ -338,12 +355,6 @@ Page({
})
}
// else if(res.data.data.type == 1) {
// wx.navigateTo({
// url: '/pages/index/index',
// })
// }
})
}
... ... @@ -363,33 +374,25 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
this.getcompany();
this.getjobTitle();
this.setData({
sharetext: options.sharetext,
name: options.name,
picurl: options.picurl
})
if (options.sharetext != undefined) {
this.signtype()
this.signType()
this.setData({
state: true
})
} else if (options.picurl != undefined) {
var userinfo = this.data.userinfo
userinfo.picurl = options.picurl
this.setData({
state: true,
userinfo: userinfo
})
} else {
//默认推荐语
this.promoteLanguage(999)
// this.setData({
// state: false
// })
this.setData({
state: false
})
}
this.getcompany();
this.getjobTitle();
},
/**
... ... @@ -402,8 +405,8 @@ Page({
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
onShow: function (options) {
},
/**
... ...
... ... @@ -2,11 +2,9 @@
<block wx:if='{{state}}'>
<view class='banner_box'>
<view class='head_portrait'>
<image src='{{userinfo.picurl}}'></image>
</view>
<view class='banner_info'>
{{sharetext}}
<image src='{{user_info.picurl}}'></image>
</view>
<view class='banner_info'>{{sharetext}}</view>
</view>
</block>
<block wx:else>
... ... @@ -15,7 +13,7 @@
<text class='iconfont icon-anquan'></text>
<!-- <image src='{{userinfo.picurl}}'></image> -->
</view>
<view class='banner_info'>{{promote_language}}~</view>
<view class='banner_info'>{{promote_language}}</view>
</view>
</block>
<form bindsubmit="formSubmit">
... ... @@ -30,10 +28,12 @@
<view class='item_list'>
<view class='list_title'>所属机构</view>
<view class='list_input'>
<picker class='list_picker' value='{{index}}' range='{{company_array}}' range-key="{{firm}}" bindchange="company">
<input placeholder='请选择保险公司' value='{{company_array[company_index]}}' disabled='true' placeholder-class='pl_style'></input>
<view class='iconfont icon-xiala'></view>
</picker>
<!-- bindchange="company" -->
<view class='list_picker' value='{{index}}' range='{{company_array}}' range-key="{{firm}}" >
<!-- <input placeholder='请选择保险公司' value='{{company_array[company_index]}}' disabled='true' placeholder-class='pl_style'></input> -->
<input placeholder='请填写保险公司' value='{{work}}' placeholder-class='pl_style' bindinput='company'></input>
<!-- <view class='iconfont icon-xiala'></view> -->
</view>
</view>
</view>
<view class='item_list'>
... ...
... ... @@ -21,6 +21,7 @@ picker {
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.icon-anquan {
... ...
... ... @@ -5,7 +5,8 @@
<view class='content_box'>
<view class='list_time'>
<text>{{item.create_time}}</text>
<!-- <text> 10:00:04</text> -->
<text wx:if='{{item.go_status==0}}'>已保存</text>
<text wx:if='{{item.go_status==1}}'>已发送</text>
</view>
<view class='list_content'>被保险人:{{item.users}}</view>
</view>
... ...
... ... @@ -18,6 +18,9 @@ page {
font-size: 30rpx;
font-weight: bold;
color: #000;
display: flex;
align-items: center;
justify-content: space-between;
}
.list_content {
... ...
// pages/reportList/reportList.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
FamilyId: '', //家庭组ID
allinfo: [], //家庭保单详情
mid: '',
cid: '',
medicalreportlist: [], //数据列表
},
// 体检报告列表接口调取
medicalReportList() {
let url = 'member/publishlist'
let params = {
UserId: app.globalData.UserId
}
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code == 200) {
this.setData({
medicalreportlist: res.data.data.list,
})
}
})
},
// 跳转查看家庭汇总表页
summaryList(e) {
console.log(e)
var reportid = e.currentTarget.id
wx.navigateTo({
url: '/pages/index/summaryList2/summaryList2?reportid=' + reportid,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.medicalReportList()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--pages/Program/Program.wxml-->
<view wx:if='{{medicalreportlist.length==0}}' class='no_data'>暂无数据</view>
<view wx:else>
<view class='box' wx:for='{{medicalreportlist}}' wx:for_item='item' wx:for-index='index' wx:key=''>
<view class='content_box'>
<view class='list_time'>
<text>{{item.create_time}}</text>
</view>
<view class='list_content'>顾问姓名:{{item.counselor}}</view>
<view class='list_content'>被保险人:{{item.defs_name}}</view>
</view>
<view class='list_btn_box'>
<view class='list_btn add_btn' bindtap='summaryList' id='{{item.id}}'>查看</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
/* pages/reportList/reportList.wxss */
@import '../Program/Program.wxss';
page {
background: #f5f5fa;
}
.box {
margin-top: 16rpx;
background: #fff;
}
.content_box {
padding: 30rpx;
}
.list_time {
font-size: 30rpx;
font-weight: bold;
color: #000;
}
.list_content {
font-size: 28rpx;
color: #000;
margin-top: 20rpx;
}
.list_btn_box {
border-top: 1rpx solid #ebebeb;
}
... ...
... ... @@ -2,135 +2,136 @@
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
data: [], //界面初始化的数据
sharetext: ''
},
getData() {
let that = this;
let url = 'counselor/share';
app.post(url, {
UserId: app.globalData.UserId
// UserId: 166
}).then((res) => {
console.log(res)
if (res.data.code == 200) {
that.setData({
data: res.data.data,
sharetext: res.data.data.sharetext
/**
* 页面的初始数据
*/
data: {
data: [], //界面初始化的数据
sharetext: ''
},
getData() {
let that = this;
let url = 'counselor/share';
app.post(url, {
UserId: app.globalData.UserId
// UserId: 166
}).then((res) => {
console.log(res)
if (res.data.code == 200) {
that.setData({
data: res.data.data,
sharetext: res.data.data.sharetext
})
}
}).catch((errMsg) => {
console.log(errMsg)
})
}
}).catch((errMsg) => {
console.log(errMsg)
})
},
settextdata(e) {
let data = this.data.data;
data.sharetext = e.detail.value;
this.setData({
data: data,
sharetext: e.detail.value
})
},
//有奖分享
prizeshare() {
var that = this;
let url = 'pubilc/sharetext';
app.post(url, {
UserId: app.globalData.UserId
}).then((res) => {
}).catch((errMsg) => {
console.log(errMsg)
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that = this;
that.getData();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function (options) {
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: "保单体验专家", // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?status =' + options.target.dataset.status, // 默认是当前页面,必须是以‘/’开头的完整路径
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 () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
if (options.from == 'button') {
var sharetext = this.data.sharetext
// 此处可以修改 shareObj 中的内容
shareObj.path = '/pages/start/start?status=' + options.target.dataset.status + '&sharetext=' + sharetext;
}   // 返回shareObj
return shareObj;
}
},
settextdata(e) {
let data = this.data.data;
data.sharetext = e.detail.value;
this.setData({
data: data,
sharetext: e.detail.value
})
},
//有奖分享
prizeshare() {
var that = this;
let url = 'pubilc/sharetext';
app.post(url, {
UserId: app.globalData.UserId
}).then((res) => {}).catch((errMsg) => {
console.log(errMsg)
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
let that = this;
that.getData();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function(options) {
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: "保单体验专家", // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?status =' + options.target.dataset.status, // 默认是当前页面,必须是以‘/’开头的完整路径
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() {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
if (options.from == 'button') {
var sharetext = this.data.sharetext
// 此处可以修改 shareObj 中的内容
shareObj.path = '/pages/start/start?status=' + options.target.dataset.status + '&sharetext=' + sharetext;
}   // 返回shareObj
return shareObj;
}
})
\ No newline at end of file
... ...
... ... @@ -25,7 +25,9 @@ Page({
edit_state: false,
edit_state2: false,
information_user: [],
save_state: true
save_state: true,
total_num: 0,
plan_id: ''
},
// 打电话
... ... @@ -70,7 +72,11 @@ Page({
for (var j = 0; j < information_user.length; j++) {
if (familymember[index].id == parseInt(information_user[j].def_id)) {
var list_num = information_user[j].num
if (familymember[index].member_state) {
var list_num = information_user[j].num
var total_num = this.data.total_num
total_num += list_num
}
}
}
... ... @@ -78,7 +84,7 @@ Page({
familymember: familymember,
collect: collect,
information: information,
list_num: list_num
list_num: total_num
})
},
... ... @@ -309,14 +315,16 @@ Page({
//体检报告
report(e) {
this.setData({
report: e.detail.value
report: e.detail.value,
edit_state: true
})
},
// 建议
suggest(e) {
this.setData({
advise: e.detail.value
advise: e.detail.value,
edit_state: true
})
},
... ... @@ -341,9 +349,17 @@ Page({
//增加推荐方案
recommendCaseList(e) {
this.setData({
popup_state: true
})
if (this.data.caselist.length == 0) {
wx.showToast({
title: '请去添加预设推荐方案',
icon: 'none'
})
} else {
this.setData({
popup_state: true
})
}
// wx.navigateTo({
// url: '/pages/index/Program/Program',
// })
... ... @@ -371,6 +387,23 @@ Page({
})
},
//预设方案列表
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 = [];
... ... @@ -443,7 +476,8 @@ Page({
that.setData({
status: res.data.data.status,
shareState: true,
save_state: false
save_state: false,
plan_id: res.data.data.publish_id
})
}
})
... ... @@ -455,6 +489,30 @@ Page({
}
},
//预览保单接口
listDetail2() {
let url = 'counselor/publishdef'
let params = {
PublishId: this.data.PublishId
}
app.post(url, params).then((res) => {
console.log(res)
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,
advise: res.data.data.list.advise,
report: res.data.data.list.report,
guarantee: res.data.data.list.guarantee,
collect: res.data.data.list.collect,
touser: res.data.data.list.touser, //发送人
recommend: res.data.data.list.recommend
})
}
})
},
/**
... ... @@ -486,6 +544,7 @@ Page({
this.setData({
PublishId: options.PublishId
})
// this.listDetail2()
}
this.listdetail()
this.caseList()
... ... @@ -538,6 +597,7 @@ Page({
*/
onShareAppMessage: function() {
var that = this; // 设置菜单中的转发按钮触发转发事件时的转发内容
that.planList()
var status = that.data.status;
var shareObj = {
title: "转发的标题",
... ... @@ -545,6 +605,7 @@ Page({
imgUrl: '',
success: function(res) {
// console.log(res)
that.planList()
if (res.errMsg == 'shareAppMessage:ok') {}
}
}
... ... @@ -555,7 +616,7 @@ Page({
// shareObj.path = '/pages/start/start?status=' + status;
// }   // 返回shareObj
return shareObj;
that.planList()
}
... ...
... ... @@ -76,7 +76,8 @@
<view class='tab_box'>
<view class="tab_item {{tab_state==0?'tab_active':''}}" data-index='0' bindtap='tabCharge'>报告与建议</view>
<view class="tab_item {{tab_state==1?'tab_active':''}}" data-index='1' bindtap='tabCharge'>保额汇总</view>
<view class="tab_item {{tab_state==2?'tab_active':''}}" data-index='2' bindtap='tabCharge'>保单明细({{list_num}})</view>
<view class="tab_item {{tab_state==2?'tab_active':''}}" data-index='2' bindtap='tabCharge'>保单明细</view>
<!-- ({{list_num}}) -->
</view>
<!-- 报告与建议 -->
... ... @@ -213,12 +214,13 @@
</view>
</view>
</block>
</view>
<!-- 底部按钮 -->
<view class='null_box'></view>
<view class='bottom_box'>
<button class='plan_btn' data-status='{{status}}' bindtap="{{save_state?'saveInfo':''}}">保存</button>
<button class='plan_btn plan_active' open-type="share" data-status='{{status}}'>发送给客户</button>
<button class='plan_btn plan_active' open-type="{{shareState?'share':''}}" data-status='{{status}}'>发送给客户</button>
</view>
</block>
\ No newline at end of file
... ...
// pages/index/summaryList2/summaryList2.js
const app=getApp()
Page({
/**
* 页面的初始数据
*/
data: {
familymember: '', //家庭成员
userinfo: '', //顾问信息
listdetail: '', //保单详情
touser: '', //发送人
PublishId: '', //体检表id
reportid: '', //体检报告详情
tab_state:0,
familymember: [],
userinfo: [],
information: [],
advise: '',
report: '',
guarantee: [],
list_num: 0,
collect: [],
caselist: [],
recommend:[],
},
// 打电话
makePhoneCall() {
let that = this;
var userinfo = that.data.userinfo
var phoneNumber = userinfo.mobile
wx.makePhoneCall({
phoneNumber: phoneNumber
})
},
// tabCharge
tabCharge(e) {
var index = e.currentTarget.dataset.index
var tab_state = this.data.tab_state
if (index == tab_state) {
return false
} else {
this.setData({
tab_state: index
})
}
},
listDetail() {
let url = 'counselor/publishdef'
let params = {
PublishId: this.data.PublishId
}
app.post(url, params).then((res) => {
console.log(res)
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,
advise: res.data.data.list.advise,
report: res.data.data.list.report,
guarantee: res.data.data.list.guarantee,
collect: res.data.data.list.collect,
touser: res.data.data.list.touser, //发送人
recommend: res.data.data.list.recommend
})
}
})
},
medicalReport() {
let url = 'member/publishdef'
let params = {
PubilshId: this.data.reportid,
def_user_id: app.globalData.UserId
}
app.post(url, params).then((res) => {
console.log('member',res)
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,
advise: res.data.data.list.advise,
report: res.data.data.list.report,
guarantee: res.data.data.list.guarantee,
collect: res.data.data.list.collect,
touser: res.data.data.list.touser, //发送人
recommend: res.data.data.list.recommend
})
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
PublishId: options.PublishId,
reportid: options.reportid
})
if (options.PublishId) {
this.listDetail()
}
if (options.reportid) {
this.medicalReport()
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
<!-- 保单报告 -->
<view class='top_box'>
<view class='banner_title'>您的家庭保单体检报告</view>
<view class='banner_content'>致:{{touser}}</view>
</view>
<!-- 保险顾问 -->
<view class='personal_box'>
<view class='banner_box'>
<view class='content_title'>
<text class='line'></text>
<text class='title'>您的保险顾问</text>
</view>
</view>
<view class='personal_content'>
<view class='head_box'>
<view class='head_portrait'>
<image src='{{userinfo.avatar}}'></image>
</view>
<view>
<view class='name'>{{userinfo.name}}
<!-- <text class='position'>222</text> -->
</view>
<view>电话 {{userinfo.mobile}}</view>
</view>
</view>
<view class='list_icon_box'>
<view class='iconfont icon-dianhua2' bindtap='makePhoneCall'></view>
</view>
</view>
</view>
<!-- 家庭成员 -->
<view class='box'>
<view class='banner_box'>
<view class='content_title'>
<text class='line'></text>
<text class='title'>家庭成员</text>
</view>
</view>
<view class='member'>
<view class="member_list member_active" wx:for='{{familymember}}' wx:key='' data-index='{{index}}' >{{item.name}}</view>
</view>
</view>
<view>
<!-- 保单选项 -->
<view class='tab_box'>
<view class="tab_item {{tab_state==0?'tab_active':''}}" data-index='0' bindtap='tabCharge'>报告与建议</view>
<view class="tab_item {{tab_state==1?'tab_active':''}}" data-index='1' bindtap='tabCharge'>保额汇总</view>
<view class="tab_item {{tab_state==2?'tab_active':''}}" data-index='2' bindtap='tabCharge'>保单明细</view>
</view>
<!-- 报告与建议 -->
<view class='report_box' wx:if='{{tab_state==0}}'>
<view class='medical_report_box'>
<view class='banner_box'>
<view class='content_title'>
<text class='title'>体检报告</text>
</view>
</view>
<view class='report_content'>
<textarea value='{{report}}' focus='' disabled='true'></textarea>
</view>
</view>
<view class='medical_report_box'>
<view class='banner_box'>
<view class='content_title'>
<text class='title'>建议</text>
</view>
</view>
<view class='report_content'>
<textarea value='{{advise}}' focus='' disabled='true'></textarea>
</view>
</view>
<!-- 缺口保障推荐方案 -->
<view class='plan_box'>
<view class='plan_title'>缺口保障推荐方案(选填)</view>
<view class='plan_content' wx:for='{{recommend}}' wx:key='' >
<!-- <view class='iconfont icon-guanbi'></view> -->
<view class='plan_list'>
<view class='plan_name'>产品名称</view>
<view class='plan_input'>
<input type='text' placeholder='重大疾病保' value='{{item.name}}' disabled='true'></input>
</view>
</view>
<view class='plan_list'>
<view class='plan_name'>保险公司</view>
<view class='plan_input'>
<input type='text' placeholder='重大疾病保' value='{{item.firm}}' disabled='true'></input>
</view>
</view>
<view class='plan_list'>
<view class='plan_name'>保障内容</view>
<view class='plan_input'>
<textarea placeholder='请输入保障内容' value='{{item.text}}' class='area_box' disabled='true'>
</textarea>
</view>
</view>
</view>
</view>
</view>
<!-- 保额汇总 -->
<block wx:elif='{{tab_state==1}}'>
<view class='summary_item' wx:for='{{collect}}' wx:key='' wx:for-index='mindex'>
<view class='summary_info'>{{item.name}}</view>
<view class='summary_box'>
<view class='summary_title_box'>
<view class='summary_title'>保障类别</view>
<view class='summary_title'>实际保额</view>
<view class='summary_title'>建议保额</view>
<view class='summary_title'>保障缺口</view>
</view>
<view class='summary_content_box'>
<view class='summary_list' wx:for='{{item.list}}' wx:key wx:for-item='its' wx:for-index='sindex'>
<view class='summary_content'>{{its.name}}</view>
<view class='summary_content'>{{its.text}}</view>
<view class='summary_content forehead'>
<input type='number' placeholder='' value="{{its.plan}}" focus='' disabled='true'></input>
</view>
<view class='summary_content'>{{its.gap}}</view>
</view>
</view>
</view>
</view>
</block>
<!-- 保单明细 -->
<block class='' wx:elif='{{tab_state==2}}'>
<view class='banner_info'>向左滑动查看更多内容</view>
<view class=''>
<view class='content_item_box'>
<view class='list_title_box'>
<view class='item_list'>
<view class='list_title'>被保险人</view>
</view>
<view class='item_list'>
<view class='list_title'>保单号</view>
</view>
<view class='item_list'>
<view class='list_title'>产品名称</view>
</view>
<view class='item_list'>
<view class='list_title'>保险公司</view>
</view>
<view class='item_list'>
<view class='list_title'>生效日期</view>
</view>
<view class='item_list' wx:for='{{guarantee}}' wx:key='' wx:for-item='sit'>
<view class='list_title'>{{sit.name}}</view>
</view>
</view>
<scroll-view scroll-x>
<view class='scroll_content_box'>
<view class='list_content_box' wx:for='{{information}}' wx:key=''>
<view class='item_list'>
<view class='list_title'>{{item.recognizee}}</view>
</view>
<view class='item_list'>
<view class='list_title' >{{item.in_num}}</view>
</view>
<view class='item_list'>
<view class='list_title'>{{item.main_risks}}22</view>
</view>
<view class='item_list'>
<view class='list_title'>{{item.firm}}</view>
</view>
<view class='item_list'>
<view class='list_title'>{{item.compact_time}}</view>
</view>
<view class='item_list' wx:for='{{item.more}}' wx:key='' wx:for-item='its'>
<view class='list_title'>{{its.num}} </view>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
</block>
</view>
... ...
/* pages/index/summaryList2/summaryList2.wxss */
@import '/pages/index/summaryList/summaryList.wxss';
\ No newline at end of file
... ...
// pages/index/verigyCode/verigyCode.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--pages/index/verigyCode/verigyCode.wxml-->
<!-- 判断是否需要验证 -->
<!-- wx:if='{{report_state}}' -->
<view class='mask_box' catchtap='cancleMask3'>
<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='popup_active' bindtap='reportInfo2'>确认</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
/* pages/index/verigyCode/verigyCode.wxss */
.mask_box {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: rgba(0, 0, 0, 0.2);
display: flex;
align-items: center;
justify-content: center;
}
.popup_box {
width: 686rpx;
height: 486rpx;
background: rgba(255, 255, 255, 1);
border-radius: 36rpx;
}
.popup_title {
font-size: 36rpx;
font-weight: bold;
color: #000;
border-bottom: 1rpx solid #f5f6fa;
padding: 30rpx 0;
text-align: center;
}
.popup_content {
font-size: 32rpx;
color: #000;
padding: 30rpx;
}
.popup_btn_box {
display: flex;
align-items: center;
justify-content: space-between;
padding: 60rpx;
box-sizing: border-box;
}
.popup_btn {
width: 260rpx;
height: 80rpx;
background: rgba(255, 255, 255, 1);
border: 1rpx solid rgba(2, 134, 255, 1);
border-radius: 40rpx;
font-size: 32rpx;
color: #0286ff;
display: flex;
align-items: center;
justify-content: center;
}
.popup_active {
background: #0286ff;
color: #fff;
}
/* */
.code_box {
width: 686rpx;
height: 703rpx;
background: rgba(255, 255, 255, 1);
box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(0, 0, 0, 0.08);
border-radius: 36rpx;
position: absolute;
bottom: 30rpx;
font-size: 30rpx;
color: #000;
padding: 0 40rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.code_img {
width: 328rpx;
height: 328rpx;
margin-top: 90rpx;
}
.code_img image {
width: 100%;
height: 100%;
}
.popup_content {
padding: 30rpx;
}
.popup_content input {
font-size: 36rpx;
}
.popup_content .popup_active {
width: 50%;
margin: 0 auto;
border-radius: 40rpx;
margin-top: 92rpx;
padding: 15rpx 30rpx;
display: flex;
align-items: center;
justify-content: center;
}
... ...
... ... @@ -42,7 +42,7 @@ Page({
paylist: paylist
})
},
//展开收起
tabExpand2(e) {
var indexs = e.currentTarget.dataset.indexs
... ... @@ -90,7 +90,7 @@ Page({
}
app.post(url, param).then((res) => {
console.log(res)
if (res.data.data.type == -1) {
if (res.data.data.type == 1) {
wx.showToast({
title: '提交成功,请等待后台审核',
icon: 'success',
... ... @@ -356,6 +356,12 @@ Page({
})
},
//输入的分享文字
shareText(e) {
this.setData({
sharetext: e.detail.value,
})
},
/**
* 生命周期函数--监听页面加载
... ... @@ -382,7 +388,7 @@ Page({
} 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: '推广员个人中心'
title: '传播大使个人中心'
})
}
that.getPersonanCenter()
... ... @@ -421,7 +427,7 @@ Page({
} 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: '推广员个人中心'
title: '传播大使个人中心'
})
}
that.getPersonanCenter()
... ...
... ... @@ -4,7 +4,7 @@
<image src='{{user_info.avatar}}'></image>
</view>
<view class='head_info_box'>
<view class='user_name'>{{user_info.name}}{{user_type}}</view>
<view class='user_name'>{{user_info.name}}</view>
<view>{{user_info.mobile}}</view>
<view>{{user_info.work}}</view>
<view>{{user_info.work_post}}</view>
... ... @@ -180,7 +180,7 @@
</view>
</view>
<view class="envoy_info_box {{!item.tab_state?'expand':''}}">
<view class='envoy_content' wx:for='{{item.paylog}}' wx:key=''>
<view class='envoy_content' wx:for='{{item.pg}}' wx:key=''>
<view>{{item.time}}</view>
<view class='envoy_title'>{{item.change}}元</view>
</view>
... ... @@ -191,7 +191,7 @@
<block wx:if='{{currentTab==1}}'>
<view class='share_box'>
<view class='envoy_content_box share'>
<view class='share_content'>我是您的推荐人向昱筱,郑重邀请您使用智能E化保单体检工具。填入以下信息完成注册。(前台可编辑)</view>
<textarea class='share_content' value='{{sharetext}}' bindinput='shareText'></textarea>
<view>
<button class='share_btn' open-type='share' data-status='{{status}}' data-sharetext='{{sharetext}}'>
<text>立即分享</text>
... ... @@ -228,14 +228,13 @@
</view>
</view>
<view class="envoy_info_box {{!items.tab_state?'expand':''}}">
<view class='envoy_content' wx:for='{{items.paylog}}' wx:for-item='item' wx:for-index='index' wx:key>
<view class='envoy_content' wx:for='{{items.pg}}' wx:for-item='item' wx:for-index='index' wx:key>
<view>{{item.time}} </view>
<view class='envoy_title'>{{item.change}}元</view>
</view>
</view>
</view>
</view>
</block>
</view>
... ...
... ... @@ -3,9 +3,11 @@
page {
background: #f5f5fa;
}
.list_info{
.list_info {
color: #ccc;
}
.banner_box {
background: #0286ff;
display: flex;
... ... @@ -194,10 +196,14 @@ page {
.share_content {
width: 75%;
height: 158rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
font-size: 26rpx;
padding: 25rpx 0 !important;
box-sizing: border-box;
}
.share_btn {
... ...
var pickerDatetime = function(obj) {
//初始化参数
var _this = this;
this.page = obj.page;
this.height = obj.height != undefined ? obj.height : 600;
this.success = obj.success != undefined ? obj.success : function(){};
var pickerToolHeight = 100;
this.page.setData({pickerViewHeight:this.height - pickerToolHeight});
//是否有动画效果,设置属性,按钮
this.pickerTimeout = null;
if (obj.animation == 'slide' || obj.animation == 'fade') {
this.animationType = 'slide';
this.duration = obj.duration != undefined ? obj.duration : 500;
this.TimingFunction = obj.timingFunction != undefined ? obj.timingFunction : 'linear';
this.thisDelay = obj.delay != undefined ? obj.delay : 0;
this.animation = obj.animation;
this.page.pickerClear = function(){
var newObj = {};
newObj[_this.pickerName] = '';
newObj['pickerAnimation'] = _this.pickerHideAnimation.export();
clearTimeout(_this.pickerTimeout);
_this.pickerTimeout = setTimeout(function() {
_this.page.setData({pickerViewShow:false});
},_this.duration);
this.setData(newObj);
};
this.page.pickerOk = function(){
var newObj = {};
newObj['pickerAnimation'] = _this.pickerHideAnimation.export();
this.setData(newObj);
clearTimeout(_this.pickerTimeout);
_this.pickerTimeout = setTimeout(function() {
_this.page.setData({pickerViewShow:false});
},_this.duration);
_this.success();
};
} else {
this.animation = '';
this.page.pickerClear = function(){
var newObj = {};
newObj[_this.pickerName] = '';
newObj['pickerViewShow'] = false;
this.setData(newObj);
};
this.page.pickerOk = function(){
this.setData({pickerViewShow:false});
_this.success();
};
}
};
//启用时间选择器的方法
pickerDatetime.prototype.setPicker = function(pickerName) {
var _this = this;
var pickerPreFlag = false;
if (this.page.data[pickerName] == undefined || this.page.data[pickerName] == '') {
//未有原先值,不处理
var pickerPreDate = new Date();
var pickerPreYear = pickerPreDate.getFullYear();
var pickerPreMonth = pickerPreDate.getMonth()+1;
var pickerPreDay = pickerPreDate.getDate();
var pickerPreHour = pickerPreDate.getHours();
var pickerPreMinute = pickerPreDate.getMinutes();
var pickerPreSecond = pickerPreDate.getSeconds();
var obj = new Object();
obj[pickerName] = pickerPreYear + '-' + pickerPreMonth + '-' + pickerPreDay + ' ' + addDatetimeZero(pickerPreHour) + ':' + addDatetimeZero(pickerPreMinute) + ':' + addDatetimeZero(pickerPreSecond);
this.page.setData(obj);
} else {
var pickerPreDate = new Date(Date.parse(this.page.data[pickerName].replace('-','/').replace('-','/').replace(' ','/')));
var pickerPreYear = pickerPreDate.getFullYear();
var pickerPreMonth = pickerPreDate.getMonth()+1;
var pickerPreDay = pickerPreDate.getDate();
var pickerPreHour = pickerPreDate.getHours();
var pickerPreMinute = pickerPreDate.getMinutes();
var pickerPreSecond = pickerPreDate.getSeconds();
}
this.pickerName = pickerName;
this.pickerDateTextArr = [];
this.pickerDateValueArr = [];
this.pickerHourTextArr = [];
this.pickerHourValueArr = [];
this.pickerMinuteTextArr = [];
this.pickerMinuteValueArr = [];
this.pickerSecondTextArr = [];
this.pickerSecondValueArr = [];
var pickerNowDate = new Date();
var pickerNowYear = pickerNowDate.getFullYear();
var pickerNowHour = pickerNowDate.getHours();
var pickerNowMinute = pickerNowDate.getMinutes();
var pickerNowSecond = pickerNowDate.getSeconds();
var pickerOldYearDate = new Date (pickerNowYear - 1,2,0);
var pickerOldYearDayNum = 365;
if (pickerOldYearDate.getDate() == 29 ) pickerOldYearDayNum=366;
var pickerNowMonth = pickerNowDate.getMonth() + 1;
var pickerNowDay = pickerNowDate.getDate();
// var pickerWeekArr = ["日","一","二","三","四","五","六"];
var pickerDateIndex=0;
var pickerHourIndex=0;
var pickerMinuteIndex=0;
var pickerSecondIndex = 0;
//获取年月日选择数组
for (let y = pickerNowYear - 1; y <= pickerNowYear + 1; y++) {
for (let m = 1; m <= 12; m++) {
let newDate = new Date(y, m, 0);
let m_days = newDate.getDate();
for (let d = 1; d <= m_days; d++) {
let newDate = new Date(y, m - 1, d);
// let w = pickerWeekArr[newDate.getDay()];
if (d == pickerPreDay && m == pickerPreMonth && y == pickerPreYear) {
pickerDateIndex = parseInt((new Date(y + '/' + m + '/' + d) - new Date((pickerNowYear - 1) + '/1/1')) / 1000 / 60 / 60 / 24);
}
if (d == pickerNowDay && m == pickerNowMonth && y == pickerNowYear) {
this.pickerDateTextArr.push('今日');
} else {
// this.pickerDateTextArr.push(m+'月'+d+'日 星期' + w);
this.pickerDateTextArr.push(y + '-' + m + '-' + d);
}
// this.pickerDateValueArr.push(y+'年'+m+'月'+d+'日');
this.pickerDateValueArr.push(y + '-' + m + '-' + d);
}
}
}
//获取小时和分钟的数组,设置默认值
if (pickerPreFlag) {
for (let i=pickerNowHour;i < 24; i++ ) {
this.pickerHourValueArr.push(i);
this.pickerHourTextArr.push(addDatetimeZero(i));
if (pickerPreHour == i) pickerHourIndex=i;
}
for (let i = pickerNowMinute;i < 60; i++ ) {
this.pickerMinuteValueArr.push(i);
this.pickerMinuteTextArr.push(addDatetimeZero(i));
if (pickerPreMinute == i) pickerMinuteIndex = i;
}
for (let i = pickerNowSecond; i < 60; i++) {
this.pickerSecondValueArr.push(i);
this.pickerSecondTextArr.push(addDatetimeZero(i));
if (pickerPreSecond == i) pickerSecondIndex = i;
}
} else {
for (let i=0;i < 24; i++ ) {
this.pickerHourValueArr.push(i);
this.pickerHourTextArr.push(addDatetimeZero(i));
if (pickerNowHour == i) pickerHourIndex=i;
}
for (let i=0;i < 60; i++ ) {
this.pickerMinuteValueArr.push(i);
this.pickerMinuteTextArr.push(addDatetimeZero(i));
if (pickerNowMinute == i) pickerMinuteIndex = i;
}
for (let i = 0; i < 60; i++) {
this.pickerSecondValueArr.push(i);
this.pickerSecondTextArr.push(addDatetimeZero(i));
if (pickerPreSecond == i) pickerSecondIndex = i;
}
}
//setData调用页面的选择器值、默认值
var newObj = {};
newObj['pickerDateTextArr'] = this.pickerDateTextArr;
newObj['pickerHourTextArr'] = this.pickerHourTextArr;
newObj['pickerMinuteTextArr'] = this.pickerMinuteTextArr;
newObj['pickerSecondTextArr'] = this.pickerSecondTextArr;
newObj['pickDatetimeValue'] = [pickerDateIndex, pickerHourIndex, pickerMinuteIndex, pickerSecondIndex];
this.page.setData(newObj);
console.log(newObj['pickerDateTextArr'])
if (this.animation == '') {
//无动画
this.page.setData({pickerViewShow:true});
} else {
//创建动画(由于只创建一个调用测试有问题,这里创建两个各自使用)
var pickerShowAnimationType = wx.createAnimation({
duration: _this.duration,
timingFunction: _this.thisTimingFunction,
delay: _this.thisDelay,
transformOrigin: '50% 50% 0',
success: function(res) {
}
});
var pickerHideAnimationType = wx.createAnimation({
duration: _this.duration,
timingFunction: _this.TimingFunction,
delay: _this.Delay,
transformOrigin: '50% 50% 0',
success: function(res) {
}
});
clearTimeout(this.pickerTimeout);
if (this.animation == 'slide') {
this.pickerShowAnimation = pickerShowAnimationType.height(this.height + 'rpx').step();
this.pickerHideAnimation = pickerHideAnimationType.height(0).step();
this.page.setData({pickerViewShow:true,pickerViewStyle:'height:0;'});
} else {
this.pickerShowAnimation = pickerShowAnimationType.opacity(1).step();
this.pickerHideAnimation = pickerHideAnimationType.opacity(0).step();
this.page.setData({pickerViewShow:true,pickerViewStyle:'opacity:0;'});
}
this.page.setData({
pickerAnimation:_this.pickerShowAnimation.export()
})
}
//设置bindChange事件
this.page.bindChange = function(e) {
var val = e.detail.value
var newObj = {};
newObj[pickerName] = _this.pickerDateValueArr[val[0]] + ' ' + _this.pickerHourTextArr[val[1]] + ':' + _this.pickerMinuteTextArr[val[2]] + ':' + _this.pickerSecondTextArr[val[3]];
this.setData(newObj);
};
};
module.exports = {
pickerDatetime : pickerDatetime,
}
function addDatetimeZero(num){
return new Array(2 - num.toString().length + 1).join("0") + num;
}
\ No newline at end of file
... ...
{}
\ No newline at end of file
... ...
<view class="pick_datetime" wx:if="{{pickerViewShow}}" animation="{{pickerAnimation}}" style="{{pickerViewStyle}}">
<view class="pick_datetime_tool">
<view class="pick_datetime_clear" bindtap="pickerOk">取消</view>
<view class="pick_datetime_ok" bindtap="pickerOk">完成</view>
</view>
<picker-view indicator-style="height: 40px;;" value="{{pickDatetimeValue}}" bindchange="bindChange" style="height:{{pickerViewHeight}}rpx;font-size:30rpx">
<picker-view-column>
<view wx:for="{{pickerDateTextArr}}" wx:key class="pick_datetime_column">{{item}}</view>
</picker-view-column>
<picker-view-column>
<view wx:for="{{pickerHourTextArr}}" wx:key class="pick_datetime_column">{{item}}</view>
</picker-view-column>
<picker-view-column>
<view wx:for="{{pickerMinuteTextArr}}" wx:key class="pick_datetime_column">{{item}}</view>
</picker-view-column>
<picker-view-column>
<view wx:for="{{pickerSecondTextArr}}" wx:key class="pick_datetime_column">{{item}}</view>
</picker-view-column>
</picker-view>
</view>
<view class="shadow-modal" wx:if="{{pickerViewShow}}"></view>
\ No newline at end of file
... ...
/* pages/picker-multiArray/multiArray.wxss */
.pick_datetime {
position: fixed;
left: 0;
bottom: 0;
width:100%;
overflow:hidden;
z-index: 20;
}
.pick_datetime_tool {
display:flex;
justify-content:space-between;
height:92rpx;
line-height:92rpx;
/* border-top:4rpx solid #eee; */
border-bottom:2rpx solid #eee;
padding:0 20rpx;
background: #fff;
}
.pick_datetime_ok {color:rgba(87, 213, 200, 1);}
.pick_datetime_clear {color:#666;}
.pick_datetime picker-view {
font-size:34rpx;
background: #fff;
}
.pick_datetime_column {
height:40px;
line-height:40px;
text-align:center;
}
.shadow-modal {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
background-color: #000000;
opacity: .3;
z-index: 10;
}
\ No newline at end of file
... ...
... ... @@ -9,6 +9,8 @@ Page({
status: '',
clientState: false,
elcheeState: false,
report_state: false,
PublishId: '',
},
//登录
... ... @@ -26,17 +28,17 @@ Page({
status: that.data.status //分享进入的需要此参数
}
app.post(url, params).then((res) => {
console.log('start',res.data.data.UserType)
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;
app.globalData.UserStatus = res.data.data.UserStatus; //用户状态(1初次登录,2多次登录)"
app.globalData.UserType = res.data.data.UserType; //用户类型(2为普通会员,3为顾问,4为推广)
app.globalData.checkstatus = res.data.data.checkstatus; //分享参数(0无,1保单,2注册,3文章)
console.log(app.globalData.UserType)
that.setData({
PublishId: res.data.data.PublishId
})
console.log(that.data.PublishId)
if (res.data.data.UserType == 4) {
app.globalData.temp_UserType = 3
}
... ... @@ -50,6 +52,7 @@ 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,
})
... ... @@ -72,19 +75,59 @@ 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'
})
// wx.showToast({
// title: '没有权限',
// icon: 'none'
// })
if (app.globalData.UserType == 2) {
if (app.globalData.user_index != 2) {
this.setData({
clientState: true,
})
}
} else if (app.globalData.UserType != 4) {
if (app.globalData.user_index == 4) {
this.setData({
elcheeState: true
})
}
} else if (app.globalData.UserType == 3) {
if (app.globalData.user_index != 3) {
wx.showToast({
title: '没有权限',
icon: 'none'
})
}
}
}
}
}
... ... @@ -96,6 +139,24 @@ Page({
});
},
cancleMask() {
this.setData({
clientState: false,
})
},
cancleMask2() {
this.setData({
elcheeState: false
})
},
cancleMask3() {
this.setData({
report_state: false
})
},
getpower() { //用户授权
let that = this;
let url = 'pubilc/impower';
... ... @@ -137,8 +198,8 @@ Page({
wx.switchTab({
url: '../indexs/index/index',
})
}
}
// else if (app.globalData.UserType == 3) {
// wx.switchTab({
// url: '../indexs/index/index',
... ... @@ -172,10 +233,80 @@ Page({
},
//体检报告详情检测
reportInfo(PublishId) {
let that = this;
let url = 'member/publishverify';
that.setData({
PublishId: PublishId
})
app.post(url, {
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,
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=' + PublishId,
})
}
}
}).catch((errMsg) => {
console.log(errMsg)
})
},
//体检报告详情检测
reportInfo2() {
let that = this;
console.log(that.data.PubilshId)
if (that.data.code == '') {
wx.showToast({
title: '请输入验证码',
icon: 'none'
})
} else {
let url = 'member/publishverify';
let params = {
PubilshId: that.data.PubilshId,
UserId: app.globalData.UserId,
code: that.data.code
}
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code == 200) {
wx.navigateTo({
url: '/pages/index/summaryList2/summaryList2?PublishId=' + that.data.PubilshId,
})
}
}).catch((errMsg) => {
console.log(errMsg)
})
}
},
setCode(e) {
this.setData({
code: e.detail.value
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
console.log(options)
if (options.status) {
this.setData({
status: options.status,
... ...
... ... @@ -29,7 +29,7 @@
</view>
<!-- 提示弹窗 -->
<view class='mask_box' wx:if='{{clientState}}'>
<view class='mask_box' wx:if='{{clientState}}' catchtap='cancleMask'>
<view class='popup_box'>
<view class='popup_title'>温馨提示</view>
<view class='popup_content'>本小程序仅供专业保险从业人员使用,如果您是保险顾问,请直接注册顾问,如果您是客户请联系您的保险顾问进行保单体检。</view>
... ... @@ -41,7 +41,7 @@
</view>
<!-- 二维码弹窗 -->
<view class='mask_box' wx:if='{{elcheeState}}'>
<view class='mask_box' wx:if='{{elcheeState}}' catchtap='cancleMask2'>
<view class='code_box'>
<view class='code_content'>如果您是保险行业大咖,请扫二维码(或 保存图片再打开微信识别)联系我们
</view>
... ... @@ -49,4 +49,15 @@
<image src='/images/img2.png'></image>
</view>
</view>
</view>
<!-- 判断是否需要验证 -->
<view class='mask_box' wx:if='{{report_state}}' catchtap='cancleMask3'>
<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='popup_active' bindtap='reportInfo2'>确认</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -21,7 +21,7 @@
.content_img {
width: 150rpx;
height:180rpx;
height: 180rpx;
position: absolute;
right: 20rpx;
top: -180rpx;
... ... @@ -52,17 +52,19 @@
position: absolute;
right: 44rpx;
}
.icon-hengxian1{
.icon-hengxian1 {
font-size: 50rpx;
position: absolute;
left: 70rpx;
top:85rpx;
top: 85rpx;
}
.title{
.title {
font-size: 36rpx;
position: absolute;
left: 70rpx;
top:60rpx;
top: 60rpx;
}
.bottom_btn .client_btn {
... ... @@ -165,3 +167,20 @@
width: 100%;
height: 100%;
}
.popup_content {
padding: 30rpx;
}
.popup_content input{
font-size: 36rpx;
}
.popup_content .popup_active {
width: 50%;
margin: 0 auto;
border-radius: 40rpx;
margin-top: 92rpx;
padding: 15rpx 30rpx;
display: flex;
align-items: center;
justify-content: center;
}
... ...
... ... @@ -36,7 +36,7 @@
"list": []
},
"miniprogram": {
"current": -1,
"current": 9,
"list": [
{
"id": -1,
... ... @@ -85,6 +85,17 @@
"name": "保单汇总表",
"pathName": "pages/index/summaryList/summaryList",
"query": "allinfo={\"family_id\":130,\"warn_time\":0,\"warn_status\":0,\"infor\":1,\"users\":[{\"family_id\":130,\"id\":245,\"name\":\"ceshi\",\"family_role\":\"dsfs\",\"user_family\":1,\"cid\":413,\"key_status\":0}]}"
},
{
"id": -1,
"name": "aa",
"pathName": "pages/index/editProfile/editProfile",
"query": ""
},
{
"id": -1,
"name": "aa",
"pathName": "pages/index/inviteList/inviteList"
}
]
}
... ...
function formatTime(date) {
var year = date.getFullYear()
var month = date.getMonth() + 1
var day = date.getDate()
var hour = date.getHours()
var minute = date.getMinutes()
var second = date.getSeconds()
return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
}
function formatNumber(n) {
n = n.toString()
return n[1] ? n : '0' + n
}
module.exports = {
formatTime: formatTime
}
function chooseTimeFormat(callback) {
//格式化日期时间
Date.prototype.pattern = function (fmt) {
var o = {
"M+": this.getMonth() + 1, //月份
"d+": this.getDate(), //日
"h+": this.getHours() % 12 == 0 ? 12 : this.getHours() % 12, //小时
"H+": this.getHours(), //小时
"m+": this.getMinutes(), //分
"s+": this.getSeconds(), //秒
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
"S": this.getMilliseconds() //毫秒
};
var week = {
"0": "/u65e5",
"1": "/u4e00",
"2": "/u4e8c",
"3": "/u4e09",
"4": "/u56db",
"5": "/u4e94",
"6": "/u516d"
};
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
}
if (/(E+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, ((RegExp.$1.length > 1) ? (RegExp.$1.length > 2 ? "/u661f/u671f" : "/u5468") : "") + week[this.getDay() + ""]);
}
for (var k in o) {
if (new RegExp("(" + k + ")").test(fmt)) {
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
}
}
return fmt;
}
var date = new Date();
console.log("格式化前:" + date);
var fmtDate = date.pattern("yyyy-MM-dd hh:mm:ss");
console.log("格式化后:" + fmtDate);
callback(fmtDate, date);
}
module.exports.chooseTimeFormat = chooseTimeFormat;
... ...