作者 刘晓艳

家庭保险二开

{
"pages": [
"pages/new/new",
"pages/start/start",
"pages/index/register/register",
"pages/about/about",
... ...
... ... @@ -122,6 +122,30 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function(options) {},
onShareAppMessage: function (option) {
let that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持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 () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}   // 来自页面内的按钮的转发
return shareObj;
}
})
\ No newline at end of file
... ...
... ... @@ -33,8 +33,9 @@
</view>
<view class='bottom_box'>
<view class='iconfont icon-zhuanfa'></view>
<view>转发</view>
<view class='bottom_box' >
<button open-type='share'></button>
<text class='iconfont icon-zhuanfa'></text>
<text>转发</text>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -108,6 +108,15 @@
bottom: 50rpx;
right: 50rpx;
}
.bottom_box button{
position: absolute;
top:0;
left:0;
width: 100%;
height: 100%;
z-index:1000;
opacity: 0;
}
.icon-zhuanfa {
font-size: 45rpx;
... ...
... ... @@ -184,7 +184,6 @@ Page({
})
},
//选择用户标签
selectLabel(e) {
var list = this.data.list
... ...
// pages/Program/Program.js
const app=getApp();
Page({
/**
* 页面的初始数据
*/
data: {
list: [],
temobj:{
name:'',
firm:'',
text:''
}
},
getlist() {
let that=this;
let url = 'counselor/SchemeList';
let params = {
userId: app.globalData.UserId
}
app.post(url, params).then((res) => {
if (res.data.code == 200) {
that.setData({
list: res.data.data.list
})
}
}).catch((err) => {
console.log(err)
})
},
setname(e){
let that = this;
let list = that.data.list;
let index = e.currentTarget.dataset.index;
list[index].name = e.detail.value;
that.setData({
list: list
})
},
setfirm(e){
let that = this;
let list = that.data.list;
let index = e.currentTarget.dataset.index;
list[index].firm = e.detail.value;
that.setData({
list: list
})
},
settemname(e){
let that=this;
let temobj = that.data.temobj;
temobj.name = e.detail.value;
that.setData({
temobj: temobj
})
},
settemfirm(e) {
let that = this;
let temobj = that.data.temobj;
temobj.firm = e.detail.value;
that.setData({
temobj: temobj
})
},
settemtext(e) {
let that = this;
let temobj = that.data.temobj;
temobj.text = e.detail.value;
that.setData({
temobj: temobj
})
},
settext(e){
let that=this;
let list = that.data.list;
let index = e.currentTarget.dataset.index;
list[index].text = e.detail.value;
that.setData({
list: list
})
},
deltemobj(){
let that=this;
let temobj={
name: '',
firm: '',
text: '',
}
that.setData({
temobj: temobj
})
},
addtemobj(){
let that=this;
let url ='counselor/SchemeSave';
let params={
userId: app.globalData.UserId,
name: that.data.temobj.name,
firm: that.data.temobj.firm,
text: that.data.temobj.text
}
app.post(url, params).then((res)=>{
if(res.data.code==200){
that.getlist();
let temobj = {
name: '',
firm: '',
text: '',
}
that.setData({
temobj: temobj
})
}
}).catch((err)=>{
console.log(err)
})
},
//保存按钮
del(e){
let that=this;
let index = e.currentTarget.dataset.index;
let list=that.data.list;
let id = e.currentTarget.id;
wx.showModal({
title: '提示',
content: '是否删除预设方案',
cancelColor:'#000000',
confirmColor:'#3cc51f',
showCancel:true,
cancelText:'取消',
confirmText:'确定',
success(res) {
if (res.confirm) {
let url ='counselor/SchemeDelete';
app.post(url, { SchemeId:id}).then((res)=>{
if(res.data.code==200){
if(res.data.data.type==1){
that.getlist();
wx.showToast({
title: '操作成功',
icon: 'none',
duration: 2000
})
}
}
})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
},
//保存所有
allsave(){
let that=this;
let list = this.data.list;
for (let i = 0; i < list.length;i++){
if (i == (list.length-1)){
wx.showToast({
title: '保存成功',
icon: 'success',
duration: 2000,
mask: true,
})
setTimeout(function(){
wx.navigateBack({
delta: 1
})
},1000)
}else{
let url = 'counselor/SchemeSave';
let params = {
userId: app.globalData.UserId,
schemeId: list[i].id,
name: list[i].name,
firm: list[i].firm,
text: list[i].text
}
app.post(url, params).then((res) => {
if (res.data.code == 200) {
}
}).catch((err) => {
console.log(err)
})
}
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that=this;
that.getlist();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
... ... @@ -26,7 +210,8 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that = this;
that.getlist();
},
/**
... ...
<!--pages/Program/Program.wxml-->
<view class='line_box'></view>
<view>
<view wx:for='{{list}}' wx:key>
<view class='content_box'>
<view class='item_list'>
<view>产品名称</view>
<view class='list_input'>
<input placeholder='请输入产品名称'></input>
<input placeholder='请输入产品名称' value='{{item.name}}' bindinput='setmame'
data-index='{{index}}'></input>
</view>
</view>
<view class='item_list'>
<view>保险公司</view>
<view class='list_input'>
<input placeholder='请输入保险公司'></input>
<input placeholder='请输入保险公司' value='{{item.firm}}' bindinput='setfirm'
data-index='{{index}}'></input>
</view>
</view>
<view class='item_list'>
<view>保障内容</view>
<view class='list_input'>
<input placeholder='请输入保障内容'></input>
<input placeholder='请输入保障内容' value='{{item.text}}' bindinput='settext' data-index='{{index}}'></input>
</view>
</view>
</view>
<view class='list_btn_box'>
<view class='list_btn'>删除方案</view>
<view class='list_btn' bindtap='del' id='{{item.id}}'>删除方案</view>
</view>
<view class='line_box'></view>
</view>
<view class='line_box'></view>
<view>
<view class='content_box'>
<view class='item_list'>
<view>产品名称</view>
<view class='list_input'>
<input placeholder='请输入产品名称'></input>
<input placeholder='请输入产品名称' value='{{temobj.name}}' bindinput='settemname'></input>
</view>
</view>
<view class='item_list'>
<view>保险公司</view>
<view class='list_input'>
<input placeholder='请输入保险公司'></input>
<input placeholder='请输入保险公司' value='{{temobj.firm}}' bindinput='settemfirm'></input>
</view>
</view>
<view class='item_list'>
<view>保障内容</view>
<view class='list_input'>
<textarea placeholder='请输入保障内容'></textarea>
<textarea placeholder='请输入保障内容' value='{{temobj.text}}' bindinput='settemtext'></textarea>
</view>
</view>
</view>
<view class='list_btn_box'>
<view class='list_btn'>删除方案</view>
<view class='list_btn add_btn'>添加方案</view>
<view class='list_btn' bindtap='deltemobj'>删除方案</view>
<view class='list_btn add_btn' bindtap='addtemobj'>添加方案</view>
</view>
</view>
<view class='bottom_box'>
<view class='save_btn'>保存</view>
<view class='save_btn' bindtap='allsave'>保存</view>
</view>
\ No newline at end of file
... ...
/* pages/Program/Program.wxss */
page{
padding:0 0 150rpx 0;
}
.line_box {
width: 100%;
height: 16rpx;
... ...
// pages/Suggest/Suggest.js
const app=getApp();
Page({
/**
* 页面的初始数据
*/
data: {
list:[]
},
setcontent(e){
let list =this.data.list;
list.content = e.detail.value;
this.setData({
list:list
})
},
setreprt(e){
let list = this.data.list;
list.report = e.detail.value;
this.setData({
list: list
})
},
//查看预设建议列表
getAdviseLook(){
let that=this;
let url ='counselor/AdviseLook';
app.post(url, {
userId: app.globalData.UserId
// userId: 166
}).then((res)=>{
if(res.data.code==200){
that.setData({
list:res.data.data
})
}
}).catch((err)=>{
console.log(err)
})
},
save_btn(){
let that=this;
let url ='counselor/AdviseSave';
let params={
userId: app.globalData.UserId,
report: that.data.list.report,
advise: that.data.list.content
}
app.post(url,params).then((res)=>{
console.log(res)
if(res.data.code==200){
wx.showToast({
title: '保存成功',
icon: 'none',
duration:2000,
})
setTimeout(function(){
wx.navigateBack({
delta: 1,
})
},1000)
}
}).catch((err)=>{
console.log(err)
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that=this;
that.getAdviseLook();
},
/**
... ... @@ -26,7 +87,8 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that = this;
that.getAdviseLook();
},
/**
... ...
... ... @@ -3,16 +3,17 @@
<view class='content_box'>
<view class='list_title'>体检报告预设</view>
<view class='list_input'>
<textarea placeholder='请输入预设的体检报告' placeholder-class='pl_style'></textarea>
<textarea placeholder='请输入预设的体检报告' placeholder-class='pl_style' value='{{list.content}}' bindinput='setcontent'></textarea>
</view>
</view>
<view class='line_box'></view>
<view class='content_box'>
<view class='list_title'>体检报告预设</view>
<view class='list_input'>
<textarea placeholder='请输入预设的体检报告' placeholder-class='pl_style'></textarea>
<textarea placeholder='请输入预设的体检报告' bindinput='setreprt' placeholder-class='pl_style'
value='{{list.report}}'></textarea>
</view>
</view>
<view class='bottom_box'>
<view class='save_btn'>保存</view>
<view class='save_btn' bindtap='save_btn'>保存</view>
</view>
\ No newline at end of file
... ...
// pages/index/TB/TB.js
const app=getApp();
var WxParse = require('../../../wxParse/wxParse.js');
Page({
/**
* 页面的初始数据
*/
data: {
popup_stete: false
popup_stete: false,
tlist:'',
Page:0
},
//说明
instructionsInfo() {
... ... @@ -14,11 +18,51 @@ Page({
})
},
//取消弹窗
setpopupflase() {
setpopupflase(){
console.log(1);
this.setData({
popup_stete: false
})
},
funvoid(){
},
//个人中心T币接口
gettlist(){
let that=this;
let url ='counselor/tlist';
let params={
UserId: app.globalData.UserId,
Page: that.data.Page
}
app.post(url,params).then((res)=>{
console.log(res);
if(res.data.code==200){
that.setData({
tlist:res.data.data
})
}
}).catch((err)=>{
console.log(err)
})
},
//TB信息内容接口
aboutTB(){
let that=this;
let url ='pubilc/about';
app.post(url, { AboutType:10}).then((res)=>{
if (res.data.code == 200) {
console.log(res)
console.log(res.data.data.post_content)
WxParse.wxParse('content', 'html', res.data.data.post_content, that, 5);
}
}).catch((err)=>{
console.log(err)
})
},
/**
* 生命周期函数--监听页面加载
*/
... ... @@ -37,6 +81,9 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function() {
let that=this;
that.gettlist();
that.aboutTB();
},
... ...
... ... @@ -7,7 +7,7 @@
<text>说明</text>
</view>
</view>
<view class='money'>1000</view>
<view class='money'>{{tlist.balance}}</view>
</view>
<view class="content_item">
... ... @@ -17,13 +17,13 @@
</view>
<view class='scroll_box'>
<scroll-view scroll-y>
<view class="item_list" wx:for='{{[1,1,1,1,1,1,1,1,1]}}'>
<view class="item_list" wx:for='{{tlist.payllist}}'>
<view class="list_content">
<view>客户阅读体检报告</view>
<view>{{item.description}}</view>
</view>
<view class='list_info'>
<view class=" ">+10</view>
<view class=" ">2018-10-02</view>
<view class=" ">{{item.text}}</view>
<view class=" ">{{item.time}}</view>
</view>
</view>
</scroll-view>
... ... @@ -33,7 +33,7 @@
<view class='mask_box' wx:if="{{popup_stete}}" bindtap='setpopupflase'>
<view class='tri'></view>
<view class='popup_box' catchtap='funvoid'>
<!-- <import src="../../wxParse/wxParse.wxml" />
<template is="wxParse" data="{{wxParseData:content.nodes}}" /> -->
<import src="../../../wxParse/wxParse.wxml" />
<template is="wxParse" data="{{wxParseData:content.nodes}}" />
</view>
</view>
\ No newline at end of file
... ...
// pages/VipRecharge/VipRecharge.js
const app=getApp();
Page({
/**
* 页面的初始数据
*/
data: {
viplist:[],
toplist:[],
mainlist:[]
},
//选择支付方式
buyWay() {
buyWay(e) {
console.log(e)
wx.navigateTo({
url: '../payWay/payWay',
url: '../payWay/payWay?id=' + e.currentTarget.id + '&moneyt=' + e.currentTarget.dataset.moneyt,
})
},
getvip(){
let that=this;
let url ='counselor/vip';
app.post(url,{}).then((res)=>{
if(res.data.code==200){
let viplist = res.data.data.viplist;
let toplist=[];
let mainlist=[];
for (let obj of viplist){
if (obj.status==1){
mainlist.push(obj)
} else if (obj.status == 2){
toplist.push(obj)
}
}
that.setData({
viplist: viplist,
toplist: toplist,
mainlist: mainlist
})
}
}).catch((err)=>{
console.log(err)
})
},
/**
* 生命周期函数--监听页面加载
... ... @@ -32,6 +63,8 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function() {
let that=this;
that.getvip();
},
... ...
... ... @@ -4,42 +4,19 @@
<image src='/images/ele@2x.png'></image>
</view>
<text class='banner_info'>新手任务奖励</text>
<view class='banner_title'>七天VIP会员</view>
<view class='banner_content'>完成新手任务,赠送7天VIP会员</view>
<view class='list_btn' bindtap='buyWay'>立即购买</view>
<view class='banner_title'>{{toplist[0].title}}</view>
<view class='banner_content'>完成新手任务,赠送{{toplist[0].title}}</view>
<navigator class='list_btn' hover-class="navigator-hover" url='/pages/index/payWay/payWay?id={{toplist[0].id}}&moneyt={{toplist[0].moneyt}}&title={{toplist[0].title}}'>立即购买</navigator>
</view>
<view class='item_list_box'>
<view class='item_list'>
<view class='list_title'>七天VIP会员</view>
<view class="item_list {{(index+1)%2==0?'year_list':''}}" wx:for='{{mainlist}}' wx:key>
<view class='list_title'>{{item.title}}</view>
<view class='list_content'>
<text>¥365</text>
<text>¥3650</text>
<text>¥{{item.money}}</text>
<text>¥{{item.moneyt}}</text>
</view>
<view class='list_btn month_card' bindtap='buyWay'>立即购买</view>
</view>
<view class='item_list year_list'>
<view class='list_title'>七天VIP会员</view>
<view class='list_content'>
<text>¥365</text>
<text>¥3650</text>
</view>
<view class='list_btn year_card' bindtap='buyWay'>立即购买</view>
</view>
<view class='item_list'>
<view class='list_title'>七天VIP会员</view>
<view class='list_content'>
<text>¥365</text>
<text>¥3650</text>
</view>
<view class='list_btn month_card' bindtap='buyWay'>立即购买</view>
</view>
<view class='item_list year_list'>
<view class='list_title'>七天VIP会员</view>
<view class='list_content'>
<text>¥365</text>
<text>¥3650</text>
</view>
<view class='list_btn year_card' bindtap='buyWay'>立即购买</view>
<navigator class='list_btn month_card' hover-class="navigator-hover"
url='/pages/index/payWay/payWay?id={{item.id}}&moneyt={{item.moneyt}}&title={{item.title}}' >立即购买</navigator>
</view>
</view>
</view>
\ No newline at end of file
... ...
// pages/addListDetail/addListDetail.js
const app = getApp()
Page({
/**
... ... @@ -11,58 +12,631 @@ Page({
period_index: -1,
compact_time: '',
impletion_time: '',
popup_state: false
popup_state: false,
projectlist: [],
label_state: false,
insure: ['投保人', '投保人2'],
insureindex: -1,
beneficiary_list: [{
name: ['受益人1', '受益人2'],
unit: ''
}],
beneficiaryindex: -1,
beneficiary_name: '',
imgs: [],
main_risk: [],
unit: '',
unit2: '',
unit3: '',
unit4: '',
applicant_name: '',
recognizee_name: '',
rang_beneficiary: [],
risk_list:[{
name:'',
projectlist:[{}],
project_time:''
}],
},
//投保人
insureSelect(e) {
var insure = this.data.insure
this.setData({
insureindex: e.detail.value,
applicant_name: insure[e.detail.value]
})
},
//选择性别
//选择被保险人
recognizeeSelect(e) {
var recognizee = this.data.recognizee
this.setData({
recognizeeindex: e.detail.value,
recognizee_name: recognizee[e.detail.value]
})
},
//合同生效日
compactTime(e) {
this.setData({
compact_time: e.detail.value,
})
},
//缴费期满日
impletionTime(e) {
this.setData({
impletion_time: e.detail.value,
})
},
//主险保障期
periodTime(e) {
this.setData({
period_index: e.detail.value,
})
},
//保障项目弹窗
ensureProject() {
wx.setNavigationBarTitle({
title: '选择保障项目',
})
this.setData({
popup_state: true
})
},
// 调取保障项目接口
ensureProjectList() {
var main_risk = this.data.main_risk
let url = 'counselor/sageguard'
let params = {}
app.post(url, params).then((res) => {
if (res.data.code == 200) {
var projectlist = res.data.data.def;
for (var i = 0; i < projectlist.length; i++) {
projectlist[i].choose_status = false
for (var j = 0; j < projectlist[i].title.length; j++) {
projectlist[i].title[j].label_state = false
}
projectlist[i].title[0].current = 0
projectlist[i].title[0].label_state = true
}
this.setData({
projectlist: res.data.data.def
})
console.log(this.data.projectlist)
}
})
},
//保障项目单位
getUnit(e) {
var main_risk = this.data.main_risk
var index = e.currentTarget.dataset.index;
var sindex = e.currentTarget.dataset.sindex;
var projectlist = this.data.projectlist;
var title = projectlist[index].title
for (var i = 0; i < title.length; i++) {
title[i].current = ''
}
projectlist[index].title[sindex].current = sindex
if (projectlist[index].title[sindex].current == sindex) {
projectlist[index].title[sindex].label_state = true
}
this.setData({
projectlist: projectlist,
})
},
//保障项目金额
popupNum(e) {
var main_risk = this.data.main_risk
var index = e.currentTarget.dataset.index;
var projectlist = this.data.projectlist;
if (projectlist[index].choose_status) {
projectlist[index].num = e.detail.value
main_risk[index].num = projectlist[index].num
}
console.log(main_risk)
this.setData({
projectlist: projectlist
})
},
//选择保障项目
popupState() {
popupState(e) {
var index = e.currentTarget.dataset.index;
var projectlist = this.data.projectlist;
var checkstate = projectlist[index].choose_status;
var selectitem = [];
var length = this.data.projectlist.length
var main_risk = this.data.main_risk
var popup_state = this.data.popup_state
if (checkstate == false) {
projectlist[index].choose_status = true
} else {
projectlist[index].choose_status = false
}
this.setData({
choose_state: !(this.data.choose_state)
projectlist: projectlist
})
},
//确认选择的推荐方案
confirmCase() {
var that = this
var main_array = []
let dindex = wx.getStorageSync('dindex')
var projectlist = 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].label_state) {
main_array.push(projectlist[i])
}
}
console.log(main_array)
}
}
if (main_array != '') {
wx.showToast({
title: '添加成功',
icon: 'none'
})
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.setData({
popup_state: false,
})
wx.setNavigationBarTitle({
title: '添加保单',
})
}, 1000)
},
//选择受益人姓名
beneficiarySelect(e) {
// console.log(e)
var index = e.currentTarget.dataset.mindex
var beneficiary_list = this.data.beneficiary_list;
for (var i = 0; i < beneficiary_list.length; i++) {
for (var j = 0; j < beneficiary_list[i].name.length; j++) {
var beneficiary_name = beneficiary_list[i].name[e.detail.value]
beneficiary_list[index].beneficiary_name = beneficiary_name
// console.log(beneficiary_list)
}
}
// let tempRangArry = this.data.rang_beneficiary;
// tempRangArry[index] = beneficiary_list[index].name[e.detail.value]
// console.log(tempRangArry)
this.setData({
beneficiaryindex: e.detail.value,
beneficiary_list: beneficiary_list
})
},
//添加收益比例
addUnit(e) {
// console.log(e)
var beneficiary_list = this.data.beneficiary_list;
beneficiary_list[beneficiary_list.length - 1].unit = e.detail.value;
this.setData({
popup_state: false
beneficiary_list: beneficiary_list,
})
},
//添加受益人
addPersons(e) {
var list = this.data.beneficiary_list;
var len = list.length
if (list[len - 1].beneficiary_name == undefined) {
wx.showToast({
title: '请选择受益人',
icon: 'none'
})
} else if (list[len - 1].unit == '') {
console.log('unit')
wx.showToast({
title: '请输入收益比',
icon: 'none'
})
} else {
list[len] = {
name: ['受益人1', '受益人2'],
unit: ''
}
}
this.setData({
beneficiary_list: list
})
},
//添加附加险
addRisk(){
var risk_list=this.data.risk_list
var len=risk_list.length
risk_list[len] = {
name: '',
projectlist: [{}],
project_time: ''
}
this.setData({
risk_list: risk_list
})
},
//上传图片
uploadImage() {
let that = this;
wx.chooseImage({
count: 6,
sizeType: ['original', 'compressed'],
success: function(res) {
let successUp = 0; //成功个数
let failUp = 0; //失败个数
let i = 0; //第几个
let tempFilePaths = res.tempFilePaths //总文件
let length = res.tempFilePaths.length //总共个数
wx.showNavigationBarLoading()
wx.showLoading({
title: '上传中',
})
that.uploadAllfile(tempFilePaths, successUp, failUp, i, length)
},
fail: function(res) {}
})
},
//上传图片接口调取
uploadAllfile(filePaths, successUp, failUp, i, length) {
let that = this
let strtime = +new Date()
wx.uploadFile({
url: 'https://insurance.w.broteam.cn/pubilc/upload', //仅为示例,非真实的接口地址
filePath: filePaths[i],
name: 'picurl',
formData: {
'strtime': strtime,
'token': app.strTime(strtime)
},
success: function(res) {
wx.hideNavigationBarLoading()
wx.hideLoading()
if (res.statusCode == '200') {
let imgTemp = that.data.imgs;
let curImg = JSON.parse(res.data).data.picurl;
if (imgTemp.length < 6) {
imgTemp.push("http://" + curImg)
that.setData({
imgs: imgTemp
})
wx.showToast({
title: '上传成功',
icon: 'none',
duration: 2000,
})
} else {
wx.showToast({
title: '图片上限6张',
icon: 'none',
duration: 2000,
})
}
} else {
wx.showModal({
title: '提示',
content: res.msg,
showCancel: false
})
}
},
fail: function(res) {
wx.hideNavigationBarLoading()
wx.hideLoading()
},
complete: () => {
i++;
if (i == length) {
// console.log('总共' + successUp + '张上传成功,' + failUp + '张上传失败!');
} else { //递归调用uploadDIY函数
this.uploadAllfile(filePaths, successUp, failUp, i, length);
}
},
})
},
//预览图片
viewImg(e) {
var imgs = this.data.imgs
var current = e.currentTarget.dataset.index
wx.previewImage({
//当前显示图片
current: imgs[current],
//所有图片
urls: imgs
})
},
//删除图片
deleteImg(e) {
var imgs = this.data.imgs;
var index = e.currentTarget.dataset.index;
imgs.splice(index, 1);
this.setData({
imgs: imgs
});
},
//选择各项单位
selectUnit(e) {
var unit = e.currentTarget.dataset.unit
this.setData({
unit: unit
})
},
selectUnit2(e) {
var unit = e.currentTarget.dataset.unit
this.setData({
unit2: unit
})
},
selectUnit3(e) {
var unit = e.currentTarget.dataset.unit
this.setData({
unit3: unit
})
},
selectUnit4(e) {
var unit = e.currentTarget.dataset.unit
this.setData({
unit4: unit
})
},
// 保单验证&&上传保单
listVerify(e) {
// this.insureItem()
// var addlist = this.data.addlist
// if (addlist[0].name != '') {
// var name = addlist[addlist.length - 1].name
// var num = addlist[addlist.length - 1].num
// var title = addlist[addlist.length - 1].title
// if (name == '' || num == '' || title == '') {
// addlist.pop()
// this.setData({
// addlist: addlist
// })
// }
// }
var warn = ""; //弹框时提示的内容
var flag = true; //判断信息输入是否完整判断弹窗
var in_num = e.detail.value.policy_num
var firm = e.detail.value.company;
var applicant = this.data.applicant_name
var recognizee = this.data.recognizee_name
var favoree = this.data.favoreename
var compact_time = this.data.compact_time
var impletion_time = this.data.impletion_time
var warranty = e.detail.value.Guarantee_period
var bank = e.detail.value.Renew_bank
var bank_num = e.detail.value.renew_num
var year_money = e.detail.value.year_money
var main_risks = e.detail.value.main_risks
var coverage = e.detail.value.base_money
var picurl = JSON.stringify(this.data.imgs)
var guarantee = JSON.stringify(this.data.selectitem) //保障项目
var more = JSON.stringify(this.data.addlist)
// if (this.data.inforid != undefined) {
if (in_num == '') {
warn = '请输入保单号!'
} else if (firm == '') {
warn = '请输入所属公司!'
} else if (applicant == '') {
warn = '请输入投保人!'
} else if (recognizee == '') {
warn = '请输入被保险人!'
} else if (favoree == '') {
warn = '请输入受益人!'
} else if (compact_time == '') {
warn = '请输入合同生效日!'
} else if (impletion_time == '') {
warn = '请输入缴费期满日!'
} else if (warranty == '') {
warn = '请输入保障期!'
} else if (bank == '') {
warn = '请输入续费银行!'
} else if (bank_num == '') {
warn = '请输入续费账号!'
} else if (!(/^[0-9]+.?[0-9]*/.test(bank_num))) {
warn = '请输入正确续费账号!'
} else if (year_money == '') {
warn = '请输入年交保费!'
} else if (main_risks == '') {
warn = '请输入主险名称!'
} else if (coverage == '') {
warn = '请输入主险基本保额!'
} else if (more.length == 2) {
warn = '请上传上传附加险!'
} else if (guarantee.length == 0) {
warn = '请选择保障项目!'
} else if (picurl.length == 2) {
warn = '请选择图片!'
} else {
flag = false
// 添加、修改保单接口调取
let url = 'counselor/inforuodate'
let params = {
InfoId: this.data.inforid,
def_id: this.data.def_id,
in_num: in_num,
firm: firm,
applicant: applicant,
recognizee: recognizee,
favoree: favoree,
compact_time: compact_time,
impletion_time: impletion_time,
warranty: warranty,
bank: bank,
bank_num: bank_num,
year_money: year_money,
main_risks: main_risks,
coverage: coverage,
more: more,
guarantee: guarantee,
picurl: picurl
}
app.post(url, params).then((res) => {
if (res.data.code == 200) {
wx.navigateBack({
delta: 1,
})
}
})
}
// }
// else {
// if (in_num == '') {
// warn = '请输入保单号!'
// } else if (firm == '') {
// warn = '请输入所属公司!'
// } else if (applicant == '') {
// warn = '请输入投保人!'
// } else if (recognizee == '') {
// warn = '请输入被保险人!'
// } else if (favoree == '') {
// warn = '请输入受益人!'
// } else if (compact_time == '') {
// warn = '请输入合同生效日!'
// } else if (impletion_time == '') {
// warn = '请输入缴费期满日!'
// } else if (warranty == '') {
// warn = '请输入保障期!'
// } else if (bank == '') {
// warn = '请输入续费银行!'
// } else if (bank_num == '') {
// warn = '请输入续费账号!'
// } else if (!(/^[0-9]+.?[0-9]*/.test(bank_num))) {
// warn = '请输入正确续费账号!'
// } else if (year_money == '') {
// warn = '请输入年交保费!'
// } else if (main_risks == '') {
// warn = '请输入主险名称!'
// } else if (coverage == '') {
// warn = '请输入主险基本保额!'
// } else if (more.length == 2) {
// warn = '请上传上传附加险!'
// } else if (guarantee.length == 2) {
// warn = '请选择保障项目!'
// } else if (picurl.length == 2) {
// warn = '请选择图片!'
// } else {
// flag = false
// // 添加、修改保单接口调取
// let url = 'counselor/inforuodate'
// let params = {
// def_id: this.data.def_id,
// in_num: in_num,
// firm: firm,
// applicant: applicant,
// recognizee: recognizee,
// favoree: favoree,
// compact_time: compact_time,
// impletion_time: impletion_time,
// warranty: warranty,
// bank: bank,
// bank_num: bank_num,
// year_money: year_money,
// main_risks: main_risks,
// coverage: coverage,
// more: more,
// guarantee: guarantee,
// picurl: picurl
// }
// app.post(url, params).then((res) => {
// var projectlist = this.data.projectlist
// for (var i = 0; i < projectlist.length; i++) {
// projectlist[i].status = false
// }
// if (res.data.code == 200) {
// var continue1 = e.detail.target.dataset.type
// var complete = e.detail.target.dataset.type
// if (continue1 == 'continue1') {
// wx.showToast({
// title: '添加成功',
// icon: 'none',
// duration: 2000,
// })
// this.setData({
// nullNum: '',
// addlist: [{
// name: '',
// num: '',
// title: ''
// }],
// projectlist: projectlist,
// imgs: [],
// compact_time: '',
// impletion_time: ''
// })
// } else if (complete == complete) {
// wx.showToast({
// title: '添加成功',
// icon: 'none',
// duration: 2000,
// })
// wx.navigateBack({
// delta: 1,
// })
// }
// }
// })
// }
// }
if (flag == true) {
wx.showToast({
title: warn,
icon: 'none'
})
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
this.ensureProjectList()
},
/**
... ...
... ... @@ -3,21 +3,21 @@
<view class='popup_box'>
<view class='main_container'>
<view class='popup_item'>
<view class='popup_list'>
<view class='popup_list' wx:for='{{projectlist}}' wx:key=''>
<view bindtap='popupState' data-index='{{index}}'>
<view class="iconfont icon-fangkuang {{choose_state?'icon-xuanzhongkuang':''}}"></view>
<view class="iconfont icon-fangkuang {{item.choose_status?'icon-xuanzhongkuang':''}}"></view>
</view>
<view class='popup_info_box'>
<view class='popup_content'>
<view class='popup_title'>{{item.name}}111</view>
<view class='popup_title'>{{item.name}}</view>
<view class='popup_input'>
<input type='number' placeholder='请输入' value='{{item.num}}' bindinput='itemNum' data-index='{{index}}' data-id='{{item.id}}'></input>
<text>{{item.title}}</text>
<input type='number' placeholder='请输入' value='{{item.num}}' bindinput='popupNum' data-index='{{index}}' data-id='{{item.id}}'></input>
<!-- <text>{{item.title}}</text> -->
</view>
</view>
<view class='popup_label_box'>
<view class='popup_label_item popup_label_active'>万</view>
<view class='popup_label_item'>元</view>
<view class="popup_label_item {{sitem.current === sub_index ? 'popup_label_active' :''}}" wx:for='{{item.title}}' wx:for-index='sub_index' data-sindex='{{sub_index}}' wx:for-item='sitem' data-index='{{index}}' wx:key='' bindtap='getUnit'>
{{sitem.name}}</view>
</view>
</view>
</view>
... ... @@ -26,307 +26,320 @@
</view>
</view>
</view>
<!-- 表单部分 -->
<!-- <block wx:else> -->
<form bindsubmit='listVerify' bindreset="formReset">
<view class='content_item'>
<view class='item_list'>
<view class='list_title'>保单号</view>
<block wx:if='{{inforid}}'>
<view class='list_input'>
<input type='text' placeholder='请填写' name='list_num' value='{{listdetail.in_num}}' bindinput='itemNum'></input>
</view>
</block>
<block wx:else>
<!-- <block wx:if='{{inforid}}'>
<view class='list_input'>
<input type='text' placeholder='请填写' name='list_num' value='{{nullNum}}' bindinput='itemNum'></input>
<input type='text' placeholder='请输入' name='list_num' value='{{listdetail.in_num}}' bindinput='itemNum'></input>
</view>
</block>
<block wx:else> -->
<view class='list_input'>
<input type='text' placeholder='请输入' name='policy_num' value='{{nullNum}}' bindinput='policyNum'></input>
</view>
<!-- </block> -->
</view>
<view class='item_list'>
<view class='list_title'>所属公司</view>
<block wx:if='{{inforid}}'>
<!-- <block wx:if='{{inforid}}'>
<view class='list_input'>
<input type='text' placeholder='请填写' name='company' value='{{listdetail.firm}}'></input>
</view>
</block>
<block wx:else>
<view class='list_input'>
<input type='text' placeholder='请填写' name='company' value='{{nullNum}}'></input>
<input type='text' placeholder='请输入' name='company' value='{{listdetail.firm}}'></input>
</view>
</block>
<block wx:else> -->
<view class='list_input'>
<input type='text' placeholder='请输入' name='company' value='{{nullNum}}'></input>
</view>
<!-- </block> -->
</view>
<view class='item_list'>
<view class='list_title'>投保人</view>
<block wx:if='{{inforid}}'>
<view class='list_input'>
<input type='text' placeholder='请填写' name='policy_holder' value='{{listdetail.applicant}}'></input>
</view>
</block>
<block wx:else>
<!-- <block wx:if='{{inforid}}'>
<view class='list_input'>
<input type='text' placeholder='请填写' name='policy_holder' value='{{nullNum}}'></input>
<picker class='picker' range='{{insure}}' value='{{insureindex}}' bindchange='insureSelect'>
<input type='text' placeholder='请选择' name='policy_holder' value='{{insure[insureindex]}}'></input>
</picker>
</view>
</block>
<block wx:else> -->
<view class='list_input'>
<picker class='picker' range='{{insure}}' value='{{insureindex}}' bindchange='insureSelect'>
<input type='text' placeholder='请选择' name='policy_holder' value='{{insure[insureindex]}}' disabled='true'></input>
</picker>
<!-- <input type='text' placeholder='请填写' name='policy_holder' value='{{nullNum}}'></input> -->
</view>
<!-- </block> -->
</view>
<view class='item_list'>
<view class='list_title'>被保险人</view>
<block wx:if='{{inforid}}'>
<!-- <block wx:if='{{inforid}}'>
<view class='list_input'>
<picker class='picker' range='{{recognizee}}' value='{{recognizeeindex}}' bindchange='recognizeeSelect'>
<text>{{recognizee[recognizeeindex]}}</text>
</picker>
</view>
</block>
<block wx:else>
<view class='list_input'>
<picker class='picker' range='{{recognizee}}' value='{{recognizeeindex}}' bindchange='recognizeeSelect'>
<input placeholder='请选择' value='{{recognizee[recognizeeindex]}}' disabled='true'></input>
</picker>
</view>
</block>
<block wx:else> -->
<view class='list_input'>
<picker class='picker' range='{{recognizee}}' value='{{recognizeeindex}}' bindchange='recognizeeSelect'>
<input placeholder='请选择' value='{{recognizee[recognizeeindex]}}' disabled='true'></input>
</picker>
</view>
<!-- </block> -->
</view>
<view>
<view class='item_list'>
<view class='item_list' wx:for='{{beneficiary_list}}' wx:key='' wx:for-index='its'>
<view class='list_title'>受益人</view>
<view class='list_input_box'>
<view class='list_input'>
<input type='text' placeholder='请填写' name='beneficiary' value='{{listdetail.favoree}}'></input>
<picker class='picker' range='{{item.name}}' range-key='' value='{{beneficiaryindex}}' wx:for-index='index' bindchange='beneficiarySelect' data-mindex='{{its}}'>
<input type='text' placeholder='请选择' name='beneficiary' value='{{item.beneficiary_name}}' disabled='true'></input>
</picker>
</view>
<view class='list_input'>
<input class='income_input' type='text' placeholder='请填写' name='beneficiary' value='{{listdetail.favoree}}'></input>
<input class='income_input' type='text' placeholder='受益比例%' name='beneficiary' value='{{item.unit}}' bindinput='addUnit'></input>
</view>
</view>
</view>
<view class='iconfont icon-wuuiconxiangjifangda add_person'>
<view class='iconfont icon-wuuiconxiangjifangda add_person' data-mindex='{{its}}' data-sindex='{{index}}' bindtap='addPersons'>
<text>添加受益人</text>
</view>
</view>
</view>
<view class='content_item'>
<view class='item_list'>
<view class='list_title'>合同生效日</view>
<block wx:if='{{inforid}}'>
<view class='list_input'>
<picker class='picker' mode="date" bindchange='compactTime' value='{{compact_time}}'>
<view>{{compact_time}}</view>
<input placeholder='请选择' value='{{compact_time}}' disabled='true'></input>
</picker>
<text class='iconfont icon-riqi'></text>
</view>
</block>
<block wx:else>
<view class='list_input'>
<picker class='picker' mode="date" bindchange='compactTime' value='{{compact_time}}'>
<input placeholder='请选择' value='{{compact_time}}' disabled='true'></input>
</picker>
<text class='iconfont icon-riqi'></text>
</view>
</block>
</view>
<view class='item_list'>
<view class='list_title'>缴费期满日</view>
<block wx:if='{{inforid}}'>
<view class='list_input'>
<picker class='picker' mode="date" bindchange='impletionTime' value='{{impletion_time}}'>
<view>{{impletion_time}}</view>
</picker>
<text class='iconfont icon-riqi'></text>
</view>
</block>
<block wx:else>
<view class='list_title'>
<text class='symbol_icon'>*</text>
<text>主险名称</text>
</view>
<!-- <block wx:if='{{inforid}}'>
<view class='list_input'>
<picker class='picker' mode="date" bindchange='impletionTime' value='{{impletion_time}}'>
<input placeholder='请选择' value='{{impletion_time}}' disabled='true'></input>
</picker>
<text class='iconfont icon-riqi'></text>
<input type='text' placeholder='请填写' name='main_risks' value='{{listdetail.main_risks}}'></input>
</view>
</block>
<block wx:else> -->
<view class='list_input'>
<input type='text' placeholder='请填写' name='main_risks' value='{{nullNum}}'></input>
</view>
<!-- </block> -->
</view>
<view class='item_list'>
<view class='list_title'>主险保障期</view>
<block wx:if='{{inforid}}'>
<view class='list_input'>
<input type='number' placeholder='请填写' name='Guarantee_period' value='{{listdetail.warranty}}'></input>
<text class='iconfont icon-riqi'></text>
<view class='protec_item_box'>
<view>
<view class='protec_item' wx:for='{{main_array}}' wx:key='' if='{{item.choose_status}}'>
<view>{{item.name}}</view>
<view class='protec_num'>{{item.num}}{{item.title}}
</view>
</view>
</block>
<block wx:else>
<view class='list_input'>
<picker class='picker' range='{{period_time}}' value='{{period_index}}' bindchange='periodTime'>
<input placeholder='请选择' value='{{period_time[period_index]}}' disabled='true'></input>
</picker>
<text class='iconfont icon-riqi'></text>
</view>
<view class='protec_bottom_box'>
<view class='add_risk_btn protec_btn' bindtap='ensureProject'>
<text class='iconfont icon-shezhi'></text>
<text>管理保障项目</text>
</view>
</block>
</view>
</view>
</view>
<view class='content_item'>
<view class='item_list'>
<view class='list_title'>续费银行</view>
<block wx:if='{{inforid}}'>
<view class='list_title'>
<text class='symbol_icon'>*</text>
<text>保费</text>
</view>
<view class='list_input_box'>
<view class='list_input'>
<input type='text' placeholder='请填写' name='Renew_bank' value='{{listdetail.bank}}'></input>
<input type='text' placeholder='请填写' name='beneficiary' value='{{listdetail.favoree}}'></input>
</view>
</block>
<block wx:else>
<view class='list_input'>
<input type='text' placeholder='请填写' name='Renew_bank' value='{{nullNum}}'></input>
<input class='income_input' type='text' placeholder='请填写' name='beneficiary' value='元/年' disabled='true'></input>
</view>
</block>
</view>
</view>
<view class='item_list'>
<view class='list_title'>续费账号</view>
<block wx:if='{{inforid}}'>
<view class='list_input'>
<input type='number' placeholder='输入后四位' name='renew_num' value='{{listdetail.bank_num}}'></input>
</view>
</block>
<block wx:else>
<view class='list_title'>合同生效日</view>
<!-- <block wx:if='{{inforid}}'>
<view class='list_input'>
<input type='text' placeholder='请填写' name='renew_num' value='{{nullNum}}'></input>
<picker class='picker' mode="date" bindchange='compactTime' value='{{compact_time}}'>
<view>{{compact_time}}</view>
<input placeholder='请选择' value='{{compact_time}}' disabled='true'></input>
</picker>
<text class='iconfont icon-riqi'></text>
</view>
</block>
</view>
<view class='item_list'>
<view class='list_title'>缴费方式</view>
<view class='list_label_box'>
<view class='list_label_item list_label_active'>年交</view>
<view class='list_label_item'>趸交(一次付清)</view>
<view class='list_label_item'>年交</view>
<view class='list_label_item'>趸交(一次付清)</view>
<view class='list_label_item'>年交</view>
<block wx:else> -->
<view class='list_input'>
<picker class='picker' mode="date" bindchange='compactTime' value='{{compact_time}}'>
<input placeholder='请选择' value='{{compact_time}}' disabled='true'></input>
</picker>
<text class='iconfont icon-riqi'></text>
</view>
<!-- </block> -->
</view>
<view class='item_list'>
<view class='list_title'>缴费时长</view>
<view class='list_title'>保障期</view>
<view class='list_input_box'>
<view class='list_input'>
<input type='text' placeholder='请输入' name='beneficiary' value='{{listdetail.favoree}}'></input>
</view>
<view class='list_label_box'>
<view class='list_label_item list_label_active'>年交</view>
<view class='list_label_item'>趸交(一次付清)</view>
<view class='list_label_item'>年交</view>
<view class='list_label_item'>趸交(一次付清)</view>
<view class='list_label_item'>年交</view>
<view class="list_label_item {{unit==1?'list_label_active':''}}" bindtap='selectUnit' data-unit='1'>年</view>
<view class="list_label_item {{unit==2?'list_label_active':''}}" bindtap='selectUnit' data-unit='2'>岁 </view>
<view class="list_label_item {{unit==3?'list_label_active':''}}" bindtap='selectUnit' data-unit='3'>终身</view>
</view>
</view>
</view>
<view class='item_list'>
<view class='list_title'>保障期</view>
<view class='list_title'>缴费时长</view>
<view class='list_input_box'>
<view class='list_input'>
<input type='text' placeholder='请输入' name='beneficiary' value='{{listdetail.favoree}}'></input>
</view>
<view class='list_label_box'>
<view class='list_label_item list_label_active'>年交</view>
<view class='list_label_item'>趸交(一次付清)</view>
<view class='list_label_item'>年交</view>
<view class='list_label_item'>趸交(一次付清)</view>
<view class='list_label_item'>年交</view>
<view class="list_label_item {{unit2==4?'list_label_active':''}}" bindtap='selectUnit2' data-unit='4'>年</view>
<view class="list_label_item {{unit2==5?'list_label_active':''}}" bindtap='selectUnit2' data-unit='5'>岁 </view>
<view class="list_label_item {{unit2==6?'list_label_active':''}}" bindtap='selectUnit2' data-unit='6'>终身</view>
</view>
</view>
</view>
<view class='item_list'>
<view class='list_title'>
<text class='symbol_icon'>*</text>
<text>年交保费</text>
</view>
<view class='list_input_box'>
<view class='list_input'>
<input type='text' placeholder='请填写' name='beneficiary' value='{{listdetail.favoree}}'></input>
</view>
<view class='list_input'>
<input class='income_input' type='text' placeholder='请填写' name='beneficiary' value='元/年' disabled='true'></input>
</view>
<view class='list_title'>缴费方式</view>
<view class='list_label_box'>
<view class="list_label_item {{unit3==7?'list_label_active':''}}" bindtap='selectUnit3' data-unit='7'>年交</view>
<view class="list_label_item {{unit3==8?'list_label_active':''}}" bindtap='selectUnit3' data-unit='8'>趸交(一次付清)</view>
<view class="list_label_item {{unit3==9?'list_label_active':''}}" bindtap='selectUnit3' data-unit='9'>年交</view>
</view>
</view>
<view class='item_list'>
<view class='list_title'>
<text class='symbol_icon'>*</text>
<text>主险名称</text>
</view>
<block wx:if='{{inforid}}'>
<view class='list_title'>续费银行</view>
<!-- <block wx:if='{{inforid}}'>
<view class='list_input'>
<input type='text' placeholder='请填写' name='main_risks' value='{{listdetail.main_risks}}'></input>
<input type='text' placeholder='请填写' name='Renew_bank' value='{{listdetail.bank}}'></input>
</view>
</block>
<block wx:else>
<block wx:else> -->
<view class='list_input'>
<input type='text' placeholder='请填写' name='Renew_bank' value='{{nullNum}}'></input>
</view>
<!-- </block> -->
</view>
<view class='item_list'>
<view class='list_title'>续费账号</view>
<!-- <block wx:if='{{inforid}}'>
<view class='list_input'>
<input type='text' placeholder='请填写' name='main_risks' value='{{nullNum}}'></input>
<input type='number' placeholder='输入后四位' name='renew_num' value='{{listdetail.bank_num}}'></input>
</view>
</block>
<block wx:else> -->
<view class='list_input'>
<input type='text' placeholder='请填写' name='renew_num' value='{{nullNum}}'></input>
</view>
<!-- </block> -->
</view>
<view class='item_list'>
<view class='list_title'>
<text class='symbol_icon'>*</text>
<text>主险基本保额</text>
</view>
<block wx:if='{{inforid}}'>
<view class='list_title'>缴费期满日</view>
<!-- <block wx:if='{{inforid}}'>
<view class='list_input'>
<input type='number' placeholder='请填写' name='base_money' value='{{listdetail.coverage}}'></input>
<picker class='picker' mode="date" bindchange='impletionTime' value='{{impletion_time}}'>
<view>{{impletion_time}}</view>
</picker>
<text class='iconfont icon-riqi'></text>
</view>
</block>
<block wx:else>
<block wx:else> -->
<view class='list_input'>
<picker class='picker' mode="date" bindchange='impletionTime' value='{{impletion_time}}'>
<input placeholder='请选择' value='{{impletion_time}}' disabled='true'></input>
</picker>
<text class='iconfont icon-riqi'></text>
</view>
<!-- </block> -->
</view>
<view class='item_list'>
<view class='list_title'>主险保障期</view>
<!-- <block wx:if='{{inforid}}'>
<view class='list_input'>
<input type='text' placeholder='请填写' name='base_money' value='{{nullNum}}'></input>
<input type='number' placeholder='请填写' name='Guarantee_period' value='{{listdetail.warranty}}'></input>
<!-- <text class='iconfont icon-riqi'></text>
</view>
</block>
<block wx:else> -->
<view class='list_input'>
<picker class='picker' range='{{period_time}}' value='{{period_index}}' bindchange='periodTime'>
<input placeholder='请选择' value='{{period_time[period_index]}}' disabled='true'></input>
</picker>
<!-- <text class='iconfont icon-riqi'></text> -->
</view>
<!-- </block> -->
</view>
</view>
<view class='content_item'>
<!-- wx:for='{{addlist}}' wx:key='' -->
<view class='risk_box'>
<view class='item_list'>
<view class='list_title project'>附加险名称</view>
<view class='list_input'>
<input type='text' placeholder='请填写' bindinput='additional_risk' value='{{item.name}}'></input>
<view class='risk_item' wx:for='{{risk_list}}' wx:key=''>
<view class='iconfont icon-guanbi symool_box' bindtap='deleteRisk' data-index='{{index}}'></view>
<view class='item_list'>
<view class='list_title project'>附加险名称</view>
<view class='list_input'>
<input type='text' placeholder='请填写' bindinput='additional_risk' value='{{item.name}}'></input>
</view>
</view>
</view>
<view class='item_list'>
<view class='list_title project'>附加险基本保额</view>
<view class='list_input addrisk'>
<input type='number' placeholder='请填写金额' bindinput='additional_risk_money' value='{{item.num}}'></input>
<!-- <block wx:if='{{inforid}}'> -->
<input type='text' placeholder='单位' class='unit' bindinput='riskUnit' value='{{item.title}}'></input>
<!-- </block> -->
<!-- <block wx:else>
<input type='text' placeholder='单位' class='unit' bindinput='riskUnit' value='万'></input>
</block> -->
<view class='protec_item_box'>
<view>
<view class='protec_item'>
<view>轻症重大疾病</view>
<view class='protec_num'>50万</view>
</view>
<view class='protec_item'>
<view>轻症重大疾病</view>
<view class='protec_num'>50万</view>
</view>
<view class='protec_item'>
<view>轻症重大疾病</view>
<view class='protec_num'>50万</view>
</view>
</view>
<view class='protec_bottom_box'>
<view class='add_risk_btn protec_btn' bindtap='ensureProject'>
<text class='iconfont icon-shezhi'></text>
<text>管理保障项目</text>
</view>
</view>
</view>
<view class='item_list'>
<view class='list_title'>保障期</view>
<view class='list_input_box'>
<view class='list_input'>
<input type='text' placeholder='请输入' name='beneficiary' value='{{listdetail.favoree}}'></input>
</view>
<view class='list_label_box'>
<view class="list_label_item {{unit4==10?'list_label_active':''}}" bindtap='selectUnit4' data-unit='10'>年</view>
<view class="list_label_item {{unit4==11?'list_label_active':''}}" bindtap='selectUnit4' data-unit='11'>岁 </view>
<view class="list_label_item {{unit4==12?'list_label_active':''}}" bindtap='selectUnit4' data-unit='12'>终身</view>
</view>
</view>
</view>
</view>
<view class='add_risk_box'>
<view class='add_risk_btn' bindtap='deleteRisk' data-index='{{index}}'>
<!-- <view class='add_risk_btn' bindtap='deleteRisk' data-index='{{index}}'>
<text class='iconfont icon-shanchu'></text>
<text>删除</text>
</view>
</view> -->
<view class='add_risk_btn' bindtap='addRisk'>
<text class='iconfont icon-tianjia'></text>
<text>继续添加附加险</text>
</view>
</view>
</view>
</view>
<view class='content_item'>
<view class='item_list item' bindtap='ensureProject'>
<view class='list_title project'>
<text class='symbol_icon'>*</text>
<text>保障项目</text>
</view>
<view class='iconfont icon-jinru'>
</view>
</view>
</view>
<view class='popup_item' wx:if='{{show}}'>
<block wx:if='{{inforid}}'>
<!-- <block wx:if='{{inforid}}'>
<view class='popup_list' wx:for='{{projectlist}}' wx:key='' wx:if='{{item.status}}'>
<view class='popup_content popup_content2'>
<view class=''>{{item.name}}</view>
... ... @@ -336,28 +349,27 @@
</view>
</view>
</block>
<block wx:else>
<view class='popup_list' wx:for='{{projectlist}}' wx:key='' wx:if='{{item.status}}'>
<view class='popup_content popup_content2'>
<view class=''>{{item.name}}</view>
<view class='popup_input'>
<view class='input_content'>{{item.num}}{{item.title}}</view>
</view>
<block wx:else> -->
<view class='popup_list' wx:for='{{projectlist}}' wx:key='' wx:if='{{item.status}}'>
<view class='popup_content popup_content2'>
<view class=''>{{item.name}}</view>
<view class='popup_input'>
<view class='input_content'>{{item.num}}{{item.title}}</view>
</view>
</view>
</block>
</view>
<!-- </block> -->
</view>
<view class='box'>
<!-- 上传图片 -->
<view class='upload_box'>
<!-- <block wx:for='{{imgs}}' wx:key=''> -->
<view class='popup_img'>
<view class='iconfont icon-guanbi' catchtap='deleteImg' data-index='{{index}}'></view>
<image src='/images/img1.png' bindtap='viewImg' data-index='{{index}}'></image>
</view>
<!-- </block> -->
<!-- wx:if='{{imgs.length<6}}' -->
<view class='popup_img' bindtap='uploadImage'>
<block wx:for='{{imgs}}' wx:key=''>
<view class='popup_img'>
<view class='iconfont icon-guanbi' catchtap='deleteImg' data-index='{{index}}'></view>
<image src='{{item}}' bindtap='viewImg' data-index='{{index}}'></image>
</view>
</block>
<view class='popup_img' bindtap='uploadImage' wx:if='{{imgs.length<6}}'>
<view class='iconfont icon-add'></view>
<view>请上传清晰的保单照片</view>
</view>
... ...
/* pages/my/listDetail/listDetail.wxss */
.protec_item_box {
padding: 0 30rpx;
}
.protec_item {
display: flex;
align-items: center;
border-bottom: 1rpx dashed #ebebeb;
padding: 30rpx 0;
font-size: 28rpx;
color: #1a1a1a;
}
.protec_num {
font-size: 28rpx;
color: #0286ff;
margin-left: 25rpx;
}
.protec_bottom_box {
display: flex;
align-items: center;
justify-content: center;
padding: 30rpx 0;
border-bottom: 1rpx dashed #ebebeb;
}
.icon-shezhi {
font-size: 30rpx;
margin-right: 20rpx;
}
.protec_btn {
width: 270rpx;
color: #999;
font-size: 28rpx;
text-align: center;
}
.info {
font-size: 21rpx;
color: #999;
... ... @@ -82,10 +121,11 @@ page {
}
.list_label_box {
width: 75%;
width: 120%;
display: flex;
align-items: center;
overflow: scroll;
/* overflow: scroll; */
justify-content: flex-end;
white-space: nowrap;
}
... ... @@ -95,7 +135,7 @@ page {
border-radius: 30rpx;
font-size: 26rpx;
color: #0286ff;
margin-right: 12rpx;
margin-left: 12rpx;
}
.list_label_active {
... ... @@ -160,7 +200,7 @@ page {
.icon-guanbi {
position: absolute;
top: 10rpx;
top: 0rpx;
right: 20rpx;
color: #ccc;
}
... ... @@ -189,7 +229,7 @@ page {
align-items: center;
position: fixed;
bottom: 0;
z-index: 5;
z-index: 55;
}
.bottom_btn {
... ... @@ -248,17 +288,18 @@ page {
color: #999;
display: flex;
align-items: center;
justify-content: flex-end;
justify-content: center;
padding: 15rpx 0;
}
.add_risk_btn {
border: 1px solid rgba(153, 153, 153, 1);
border-radius: 5px;
padding: 10rpx 20rpx;
padding: 10rpx 20rpx;
margin-left: 30rpx;
}
.icon-shanchu,.icon-tianjia{
.icon-shanchu, .icon-tianjia {
font-size: 26rpx;
margin-right: 10rpx;
}
... ... @@ -276,7 +317,6 @@ page {
left: 0;
z-index: 100;
overflow-y: scroll;
}
.popup_box {
... ... @@ -325,6 +365,7 @@ page {
}
.popup_info_box {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
... ... @@ -347,12 +388,12 @@ page {
display: flex;
align-items: center;
justify-content: center;
margin-right: 13rpx;
}
.popup_label_active {
background: #007aff;
color: #fff;
margin-right: 13rpx;
}
.popup_content2 {
... ... @@ -366,7 +407,7 @@ page {
}
.popup_input {
width: 80%;
width: 55%;
display: flex;
align-items: center;
justify-content: center;
... ... @@ -383,8 +424,10 @@ page {
}
.popup_input input {
/* width: 30%; */
font-size: 28rpx;
color: #1a1a1a;
text-align: left;
}
.icon-xuanzhongkuang, .icon-fangkuang {
... ... @@ -407,26 +450,21 @@ page {
justify-content: center;
}
.risk_box {
position: relative;
}
.risk_item{
position: relative
}
.symool_box {
width: 50rpx;
height: 50rpx;
font-size: 25rpx;
color: #999;
position: absolute;
top: 22rpx;
right: -27rpx;
display: flex;
align-items: center;
justify-content: center;
z-index: 10;
text-align: right;
right: 0;
top: 20rpx;
}
.risk_box .icon-guanbi {
font-size: 25rpx;
z-index: 10;
}
.add_person {
font-size: 60rpx;
... ...
// pages/articleBrowseRecord/articleBrowseRecord.js
const app=getApp();
Page({
/**
* 页面的初始数据
*/
data: {
list:[],
page:0
},
//文章详情
listDetail(){
listDetail(e){
console.log(e.currentTarget.id)
wx.navigateTo({
url: '../ArticleDetails/ArticleDetails',
url: '../ArticleDetails/ArticleDetails?NewsId='+e.currentTarget.id,
})
},
getlist(){
let that=this;
let params = {
userId: app.globalData.UserId,
// userId: 166,
page: that.data.page
}
let url ='counselor/NewsSend';
app.post(url, params).then((res)=>{
console.log(res)
if(res.data.code==200){
that.setData({
list:res.data.data,
page: res.data.data.page
})
}
}).catch((err)=>{
console.log(err)
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
... ... @@ -32,7 +55,8 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that = this;
that.getlist();
},
/**
... ... @@ -67,6 +91,37 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage: function () {
this.prizeshare();
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: this.data.articleDetail.title, // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?status=' + this.data.articleDetail.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 eData = options.target.dataset;
console.log(eData.name); // shareBtn
// 此处可以修改 shareObj 中的内容
shareObj.path = '/pages/start/start?status=' + options.target.dataset.status
}   // 返回shareObj
return shareObj;
}
})
\ No newline at end of file
... ...
<!--pages/articleBrowseRecord/articleBrowseRecord.wxml-->
<view class='content_box'>
<view class='item_list' wx:for='{{[1,2,3]}}' wx:key='' bindtap='listDetail'>
<view class='item_list' wx:for='{{list.list}}' wx:key='' bindtap='listDetail' id='{{item.id}}'>
<view class='list_img'>
<image src='/images/img1.png'></image>
<image src='{{item.thumbnail}}'></image>
</view>
<view class='list_content_box'>
<view class='list_title'>健康险签单全攻略</view>
<view class='list_title'>{{item.title}}</view>
<view class='list_content'>
<text class='list_label list_label_active'>健康</text>
<text class='list_label list_label_active'>{{item.category}}</text>
</view>
<view class='list_info_box'>
<view>
<text class='list_label'>来源</text>
<text>人民日报</text>
<text>{{item.come}}</text>
</view>
<view class='list_btn_box'>
<view>
<text class='iconfont icon-shu'></text>
<text>100</text>
<text>{{item.sum}}</text>
</view>
<view>
<text class='iconfont icon-fenxiang2'></text>
<text>10</text>
<text>{{item.num}}</text>
</view>
</view>
</view>
... ...
// pages/browseRecord/browseRecord.js
const app=getApp();
Page({
/**
* 页面的初始数据
*/
data: {
},
//报告浏览记录详情
listDetail() {
wx,wx.navigateTo({
url: '../browseRecordDetail/browseRecordDetail',
})
Page:0,
list:[]
},
getlist(){
let that=this;
let url ='counselor/PushSend';
let params={
UserId: app.globalData.UserId,
// UserId:166,
Page: that.data.Page
}
app.post(url, params).then((res)=>{
if(res.data.code==200){
that.setData({
list:res.data.data
})
}
}).catch((err)=>{
console.log(err)
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
let that = this;
that.getlist();
},
... ... @@ -32,6 +49,8 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function() {
let that=this;
that.getlist();
},
... ...
<!--pages/browseRecord/browseRecord.wxml-->
<view class='content_box'>
<view class='item_list' wx:for='{{[1,1,1,1,1]}}' wx:key='' bindtap=''>
<view class='item_list' wx:for='{{list}}' wx:key=''>
<view>
<view class='list_time'>
<text>2018-10-14</text>
<text> 10:00:04</text>
<text>{{item.time}}</text>
</view>
<view class='user_name'>顾问姓名:某某某</view>
<view class='user_name'>被保险人:向昱筱</view>
<view class='user_name'>顾问姓名:{{item.name}}</view>
<view class='user_name'>被保险人:{{item.def_name}}</view>
</view>
<view class='list_btn' bindtap='listDetail'>查看浏览记录</view>
<navigator class='list_btn' hover-class="navigator-hover" url='/pages/index/browseRecordDetail/browseRecordDetail?id={{item.push_id}}'>查看浏览记录</navigator>
</view>
</view>
\ No newline at end of file
... ...
// pages/index/browseRecordDetail/browseRecordDetail.js
const app=getApp();
Page({
/**
* 页面的初始数据
*/
data: {
PushId:'',
list:[]
},
getlist(){
let that=this;
let url ='counselor/PushDef';
let params={
pushId: that.data.PushId,
userId: app.globalData.UserId,
}
app.post(url,params).then((res)=>{
if(res.data.code==200){
that.setData({
list:res.data.data
})
}
}).catch((err)=>{
console.log(err)
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that=this;
that.setData({
PushId:options.id
})
that.getlist();
},
/**
... ...
... ... @@ -3,9 +3,9 @@
<text>交易记录</text>
</view>
<view class='list_box'>
<view class="item_list" wx:for='{{[1,1,1,1,1,1,1,1,1]}}'>
<view class="list_content">向昱筱</view>
<view class='list_info'>浏览5次</view>
<view class="item_list" wx:for='{{list.list}}' wx:key>
<view class="list_content">{{item.user_nickname}}</view>
<view class='list_info'>浏览{{item.num}}次</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
// pages/index/inviteList/inviteList.js
const app=getApp();
Page({
/**
* 页面的初始数据
*/
data: {
tab_state:false
tab_state:false,
invitalist:[]
},
//展开收起
tabExpand() {
... ... @@ -13,11 +15,27 @@ Page({
tab_state: !(this.data.tab_state)
})
},
invitationList() {
let url = 'counselor/invite'
let params = {
UserId: app.globalData.UserId,
// UserId: 166
}
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code == 200) {
this.setData({
invitalist: res.data.data.listmessages
})
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
this.invitationList();
},
/**
... ...
<!--pages/index/inviteList/inviteList.wxml-->
<view class='charge_box'>
<view class='envoy_title_box'>
<text>邀请名单</text>
<text>充值记录</text>
</view>
<view class='box' wx:for='{{[1,1]}}'>
<view class='envoy_content_box'>
<view>
<view class='envoy_title'>某顾问</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>
</view>
<view class="envoy_info_box {{!tab_state?'expand':''}}">
<view class='envoy_content'>
<view>2018-11-16</view>
<view class='envoy_title'>+10元</view>
</view>
<view class='envoy_content'>
<view>2018-11-16</view>
<view class='envoy_title'>+10元</view>
</view>
<view class='envoy_content'>
<view>2018-11-16</view>
<view class='envoy_title'>+10元</view>
</view>
<view class='envoy_content'>
<view>2018-11-16</view>
<view class='envoy_title'>+10元</view>
</view>
</view>
</view>
<view class='charge_box'>
<view class='envoy_title_box'>
<text>邀请名单</text>
<text>充值记录</text>
</view>
<view class='box' wx:for='{{invitalist}}'>
<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>
</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>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -72,6 +72,7 @@ Page({
KeyWord: that.data.KeyWord
}
app.post(url, param).then((res) => {
console.log(res)
if (res.data.code == 200) {
if (res.data.data.type == '-13') {
setTimeout(function () {
... ...
... ... @@ -10,35 +10,36 @@
</view>
<view class='line_box'></view>
<view class='content_box'>
<view class='item_list' wx:for='{{[1,1,1]}}' wx:key=''>
<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'>
<view class='list_label_box' bindtap='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'>3</text>
<text class='peoper_num'>{{items.infor}}</text>
<!-- <text class='iconfont icon-yuan label_icon'></text> -->
</view>
<view class='list_label_item'>
<view class='label_item' bindtap='policyList'>
<text>曹文正(爸爸)</text>
<view class='label_item' bindtap='policyList' wx:for='{{items.users}}' wx:for-item='item' wx:for-index="index" wx:key id='{{item.id}}'>
<text>{{item.name}}({{item.family_role}})</text>
<text class='iconfont icon-yuan '></text>
</view>
<view class='label_item'>
<!-- <view class='label_item'>
<text>曹文正(爸爸)</text>
<!-- <text class='iconfont icon-yuan '></text> -->
<!-- <text class='iconfont icon-yuan '></text>
</view>
<view class='label_item'>
<text>曹文正(爸爸)</text>
<!-- <text class='iconfont icon-yuan user_point'></text> -->
</view>
<!-- <text class='iconfont icon-yuan user_point'></text>
</view> -->
</view>
</view>
<view class='list_right_box'>
<view class='list_btn_box'>
<view class='list_btn' bindtap='PolicyManage'>
<view class='list_btn' bindtap='PolicyManage' data-familyid='{{items.family_id}}'>
<view>保单管理</view>
</view>
<view class='list_btn' bindtap='reportList'>
<view class='list_btn' bindtap='reportList' data-familyid='{{items.family_id}}' data-allinfo='{{items}}'>
<view>报告列表</view>
</view>
</view>
... ...
// pages/index/share/share.js
// pages/my/share/share.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
/**
* 页面的初始数据
*/
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)
})
},
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
... ...
... ... @@ -5,7 +5,7 @@
</view>
<view class='content'>
<!-- {{data.sharetext}} -->
<textarea value='111' bindinput='settextdata'></textarea>
<textarea value='{{data.sharetext}}' bindinput='settextdata'></textarea>
</view>
<button open-type="share" class='bottom_btn' data-status='{{data.status}}'>立即分享</button>
<button open-type="share" class='bottom_btn' data-status='{{data.status}}'>立即分享</button>
</view>
\ No newline at end of file
... ...
// pages/index/smartRemind/smartRemind.js
const app=getApp();
Page({
/**
* 页面的初始数据
*/
data: {
timearray: ["提前一天", "提前两天", "提前三天", "提前四天", "提前五天", "提前六天", "提前七天"],//当天传0,第一天传1...
list: [],//"nameid": "生日提醒为1,续保提醒为2","states": "开启状态,1为开启2为关闭","opentime": "提醒时间"
dateTime:'请选择',//选择保单客户生日提醒
dateopentime:'',
datestates:2,
time:'请选择',//选择续保提醒,
opentime: '',
states:2,
tabstate: true//true为近7天生日客户,flase为近7天到期保单
},
//得到智能提醒的值
getdata() {
let that = this;
let url = 'counselor/alertone';
app.post(url, {
UserId: app.globalData.UserId
// UserId: 166
}).then((res) => {
if (res.data.code == 200) {
if(res.data.data.type=='1'){
let timearray = that.data.timearray;
that.setData({
list: res.data.data
});
for (let obj of res.data.data.list) {
if (obj.nameid == '1') {//nameid==1为生日提醒,
if (obj.opentime== '') {
that.setData({
dateTime: '请选择',
datestates: obj.states,
dateopentime: obj.opentime
})
} else {
that.setData({
dateTime: timearray[obj.opentime],
datestates: obj.states,
dateopentime: obj.opentime
})
}
} else {//nameid==2为续保提醒
if (obj.opentime== '') {
that.setData({
time: '请选择',
states: obj.states,
opentime: obj.opentime
})
} else {
that.setData({
time: timearray[obj.opentime],
states: obj.states,
opentime: obj.opentime
})
}
}
}
}
}
}).catch((errMsg) => {
console.log(errMsg)
})
},
//选择保单客户生日提醒提前时间
binddateTimeChange(e){
console.log(e);
this.alertonetype('1', e.detail.value, this.data.datestates);
},
//选择续保提醒提前时间
bindTimeChange(e){
this.alertonetype('2', e.detail.value, this.data.states);
},
//开启或关闭保单客户生日
setdateopentime(){
this.alertonetype('1', this.data.dateopentime, this.data.datestates == '2' ? '1' : '2');
},
//开启或关闭续保提醒
setstates() {
this.alertonetype('2', this.data.opentime, this.data.states=='2'?'1':'2');
},
//智能提醒状态接口
alertonetype(NameId, OpenTime, States){
let that=this;
let url ='counselor/alertonetype';
let params={
UserId: app.globalData.UserId,
// UserId: 166,
NameId: NameId,
OpenTime: OpenTime,
States: States
}
app.post(url,params).then((res)=>{
if(res.data.code==200){
wx.showToast({
title: '操作成功',
icon: 'none',
duration: 2000
})
that.getdata();
}
}).catch((err)=>{
console.log(err)
})
},
settabstate_true(){
this.setData({
tabstate:true
})
},
settabstate_flase(){
this.setData({
tabstate: false
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getdata();
},
... ...
... ... @@ -2,51 +2,58 @@
<view class='content_box'>
<view class='item_list'>
<view class='list_title'>保单客户生日提醒</view>
<view class='list_content'>
<view class='iconfont icon-xuanzhongyuandian circle'></view>
<view class='iconfont icon-xuanzhong circle'></view>
<view class='list_content' bindtap='setdateopentime'>
<view class='iconfont icon-xuanzhongyuandian circle' wx:if='{{datestates==2}}'></view>
<view class='iconfont icon-xuanzhong circle' wx:else></view>
</view>
</view>
<picker class='picker_box' value="{{timeindex}}" range="{{timearray}}" bindchange="binddateTimeChange" data-index="{{index}}">
<view class='item_list'>
<view class='list_title'>某某某</view>
<view class='list_title'>提醒时间</view>
<view class='list_content'>
<text>请选择</text>
<text>{{dateTime}}</text>
<text class='iconfont icon-jinru'></text>
</view>
</view>
</picker>
</view>
<view class='content_box'>
<view class='item_list'>
<view class='list_title'>保单客户生日提醒</view>
<view class='list_content'>
<view class='iconfont icon-xuanzhongyuandian circle'></view>
<view class='iconfont icon-xuanzhong circle'></view>
<view class='list_title'>续保提醒</view>
<view class='list_content' bindtap='setstates'>
<view class='iconfont icon-xuanzhongyuandian circle' wx:if='{{states==2}}'></view>
<view class='iconfont icon-xuanzhong circle' wx:else></view>
</view>
</view>
<picker class='picker_box' value="{{timeindex}}" range="{{timearray}}" bindchange="bindTimeChange" data-index="{{index}}">
<view class='item_list'>
<view class='list_title'>某某某</view>
<view class='list_title'>提醒时间</view>
<view class='list_content'>
<text>请选择</text>
<text>{{time}}</text>
<text class='iconfont icon-jinru'></text>
</view>
</view>
</picker>
</view>
<view class='list_info_box'>注:提醒时间为具体时间的上午9:00</view>
<view class='list_info_box'>注:提醒时间为具体时间的上午8:00</view>
<view class='content_box'>
<view class='list_tab_box'>
<view class='list_tab_item tab_active'>近7天生日客户</view>
<view class='list_tab_item'>近7天到期保单</view>
</view>
<view class='item_list'>
<view class='list_title'>某某某</view>
<view class='list_content'>1999年11月10日</view>
</view>
<view class='item_list'>
<view class='list_title'>某某某</view>
<view class='list_content'>1999年11月10日</view>
</view>
<view class='item_list'>
<view class='list_title'>某某某</view>
<view class='list_content'>1999年11月10日</view>
</view>
<view class="list_tab_item {{tabstate?'tab_active':''}}" bindtap='settabstate_true'>近7天生日客户</view>
<view class="list_tab_item {{tabstate?'':'tab_active'}}" bindtap='settabstate_flase'>近7天到期保单</view>
</view>
<view wx:if='{{tabstate}}'>
<view class='item_list' wx:for='{{list.people}}' wx:key>
<view class='list_title'>{{item.name}}</view>
<view class='list_content'>{{item.birthday}}</view>
</view>
</view>
<view wx:else>
<view class='item_list' wx:for='{{list.information}}' wx:key>
<view class='list_title'>{{item.recognizee}}</view>
<view class='list_content'>{{item.compact_time}}</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
// pages/new/new.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
{}
\ No newline at end of file
<!--pages/new/new.wxml-->
<text>pages/new/new.wxml</text>
/* pages/new/new.wxss */
\ No newline at end of file
... ... @@ -27,13 +27,24 @@
"current": -1,
"list": []
},
"plugin": {
"current": -1,
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": []
"list": [
{
"id": -1,
"name": "list",
"pathName": "pages/index/addListDetail/addListDetail",
"query": ""
}
]
}
}
}
\ No newline at end of file
... ...