作者 刘晓艳

家庭保险二开

1 { 1 {
2 "pages": [ 2 "pages": [
3 - "pages/new/new",  
4 "pages/start/start", 3 "pages/start/start",
5 "pages/index/register/register", 4 "pages/index/register/register",
6 "pages/about/about", 5 "pages/about/about",
@@ -122,6 +122,30 @@ Page({ @@ -122,6 +122,30 @@ Page({
122 /** 122 /**
123 * 用户点击右上角分享 123 * 用户点击右上角分享
124 */ 124 */
125 - onShareAppMessage: function(options) {}, 125 + onShareAppMessage: function (option) {
  126 + let that = this;
  127 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  128 + var shareObj = {
  129 + title: '', // 默认是小程序的名称(可以写slogan等)
  130 + path: '/pages/start/start?doctorid=' + app.globalData.doctorid, // 默认是当前页面,必须是以‘/’开头的完整路径
  131 + imageUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  132 + success: function (res) {
  133 + // 转发成功之后的回调
  134 + if (res.errMsg == 'shareAppMessage:ok') { }
  135 + },
  136 + fail: function () {
  137 + // 转发失败之后的回调
  138 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  139 + // 用户取消转发
  140 + } else if (res.errMsg == 'shareAppMessage:fail') {
  141 + // 转发失败,其中 detail message 为详细失败信息
  142 + }
  143 + },
  144 + complete: function () {
  145 + // 转发结束之后的回调(转发成不成功都会执行)
  146 + }
  147 + }   // 来自页面内的按钮的转发
  148 + return shareObj;
  149 + }
126 150
127 }) 151 })
@@ -33,8 +33,9 @@ @@ -33,8 +33,9 @@
33 33
34 </view> 34 </view>
35 35
36 - <view class='bottom_box'>  
37 - <view class='iconfont icon-zhuanfa'></view>  
38 - <view>转发</view> 36 + <view class='bottom_box' >
  37 + <button open-type='share'></button>
  38 + <text class='iconfont icon-zhuanfa'></text>
  39 + <text>转发</text>
39 </view> 40 </view>
40 </view> 41 </view>
@@ -108,6 +108,15 @@ @@ -108,6 +108,15 @@
108 bottom: 50rpx; 108 bottom: 50rpx;
109 right: 50rpx; 109 right: 50rpx;
110 } 110 }
  111 +.bottom_box button{
  112 + position: absolute;
  113 + top:0;
  114 + left:0;
  115 + width: 100%;
  116 + height: 100%;
  117 + z-index:1000;
  118 + opacity: 0;
  119 +}
111 120
112 .icon-zhuanfa { 121 .icon-zhuanfa {
113 font-size: 45rpx; 122 font-size: 45rpx;
@@ -184,7 +184,6 @@ Page({ @@ -184,7 +184,6 @@ Page({
184 }) 184 })
185 }, 185 },
186 186
187 -  
188 //选择用户标签 187 //选择用户标签
189 selectLabel(e) { 188 selectLabel(e) {
190 var list = this.data.list 189 var list = this.data.list
1 // pages/Program/Program.js 1 // pages/Program/Program.js
  2 +const app=getApp();
2 Page({ 3 Page({
3 -  
4 /** 4 /**
5 * 页面的初始数据 5 * 页面的初始数据
6 */ 6 */
7 data: { 7 data: {
  8 + list: [],
  9 + temobj:{
  10 + name:'',
  11 + firm:'',
  12 + text:''
  13 + }
  14 + },
  15 + getlist() {
  16 + let that=this;
  17 + let url = 'counselor/SchemeList';
  18 + let params = {
  19 + userId: app.globalData.UserId
  20 + }
  21 + app.post(url, params).then((res) => {
  22 + if (res.data.code == 200) {
  23 + that.setData({
  24 + list: res.data.data.list
  25 + })
  26 + }
  27 + }).catch((err) => {
  28 + console.log(err)
  29 + })
  30 + },
  31 + setname(e){
  32 + let that = this;
  33 + let list = that.data.list;
  34 + let index = e.currentTarget.dataset.index;
  35 + list[index].name = e.detail.value;
  36 + that.setData({
  37 + list: list
  38 + })
  39 + },
  40 + setfirm(e){
  41 + let that = this;
  42 + let list = that.data.list;
  43 + let index = e.currentTarget.dataset.index;
  44 + list[index].firm = e.detail.value;
  45 + that.setData({
  46 + list: list
  47 + })
  48 + },
  49 + settemname(e){
  50 + let that=this;
  51 + let temobj = that.data.temobj;
  52 + temobj.name = e.detail.value;
  53 + that.setData({
  54 + temobj: temobj
  55 + })
  56 + },
  57 + settemfirm(e) {
  58 + let that = this;
  59 + let temobj = that.data.temobj;
  60 + temobj.firm = e.detail.value;
  61 + that.setData({
  62 + temobj: temobj
  63 + })
  64 + },
  65 + settemtext(e) {
  66 + let that = this;
  67 + let temobj = that.data.temobj;
  68 + temobj.text = e.detail.value;
  69 + that.setData({
  70 + temobj: temobj
  71 + })
  72 + },
  73 + settext(e){
  74 + let that=this;
  75 + let list = that.data.list;
  76 + let index = e.currentTarget.dataset.index;
  77 + list[index].text = e.detail.value;
  78 + that.setData({
  79 + list: list
  80 + })
  81 + },
  82 + deltemobj(){
  83 + let that=this;
  84 + let temobj={
  85 + name: '',
  86 + firm: '',
  87 + text: '',
  88 + }
  89 + that.setData({
  90 + temobj: temobj
  91 + })
  92 + },
  93 + addtemobj(){
  94 +
  95 + let that=this;
  96 + let url ='counselor/SchemeSave';
  97 + let params={
  98 + userId: app.globalData.UserId,
  99 + name: that.data.temobj.name,
  100 + firm: that.data.temobj.firm,
  101 + text: that.data.temobj.text
  102 + }
  103 + app.post(url, params).then((res)=>{
  104 + if(res.data.code==200){
  105 + that.getlist();
  106 + let temobj = {
  107 + name: '',
  108 + firm: '',
  109 + text: '',
  110 + }
  111 + that.setData({
  112 + temobj: temobj
  113 + })
  114 + }
  115 + }).catch((err)=>{
  116 + console.log(err)
  117 + })
  118 + },
  119 + //保存按钮
  120 + del(e){
  121 + let that=this;
  122 + let index = e.currentTarget.dataset.index;
  123 + let list=that.data.list;
  124 + let id = e.currentTarget.id;
  125 + wx.showModal({
  126 + title: '提示',
  127 + content: '是否删除预设方案',
  128 + cancelColor:'#000000',
  129 + confirmColor:'#3cc51f',
  130 + showCancel:true,
  131 + cancelText:'取消',
  132 + confirmText:'确定',
  133 + success(res) {
  134 + if (res.confirm) {
  135 + let url ='counselor/SchemeDelete';
  136 + app.post(url, { SchemeId:id}).then((res)=>{
  137 + if(res.data.code==200){
  138 + if(res.data.data.type==1){
  139 + that.getlist();
  140 +
  141 + wx.showToast({
  142 + title: '操作成功',
  143 + icon: 'none',
  144 + duration: 2000
  145 + })
  146 + }
8 147
  148 + }
  149 + })
  150 + } else if (res.cancel) {
  151 + console.log('用户点击取消')
  152 + }
  153 + }
  154 + })
  155 + },
  156 + //保存所有
  157 + allsave(){
  158 +
  159 + let that=this;
  160 + let list = this.data.list;
  161 + for (let i = 0; i < list.length;i++){
  162 + if (i == (list.length-1)){
  163 + wx.showToast({
  164 + title: '保存成功',
  165 + icon: 'success',
  166 + duration: 2000,
  167 + mask: true,
  168 + })
  169 + setTimeout(function(){
  170 + wx.navigateBack({
  171 + delta: 1
  172 + })
  173 + },1000)
  174 + }else{
  175 + let url = 'counselor/SchemeSave';
  176 + let params = {
  177 + userId: app.globalData.UserId,
  178 + schemeId: list[i].id,
  179 + name: list[i].name,
  180 + firm: list[i].firm,
  181 + text: list[i].text
  182 + }
  183 + app.post(url, params).then((res) => {
  184 + if (res.data.code == 200) {
  185 +
  186 + }
  187 + }).catch((err) => {
  188 + console.log(err)
  189 + })
  190 + }
  191 + }
9 }, 192 },
10 193
11 /** 194 /**
12 * 生命周期函数--监听页面加载 195 * 生命周期函数--监听页面加载
13 */ 196 */
14 onLoad: function (options) { 197 onLoad: function (options) {
15 - 198 + let that=this;
  199 + that.getlist();
16 }, 200 },
17 201
18 /** 202 /**
@@ -26,7 +210,8 @@ Page({ @@ -26,7 +210,8 @@ Page({
26 * 生命周期函数--监听页面显示 210 * 生命周期函数--监听页面显示
27 */ 211 */
28 onShow: function () { 212 onShow: function () {
29 - 213 + let that = this;
  214 + that.getlist();
30 }, 215 },
31 216
32 /** 217 /**
1 <!--pages/Program/Program.wxml--> 1 <!--pages/Program/Program.wxml-->
2 <view class='line_box'></view> 2 <view class='line_box'></view>
3 -<view> 3 +<view wx:for='{{list}}' wx:key>
4 <view class='content_box'> 4 <view class='content_box'>
5 <view class='item_list'> 5 <view class='item_list'>
6 <view>产品名称</view> 6 <view>产品名称</view>
7 <view class='list_input'> 7 <view class='list_input'>
8 - <input placeholder='请输入产品名称'></input> 8 + <input placeholder='请输入产品名称' value='{{item.name}}' bindinput='setmame'
  9 + data-index='{{index}}'></input>
9 </view> 10 </view>
10 </view> 11 </view>
11 <view class='item_list'> 12 <view class='item_list'>
12 <view>保险公司</view> 13 <view>保险公司</view>
13 <view class='list_input'> 14 <view class='list_input'>
14 - <input placeholder='请输入保险公司'></input> 15 + <input placeholder='请输入保险公司' value='{{item.firm}}' bindinput='setfirm'
  16 + data-index='{{index}}'></input>
15 </view> 17 </view>
16 </view> 18 </view>
17 <view class='item_list'> 19 <view class='item_list'>
18 <view>保障内容</view> 20 <view>保障内容</view>
19 <view class='list_input'> 21 <view class='list_input'>
20 - <input placeholder='请输入保障内容'></input> 22 + <input placeholder='请输入保障内容' value='{{item.text}}' bindinput='settext' data-index='{{index}}'></input>
21 </view> 23 </view>
22 </view> 24 </view>
23 </view> 25 </view>
24 <view class='list_btn_box'> 26 <view class='list_btn_box'>
25 - <view class='list_btn'>删除方案</view> 27 + <view class='list_btn' bindtap='del' id='{{item.id}}'>删除方案</view>
26 </view> 28 </view>
  29 + <view class='line_box'></view>
27 </view> 30 </view>
28 -<view class='line_box'></view>  
29 <view> 31 <view>
30 <view class='content_box'> 32 <view class='content_box'>
31 <view class='item_list'> 33 <view class='item_list'>
32 <view>产品名称</view> 34 <view>产品名称</view>
33 <view class='list_input'> 35 <view class='list_input'>
34 - <input placeholder='请输入产品名称'></input> 36 + <input placeholder='请输入产品名称' value='{{temobj.name}}' bindinput='settemname'></input>
35 </view> 37 </view>
36 </view> 38 </view>
37 <view class='item_list'> 39 <view class='item_list'>
38 <view>保险公司</view> 40 <view>保险公司</view>
39 <view class='list_input'> 41 <view class='list_input'>
40 - <input placeholder='请输入保险公司'></input> 42 + <input placeholder='请输入保险公司' value='{{temobj.firm}}' bindinput='settemfirm'></input>
41 </view> 43 </view>
42 </view> 44 </view>
43 <view class='item_list'> 45 <view class='item_list'>
44 <view>保障内容</view> 46 <view>保障内容</view>
45 <view class='list_input'> 47 <view class='list_input'>
46 - <textarea placeholder='请输入保障内容'></textarea> 48 + <textarea placeholder='请输入保障内容' value='{{temobj.text}}' bindinput='settemtext'></textarea>
47 </view> 49 </view>
48 </view> 50 </view>
49 </view> 51 </view>
50 <view class='list_btn_box'> 52 <view class='list_btn_box'>
51 - <view class='list_btn'>删除方案</view>  
52 - <view class='list_btn add_btn'>添加方案</view> 53 + <view class='list_btn' bindtap='deltemobj'>删除方案</view>
  54 + <view class='list_btn add_btn' bindtap='addtemobj'>添加方案</view>
53 </view> 55 </view>
54 </view> 56 </view>
55 <view class='bottom_box'> 57 <view class='bottom_box'>
56 - <view class='save_btn'>保存</view> 58 + <view class='save_btn' bindtap='allsave'>保存</view>
57 </view> 59 </view>
1 /* pages/Program/Program.wxss */ 1 /* pages/Program/Program.wxss */
2 - 2 +page{
  3 + padding:0 0 150rpx 0;
  4 +}
3 .line_box { 5 .line_box {
4 width: 100%; 6 width: 100%;
5 height: 16rpx; 7 height: 16rpx;
1 // pages/Suggest/Suggest.js 1 // pages/Suggest/Suggest.js
  2 +const app=getApp();
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
  9 + list:[]
  10 + },
  11 + setcontent(e){
  12 + let list =this.data.list;
  13 + list.content = e.detail.value;
  14 + this.setData({
  15 + list:list
  16 + })
  17 + },
  18 + setreprt(e){
  19 + let list = this.data.list;
  20 + list.report = e.detail.value;
  21 + this.setData({
  22 + list: list
  23 + })
  24 + },
  25 + //查看预设建议列表
  26 + getAdviseLook(){
  27 + let that=this;
  28 + let url ='counselor/AdviseLook';
  29 + app.post(url, {
  30 + userId: app.globalData.UserId
  31 + // userId: 166
  32 + }).then((res)=>{
  33 + if(res.data.code==200){
  34 + that.setData({
  35 + list:res.data.data
  36 + })
  37 + }
  38 + }).catch((err)=>{
  39 + console.log(err)
  40 + })
  41 + },
  42 + save_btn(){
  43 + let that=this;
  44 + let url ='counselor/AdviseSave';
  45 + let params={
  46 + userId: app.globalData.UserId,
  47 +
  48 + report: that.data.list.report,
  49 + advise: that.data.list.content
  50 + }
  51 + app.post(url,params).then((res)=>{
  52 + console.log(res)
  53 + if(res.data.code==200){
  54 + wx.showToast({
  55 + title: '保存成功',
  56 + icon: 'none',
  57 + duration:2000,
  58 + })
  59 + setTimeout(function(){
  60 + wx.navigateBack({
  61 + delta: 1,
  62 + })
  63 + },1000)
  64 + }
  65 + }).catch((err)=>{
  66 + console.log(err)
  67 + })
8 68
9 }, 69 },
10 70
@@ -12,7 +72,8 @@ Page({ @@ -12,7 +72,8 @@ Page({
12 * 生命周期函数--监听页面加载 72 * 生命周期函数--监听页面加载
13 */ 73 */
14 onLoad: function (options) { 74 onLoad: function (options) {
15 - 75 + let that=this;
  76 + that.getAdviseLook();
16 }, 77 },
17 78
18 /** 79 /**
@@ -26,7 +87,8 @@ Page({ @@ -26,7 +87,8 @@ Page({
26 * 生命周期函数--监听页面显示 87 * 生命周期函数--监听页面显示
27 */ 88 */
28 onShow: function () { 89 onShow: function () {
29 - 90 + let that = this;
  91 + that.getAdviseLook();
30 }, 92 },
31 93
32 /** 94 /**
@@ -3,16 +3,17 @@ @@ -3,16 +3,17 @@
3 <view class='content_box'> 3 <view class='content_box'>
4 <view class='list_title'>体检报告预设</view> 4 <view class='list_title'>体检报告预设</view>
5 <view class='list_input'> 5 <view class='list_input'>
6 - <textarea placeholder='请输入预设的体检报告' placeholder-class='pl_style'></textarea> 6 + <textarea placeholder='请输入预设的体检报告' placeholder-class='pl_style' value='{{list.content}}' bindinput='setcontent'></textarea>
7 </view> 7 </view>
8 </view> 8 </view>
9 <view class='line_box'></view> 9 <view class='line_box'></view>
10 <view class='content_box'> 10 <view class='content_box'>
11 <view class='list_title'>体检报告预设</view> 11 <view class='list_title'>体检报告预设</view>
12 <view class='list_input'> 12 <view class='list_input'>
13 - <textarea placeholder='请输入预设的体检报告' placeholder-class='pl_style'></textarea> 13 + <textarea placeholder='请输入预设的体检报告' bindinput='setreprt' placeholder-class='pl_style'
  14 + value='{{list.report}}'></textarea>
14 </view> 15 </view>
15 </view> 16 </view>
16 <view class='bottom_box'> 17 <view class='bottom_box'>
17 - <view class='save_btn'>保存</view> 18 + <view class='save_btn' bindtap='save_btn'>保存</view>
18 </view> 19 </view>
1 // pages/index/TB/TB.js 1 // pages/index/TB/TB.js
  2 +const app=getApp();
  3 +var WxParse = require('../../../wxParse/wxParse.js');
2 Page({ 4 Page({
3 5
4 /** 6 /**
5 * 页面的初始数据 7 * 页面的初始数据
6 */ 8 */
7 data: { 9 data: {
8 - popup_stete: false 10 + popup_stete: false,
  11 + tlist:'',
  12 + Page:0
9 }, 13 },
10 //说明 14 //说明
11 instructionsInfo() { 15 instructionsInfo() {
@@ -14,11 +18,51 @@ Page({ @@ -14,11 +18,51 @@ Page({
14 }) 18 })
15 }, 19 },
16 //取消弹窗 20 //取消弹窗
17 - setpopupflase() { 21 + setpopupflase(){
  22 + console.log(1);
18 this.setData({ 23 this.setData({
19 popup_stete: false 24 popup_stete: false
20 }) 25 })
21 }, 26 },
  27 + funvoid(){
  28 +
  29 + },
  30 + //个人中心T币接口
  31 + gettlist(){
  32 + let that=this;
  33 + let url ='counselor/tlist';
  34 + let params={
  35 + UserId: app.globalData.UserId,
  36 + Page: that.data.Page
  37 + }
  38 + app.post(url,params).then((res)=>{
  39 + console.log(res);
  40 + if(res.data.code==200){
  41 + that.setData({
  42 + tlist:res.data.data
  43 + })
  44 + }
  45 +
  46 + }).catch((err)=>{
  47 + console.log(err)
  48 + })
  49 +
  50 + },
  51 + //TB信息内容接口
  52 + aboutTB(){
  53 + let that=this;
  54 + let url ='pubilc/about';
  55 + app.post(url, { AboutType:10}).then((res)=>{
  56 + if (res.data.code == 200) {
  57 + console.log(res)
  58 + console.log(res.data.data.post_content)
  59 + WxParse.wxParse('content', 'html', res.data.data.post_content, that, 5);
  60 + }
  61 + }).catch((err)=>{
  62 + console.log(err)
  63 + })
  64 + },
  65 +
22 /** 66 /**
23 * 生命周期函数--监听页面加载 67 * 生命周期函数--监听页面加载
24 */ 68 */
@@ -37,6 +81,9 @@ Page({ @@ -37,6 +81,9 @@ Page({
37 * 生命周期函数--监听页面显示 81 * 生命周期函数--监听页面显示
38 */ 82 */
39 onShow: function() { 83 onShow: function() {
  84 + let that=this;
  85 + that.gettlist();
  86 + that.aboutTB();
40 87
41 }, 88 },
42 89
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 <text>说明</text> 7 <text>说明</text>
8 </view> 8 </view>
9 </view> 9 </view>
10 - <view class='money'>1000</view> 10 + <view class='money'>{{tlist.balance}}</view>
11 </view> 11 </view>
12 12
13 <view class="content_item"> 13 <view class="content_item">
@@ -17,13 +17,13 @@ @@ -17,13 +17,13 @@
17 </view> 17 </view>
18 <view class='scroll_box'> 18 <view class='scroll_box'>
19 <scroll-view scroll-y> 19 <scroll-view scroll-y>
20 - <view class="item_list" wx:for='{{[1,1,1,1,1,1,1,1,1]}}'> 20 + <view class="item_list" wx:for='{{tlist.payllist}}'>
21 <view class="list_content"> 21 <view class="list_content">
22 - <view>客户阅读体检报告</view> 22 + <view>{{item.description}}</view>
23 </view> 23 </view>
24 <view class='list_info'> 24 <view class='list_info'>
25 - <view class=" ">+10</view>  
26 - <view class=" ">2018-10-02</view> 25 + <view class=" ">{{item.text}}</view>
  26 + <view class=" ">{{item.time}}</view>
27 </view> 27 </view>
28 </view> 28 </view>
29 </scroll-view> 29 </scroll-view>
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 <view class='mask_box' wx:if="{{popup_stete}}" bindtap='setpopupflase'> 33 <view class='mask_box' wx:if="{{popup_stete}}" bindtap='setpopupflase'>
34 <view class='tri'></view> 34 <view class='tri'></view>
35 <view class='popup_box' catchtap='funvoid'> 35 <view class='popup_box' catchtap='funvoid'>
36 - <!-- <import src="../../wxParse/wxParse.wxml" />  
37 - <template is="wxParse" data="{{wxParseData:content.nodes}}" /> --> 36 + <import src="../../../wxParse/wxParse.wxml" />
  37 + <template is="wxParse" data="{{wxParseData:content.nodes}}" />
38 </view> 38 </view>
39 </view> 39 </view>
1 // pages/VipRecharge/VipRecharge.js 1 // pages/VipRecharge/VipRecharge.js
  2 +const app=getApp();
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
8 - 9 + viplist:[],
  10 + toplist:[],
  11 + mainlist:[]
9 }, 12 },
10 //选择支付方式 13 //选择支付方式
11 - buyWay() { 14 + buyWay(e) {
  15 + console.log(e)
12 wx.navigateTo({ 16 wx.navigateTo({
13 - url: '../payWay/payWay', 17 + url: '../payWay/payWay?id=' + e.currentTarget.id + '&moneyt=' + e.currentTarget.dataset.moneyt,
  18 + })
  19 + },
  20 + getvip(){
  21 + let that=this;
  22 + let url ='counselor/vip';
  23 + app.post(url,{}).then((res)=>{
  24 + if(res.data.code==200){
  25 + let viplist = res.data.data.viplist;
  26 + let toplist=[];
  27 + let mainlist=[];
  28 + for (let obj of viplist){
  29 + if (obj.status==1){
  30 + mainlist.push(obj)
  31 + } else if (obj.status == 2){
  32 + toplist.push(obj)
  33 + }
  34 + }
  35 + that.setData({
  36 + viplist: viplist,
  37 + toplist: toplist,
  38 + mainlist: mainlist
14 }) 39 })
  40 +
  41 + }
  42 + }).catch((err)=>{
  43 + console.log(err)
  44 + })
  45 +
15 }, 46 },
16 47
17 /** 48 /**
@@ -32,6 +63,8 @@ Page({ @@ -32,6 +63,8 @@ Page({
32 * 生命周期函数--监听页面显示 63 * 生命周期函数--监听页面显示
33 */ 64 */
34 onShow: function() { 65 onShow: function() {
  66 + let that=this;
  67 + that.getvip();
35 68
36 }, 69 },
37 70
@@ -4,42 +4,19 @@ @@ -4,42 +4,19 @@
4 <image src='/images/ele@2x.png'></image> 4 <image src='/images/ele@2x.png'></image>
5 </view> 5 </view>
6 <text class='banner_info'>新手任务奖励</text> 6 <text class='banner_info'>新手任务奖励</text>
7 - <view class='banner_title'>七天VIP会员</view>  
8 - <view class='banner_content'>完成新手任务,赠送7天VIP会员</view>  
9 - <view class='list_btn' bindtap='buyWay'>立即购买</view> 7 + <view class='banner_title'>{{toplist[0].title}}</view>
  8 + <view class='banner_content'>完成新手任务,赠送{{toplist[0].title}}</view>
  9 + <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>
10 </view> 10 </view>
11 <view class='item_list_box'> 11 <view class='item_list_box'>
12 - <view class='item_list'>  
13 - <view class='list_title'>七天VIP会员</view> 12 + <view class="item_list {{(index+1)%2==0?'year_list':''}}" wx:for='{{mainlist}}' wx:key>
  13 + <view class='list_title'>{{item.title}}</view>
14 <view class='list_content'> 14 <view class='list_content'>
15 - <text>¥365</text>  
16 - <text>¥3650</text> 15 + <text>¥{{item.money}}</text>
  16 + <text>¥{{item.moneyt}}</text>
17 </view> 17 </view>
18 - <view class='list_btn month_card' bindtap='buyWay'>立即购买</view>  
19 - </view>  
20 - <view class='item_list year_list'>  
21 - <view class='list_title'>七天VIP会员</view>  
22 - <view class='list_content'>  
23 - <text>¥365</text>  
24 - <text>¥3650</text>  
25 - </view>  
26 - <view class='list_btn year_card' bindtap='buyWay'>立即购买</view>  
27 - </view>  
28 - <view class='item_list'>  
29 - <view class='list_title'>七天VIP会员</view>  
30 - <view class='list_content'>  
31 - <text>¥365</text>  
32 - <text>¥3650</text>  
33 - </view>  
34 - <view class='list_btn month_card' bindtap='buyWay'>立即购买</view>  
35 - </view>  
36 - <view class='item_list year_list'>  
37 - <view class='list_title'>七天VIP会员</view>  
38 - <view class='list_content'>  
39 - <text>¥365</text>  
40 - <text>¥3650</text>  
41 - </view>  
42 - <view class='list_btn year_card' bindtap='buyWay'>立即购买</view> 18 + <navigator class='list_btn month_card' hover-class="navigator-hover"
  19 + url='/pages/index/payWay/payWay?id={{item.id}}&moneyt={{item.moneyt}}&title={{item.title}}' >立即购买</navigator>
43 </view> 20 </view>
44 </view> 21 </view>
45 </view> 22 </view>
1 // pages/addListDetail/addListDetail.js 1 // pages/addListDetail/addListDetail.js
  2 +const app = getApp()
2 Page({ 3 Page({
3 4
4 /** 5 /**
@@ -11,58 +12,631 @@ Page({ @@ -11,58 +12,631 @@ Page({
11 period_index: -1, 12 period_index: -1,
12 compact_time: '', 13 compact_time: '',
13 impletion_time: '', 14 impletion_time: '',
14 - popup_state: false 15 + popup_state: false,
  16 + projectlist: [],
  17 + label_state: false,
  18 + insure: ['投保人', '投保人2'],
  19 + insureindex: -1,
  20 + beneficiary_list: [{
  21 + name: ['受益人1', '受益人2'],
  22 + unit: ''
  23 + }],
  24 + beneficiaryindex: -1,
  25 + beneficiary_name: '',
  26 + imgs: [],
  27 + main_risk: [],
  28 + unit: '',
  29 + unit2: '',
  30 + unit3: '',
  31 + unit4: '',
  32 + applicant_name: '',
  33 + recognizee_name: '',
  34 + rang_beneficiary: [],
15 35
  36 + risk_list:[{
  37 + name:'',
  38 + projectlist:[{}],
  39 + project_time:''
  40 + }],
  41 +
  42 + },
  43 +
  44 + //投保人
  45 + insureSelect(e) {
  46 + var insure = this.data.insure
  47 + this.setData({
  48 + insureindex: e.detail.value,
  49 + applicant_name: insure[e.detail.value]
  50 + })
16 }, 51 },
17 52
18 - //选择性别 53 + //选择被保险人
19 recognizeeSelect(e) { 54 recognizeeSelect(e) {
20 var recognizee = this.data.recognizee 55 var recognizee = this.data.recognizee
21 this.setData({ 56 this.setData({
22 recognizeeindex: e.detail.value, 57 recognizeeindex: e.detail.value,
  58 + recognizee_name: recognizee[e.detail.value]
23 }) 59 })
24 }, 60 },
  61 +
25 //合同生效日 62 //合同生效日
26 compactTime(e) { 63 compactTime(e) {
27 this.setData({ 64 this.setData({
28 compact_time: e.detail.value, 65 compact_time: e.detail.value,
29 }) 66 })
30 }, 67 },
  68 +
31 //缴费期满日 69 //缴费期满日
32 impletionTime(e) { 70 impletionTime(e) {
33 this.setData({ 71 this.setData({
34 impletion_time: e.detail.value, 72 impletion_time: e.detail.value,
35 }) 73 })
36 }, 74 },
  75 +
37 //主险保障期 76 //主险保障期
38 periodTime(e) { 77 periodTime(e) {
39 this.setData({ 78 this.setData({
40 period_index: e.detail.value, 79 period_index: e.detail.value,
41 }) 80 })
42 }, 81 },
  82 +
43 //保障项目弹窗 83 //保障项目弹窗
44 ensureProject() { 84 ensureProject() {
  85 + wx.setNavigationBarTitle({
  86 + title: '选择保障项目',
  87 + })
45 this.setData({ 88 this.setData({
46 popup_state: true 89 popup_state: true
47 }) 90 })
48 }, 91 },
  92 +
  93 + // 调取保障项目接口
  94 + ensureProjectList() {
  95 + var main_risk = this.data.main_risk
  96 + let url = 'counselor/sageguard'
  97 + let params = {}
  98 + app.post(url, params).then((res) => {
  99 + if (res.data.code == 200) {
  100 + var projectlist = res.data.data.def;
  101 + for (var i = 0; i < projectlist.length; i++) {
  102 + projectlist[i].choose_status = false
  103 + for (var j = 0; j < projectlist[i].title.length; j++) {
  104 + projectlist[i].title[j].label_state = false
  105 + }
  106 + projectlist[i].title[0].current = 0
  107 + projectlist[i].title[0].label_state = true
  108 + }
  109 + this.setData({
  110 + projectlist: res.data.data.def
  111 + })
  112 + console.log(this.data.projectlist)
  113 + }
  114 + })
  115 + },
  116 +
  117 + //保障项目单位
  118 + getUnit(e) {
  119 + var main_risk = this.data.main_risk
  120 + var index = e.currentTarget.dataset.index;
  121 + var sindex = e.currentTarget.dataset.sindex;
  122 + var projectlist = this.data.projectlist;
  123 + var title = projectlist[index].title
  124 + for (var i = 0; i < title.length; i++) {
  125 + title[i].current = ''
  126 + }
  127 + projectlist[index].title[sindex].current = sindex
  128 + if (projectlist[index].title[sindex].current == sindex) {
  129 + projectlist[index].title[sindex].label_state = true
  130 + }
  131 + this.setData({
  132 + projectlist: projectlist,
  133 + })
  134 + },
  135 +
  136 + //保障项目金额
  137 + popupNum(e) {
  138 + var main_risk = this.data.main_risk
  139 + var index = e.currentTarget.dataset.index;
  140 + var projectlist = this.data.projectlist;
  141 + if (projectlist[index].choose_status) {
  142 + projectlist[index].num = e.detail.value
  143 + main_risk[index].num = projectlist[index].num
  144 + }
  145 + console.log(main_risk)
  146 + this.setData({
  147 + projectlist: projectlist
  148 + })
  149 + },
  150 +
49 //选择保障项目 151 //选择保障项目
50 - popupState() { 152 + popupState(e) {
  153 + var index = e.currentTarget.dataset.index;
  154 + var projectlist = this.data.projectlist;
  155 + var checkstate = projectlist[index].choose_status;
  156 + var selectitem = [];
  157 + var length = this.data.projectlist.length
  158 + var main_risk = this.data.main_risk
  159 + var popup_state = this.data.popup_state
  160 + if (checkstate == false) {
  161 + projectlist[index].choose_status = true
  162 + } else {
  163 + projectlist[index].choose_status = false
  164 + }
51 this.setData({ 165 this.setData({
52 - choose_state: !(this.data.choose_state) 166 + projectlist: projectlist
53 }) 167 })
54 }, 168 },
  169 +
55 //确认选择的推荐方案 170 //确认选择的推荐方案
56 confirmCase() { 171 confirmCase() {
  172 + var that = this
  173 + var main_array = []
  174 + let dindex = wx.getStorageSync('dindex')
  175 + var projectlist = this.data.projectlist
  176 + for (var i = 0; i < projectlist.length; i++) {
  177 + for (var j = 0; j < projectlist[i].title.length; j++) {
  178 + if (projectlist[i].choose_status) {
  179 + if (projectlist[i].title[j].label_state) {
  180 + main_array.push(projectlist[i])
  181 + }
  182 + }
  183 + console.log(main_array)
  184 + }
  185 + }
  186 + if (main_array != '') {
  187 + wx.showToast({
  188 + title: '添加成功',
  189 + icon: 'none'
  190 + })
  191 + var temp = main_array
  192 + for (var i = 0; i < main_array.length; i++) {
  193 + for (var j = 0; j < main_array[i].title.length; j++) {
  194 + if (main_array[i].title[j].label_state) {
  195 + main_array[i].title = main_array[i].title[j].name
  196 + }
  197 + console.log(main_array)
  198 + }
  199 + }
  200 + that.setData({
  201 + main_array: main_array
  202 + })
  203 + }
  204 + setTimeout(function() {
  205 + that.setData({
  206 + popup_state: false,
  207 + })
  208 + wx.setNavigationBarTitle({
  209 + title: '添加保单',
  210 + })
  211 + }, 1000)
  212 + },
  213 +
  214 + //选择受益人姓名
  215 + beneficiarySelect(e) {
  216 + // console.log(e)
  217 + var index = e.currentTarget.dataset.mindex
  218 + var beneficiary_list = this.data.beneficiary_list;
  219 + for (var i = 0; i < beneficiary_list.length; i++) {
  220 + for (var j = 0; j < beneficiary_list[i].name.length; j++) {
  221 + var beneficiary_name = beneficiary_list[i].name[e.detail.value]
  222 + beneficiary_list[index].beneficiary_name = beneficiary_name
  223 + // console.log(beneficiary_list)
  224 + }
  225 + }
  226 +
  227 + // let tempRangArry = this.data.rang_beneficiary;
  228 + // tempRangArry[index] = beneficiary_list[index].name[e.detail.value]
  229 + // console.log(tempRangArry)
  230 +
  231 + this.setData({
  232 + beneficiaryindex: e.detail.value,
  233 + beneficiary_list: beneficiary_list
  234 + })
  235 + },
  236 +
  237 + //添加收益比例
  238 + addUnit(e) {
  239 + // console.log(e)
  240 + var beneficiary_list = this.data.beneficiary_list;
  241 + beneficiary_list[beneficiary_list.length - 1].unit = e.detail.value;
  242 + this.setData({
  243 + beneficiary_list: beneficiary_list,
  244 + })
  245 + },
  246 +
  247 + //添加受益人
  248 + addPersons(e) {
  249 + var list = this.data.beneficiary_list;
  250 + var len = list.length
  251 + if (list[len - 1].beneficiary_name == undefined) {
  252 + wx.showToast({
  253 + title: '请选择受益人',
  254 + icon: 'none'
  255 + })
  256 + } else if (list[len - 1].unit == '') {
  257 + console.log('unit')
  258 + wx.showToast({
  259 + title: '请输入收益比',
  260 + icon: 'none'
  261 + })
  262 + } else {
  263 + list[len] = {
  264 + name: ['受益人1', '受益人2'],
  265 + unit: ''
  266 + }
  267 + }
57 this.setData({ 268 this.setData({
58 - popup_state: false 269 + beneficiary_list: list
59 }) 270 })
60 }, 271 },
  272 +
  273 +//添加附加险
  274 + addRisk(){
  275 + var risk_list=this.data.risk_list
  276 + var len=risk_list.length
  277 + risk_list[len] = {
  278 + name: '',
  279 + projectlist: [{}],
  280 + project_time: ''
  281 + }
  282 + this.setData({
  283 + risk_list: risk_list
  284 + })
  285 + },
  286 +
  287 +
  288 +
  289 +
  290 + //上传图片
  291 + uploadImage() {
  292 + let that = this;
  293 + wx.chooseImage({
  294 + count: 6,
  295 + sizeType: ['original', 'compressed'],
  296 + success: function(res) {
  297 + let successUp = 0; //成功个数
  298 + let failUp = 0; //失败个数
  299 + let i = 0; //第几个
  300 + let tempFilePaths = res.tempFilePaths //总文件
  301 + let length = res.tempFilePaths.length //总共个数
  302 + wx.showNavigationBarLoading()
  303 + wx.showLoading({
  304 + title: '上传中',
  305 + })
  306 + that.uploadAllfile(tempFilePaths, successUp, failUp, i, length)
  307 + },
  308 + fail: function(res) {}
  309 + })
  310 + },
  311 +
  312 + //上传图片接口调取
  313 + uploadAllfile(filePaths, successUp, failUp, i, length) {
  314 + let that = this
  315 + let strtime = +new Date()
  316 + wx.uploadFile({
  317 + url: 'https://insurance.w.broteam.cn/pubilc/upload', //仅为示例,非真实的接口地址
  318 + filePath: filePaths[i],
  319 + name: 'picurl',
  320 + formData: {
  321 + 'strtime': strtime,
  322 + 'token': app.strTime(strtime)
  323 + },
  324 + success: function(res) {
  325 + wx.hideNavigationBarLoading()
  326 + wx.hideLoading()
  327 + if (res.statusCode == '200') {
  328 + let imgTemp = that.data.imgs;
  329 + let curImg = JSON.parse(res.data).data.picurl;
  330 + if (imgTemp.length < 6) {
  331 + imgTemp.push("http://" + curImg)
  332 + that.setData({
  333 + imgs: imgTemp
  334 + })
  335 + wx.showToast({
  336 + title: '上传成功',
  337 + icon: 'none',
  338 + duration: 2000,
  339 + })
  340 + } else {
  341 + wx.showToast({
  342 + title: '图片上限6张',
  343 + icon: 'none',
  344 + duration: 2000,
  345 + })
  346 + }
  347 + } else {
  348 + wx.showModal({
  349 + title: '提示',
  350 + content: res.msg,
  351 + showCancel: false
  352 + })
  353 + }
  354 + },
  355 + fail: function(res) {
  356 + wx.hideNavigationBarLoading()
  357 + wx.hideLoading()
  358 + },
  359 + complete: () => {
  360 + i++;
  361 + if (i == length) {
  362 + // console.log('总共' + successUp + '张上传成功,' + failUp + '张上传失败!');
  363 + } else { //递归调用uploadDIY函数
  364 + this.uploadAllfile(filePaths, successUp, failUp, i, length);
  365 + }
  366 + },
  367 + })
  368 + },
  369 +
  370 + //预览图片
  371 + viewImg(e) {
  372 + var imgs = this.data.imgs
  373 + var current = e.currentTarget.dataset.index
  374 + wx.previewImage({
  375 + //当前显示图片
  376 + current: imgs[current],
  377 + //所有图片
  378 + urls: imgs
  379 + })
  380 + },
  381 +
  382 + //删除图片
  383 + deleteImg(e) {
  384 + var imgs = this.data.imgs;
  385 + var index = e.currentTarget.dataset.index;
  386 + imgs.splice(index, 1);
  387 + this.setData({
  388 + imgs: imgs
  389 + });
  390 + },
  391 +
  392 + //选择各项单位
  393 + selectUnit(e) {
  394 + var unit = e.currentTarget.dataset.unit
  395 + this.setData({
  396 + unit: unit
  397 + })
  398 + },
  399 +
  400 + selectUnit2(e) {
  401 + var unit = e.currentTarget.dataset.unit
  402 + this.setData({
  403 + unit2: unit
  404 + })
  405 + },
  406 +
  407 + selectUnit3(e) {
  408 + var unit = e.currentTarget.dataset.unit
  409 + this.setData({
  410 + unit3: unit
  411 + })
  412 + },
  413 +
  414 + selectUnit4(e) {
  415 + var unit = e.currentTarget.dataset.unit
  416 + this.setData({
  417 + unit4: unit
  418 + })
  419 + },
  420 +
  421 +
  422 +
  423 + // 保单验证&&上传保单
  424 + listVerify(e) {
  425 + // this.insureItem()
  426 + // var addlist = this.data.addlist
  427 + // if (addlist[0].name != '') {
  428 + // var name = addlist[addlist.length - 1].name
  429 + // var num = addlist[addlist.length - 1].num
  430 + // var title = addlist[addlist.length - 1].title
  431 + // if (name == '' || num == '' || title == '') {
  432 + // addlist.pop()
  433 + // this.setData({
  434 + // addlist: addlist
  435 + // })
  436 + // }
  437 + // }
  438 + var warn = ""; //弹框时提示的内容
  439 + var flag = true; //判断信息输入是否完整判断弹窗
  440 + var in_num = e.detail.value.policy_num
  441 + var firm = e.detail.value.company;
  442 + var applicant = this.data.applicant_name
  443 + var recognizee = this.data.recognizee_name
  444 +
  445 + var favoree = this.data.favoreename
  446 +
  447 + var compact_time = this.data.compact_time
  448 + var impletion_time = this.data.impletion_time
  449 + var warranty = e.detail.value.Guarantee_period
  450 + var bank = e.detail.value.Renew_bank
  451 + var bank_num = e.detail.value.renew_num
  452 + var year_money = e.detail.value.year_money
  453 + var main_risks = e.detail.value.main_risks
  454 + var coverage = e.detail.value.base_money
  455 + var picurl = JSON.stringify(this.data.imgs)
  456 + var guarantee = JSON.stringify(this.data.selectitem) //保障项目
  457 + var more = JSON.stringify(this.data.addlist)
  458 +
  459 + // if (this.data.inforid != undefined) {
  460 + if (in_num == '') {
  461 + warn = '请输入保单号!'
  462 + } else if (firm == '') {
  463 + warn = '请输入所属公司!'
  464 + } else if (applicant == '') {
  465 + warn = '请输入投保人!'
  466 + } else if (recognizee == '') {
  467 + warn = '请输入被保险人!'
  468 + } else if (favoree == '') {
  469 + warn = '请输入受益人!'
  470 + } else if (compact_time == '') {
  471 + warn = '请输入合同生效日!'
  472 + } else if (impletion_time == '') {
  473 + warn = '请输入缴费期满日!'
  474 + } else if (warranty == '') {
  475 + warn = '请输入保障期!'
  476 + } else if (bank == '') {
  477 + warn = '请输入续费银行!'
  478 + } else if (bank_num == '') {
  479 + warn = '请输入续费账号!'
  480 + } else if (!(/^[0-9]+.?[0-9]*/.test(bank_num))) {
  481 + warn = '请输入正确续费账号!'
  482 + } else if (year_money == '') {
  483 + warn = '请输入年交保费!'
  484 + } else if (main_risks == '') {
  485 + warn = '请输入主险名称!'
  486 + } else if (coverage == '') {
  487 + warn = '请输入主险基本保额!'
  488 + } else if (more.length == 2) {
  489 + warn = '请上传上传附加险!'
  490 + } else if (guarantee.length == 0) {
  491 + warn = '请选择保障项目!'
  492 + } else if (picurl.length == 2) {
  493 + warn = '请选择图片!'
  494 + } else {
  495 + flag = false
  496 + // 添加、修改保单接口调取
  497 + let url = 'counselor/inforuodate'
  498 + let params = {
  499 + InfoId: this.data.inforid,
  500 + def_id: this.data.def_id,
  501 + in_num: in_num,
  502 + firm: firm,
  503 + applicant: applicant,
  504 + recognizee: recognizee,
  505 + favoree: favoree,
  506 + compact_time: compact_time,
  507 + impletion_time: impletion_time,
  508 + warranty: warranty,
  509 + bank: bank,
  510 + bank_num: bank_num,
  511 + year_money: year_money,
  512 + main_risks: main_risks,
  513 + coverage: coverage,
  514 + more: more,
  515 + guarantee: guarantee,
  516 + picurl: picurl
  517 + }
  518 + app.post(url, params).then((res) => {
  519 + if (res.data.code == 200) {
  520 + wx.navigateBack({
  521 + delta: 1,
  522 + })
  523 + }
  524 + })
  525 + }
  526 + // }
  527 + // else {
  528 + // if (in_num == '') {
  529 + // warn = '请输入保单号!'
  530 + // } else if (firm == '') {
  531 + // warn = '请输入所属公司!'
  532 + // } else if (applicant == '') {
  533 + // warn = '请输入投保人!'
  534 + // } else if (recognizee == '') {
  535 + // warn = '请输入被保险人!'
  536 + // } else if (favoree == '') {
  537 + // warn = '请输入受益人!'
  538 + // } else if (compact_time == '') {
  539 + // warn = '请输入合同生效日!'
  540 + // } else if (impletion_time == '') {
  541 + // warn = '请输入缴费期满日!'
  542 + // } else if (warranty == '') {
  543 + // warn = '请输入保障期!'
  544 + // } else if (bank == '') {
  545 + // warn = '请输入续费银行!'
  546 + // } else if (bank_num == '') {
  547 + // warn = '请输入续费账号!'
  548 + // } else if (!(/^[0-9]+.?[0-9]*/.test(bank_num))) {
  549 + // warn = '请输入正确续费账号!'
  550 + // } else if (year_money == '') {
  551 + // warn = '请输入年交保费!'
  552 + // } else if (main_risks == '') {
  553 + // warn = '请输入主险名称!'
  554 + // } else if (coverage == '') {
  555 + // warn = '请输入主险基本保额!'
  556 + // } else if (more.length == 2) {
  557 + // warn = '请上传上传附加险!'
  558 + // } else if (guarantee.length == 2) {
  559 + // warn = '请选择保障项目!'
  560 + // } else if (picurl.length == 2) {
  561 + // warn = '请选择图片!'
  562 + // } else {
  563 + // flag = false
  564 + // // 添加、修改保单接口调取
  565 + // let url = 'counselor/inforuodate'
  566 + // let params = {
  567 + // def_id: this.data.def_id,
  568 + // in_num: in_num,
  569 + // firm: firm,
  570 + // applicant: applicant,
  571 + // recognizee: recognizee,
  572 + // favoree: favoree,
  573 + // compact_time: compact_time,
  574 + // impletion_time: impletion_time,
  575 + // warranty: warranty,
  576 + // bank: bank,
  577 + // bank_num: bank_num,
  578 + // year_money: year_money,
  579 + // main_risks: main_risks,
  580 + // coverage: coverage,
  581 + // more: more,
  582 + // guarantee: guarantee,
  583 + // picurl: picurl
  584 + // }
  585 + // app.post(url, params).then((res) => {
  586 + // var projectlist = this.data.projectlist
  587 + // for (var i = 0; i < projectlist.length; i++) {
  588 + // projectlist[i].status = false
  589 + // }
  590 + // if (res.data.code == 200) {
  591 + // var continue1 = e.detail.target.dataset.type
  592 + // var complete = e.detail.target.dataset.type
  593 + // if (continue1 == 'continue1') {
  594 + // wx.showToast({
  595 + // title: '添加成功',
  596 + // icon: 'none',
  597 + // duration: 2000,
  598 + // })
  599 + // this.setData({
  600 + // nullNum: '',
  601 + // addlist: [{
  602 + // name: '',
  603 + // num: '',
  604 + // title: ''
  605 + // }],
  606 + // projectlist: projectlist,
  607 + // imgs: [],
  608 + // compact_time: '',
  609 + // impletion_time: ''
  610 + // })
  611 + // } else if (complete == complete) {
  612 + // wx.showToast({
  613 + // title: '添加成功',
  614 + // icon: 'none',
  615 + // duration: 2000,
  616 + // })
  617 + // wx.navigateBack({
  618 + // delta: 1,
  619 + // })
  620 + // }
  621 + // }
  622 + // })
  623 + // }
  624 + // }
  625 + if (flag == true) {
  626 + wx.showToast({
  627 + title: warn,
  628 + icon: 'none'
  629 + })
  630 + }
  631 +
  632 + },
  633 +
  634 +
61 /** 635 /**
62 * 生命周期函数--监听页面加载 636 * 生命周期函数--监听页面加载
63 */ 637 */
64 onLoad: function(options) { 638 onLoad: function(options) {
65 - 639 + this.ensureProjectList()
66 }, 640 },
67 641
68 /** 642 /**
@@ -3,21 +3,21 @@ @@ -3,21 +3,21 @@
3 <view class='popup_box'> 3 <view class='popup_box'>
4 <view class='main_container'> 4 <view class='main_container'>
5 <view class='popup_item'> 5 <view class='popup_item'>
6 - <view class='popup_list'> 6 + <view class='popup_list' wx:for='{{projectlist}}' wx:key=''>
7 <view bindtap='popupState' data-index='{{index}}'> 7 <view bindtap='popupState' data-index='{{index}}'>
8 - <view class="iconfont icon-fangkuang {{choose_state?'icon-xuanzhongkuang':''}}"></view> 8 + <view class="iconfont icon-fangkuang {{item.choose_status?'icon-xuanzhongkuang':''}}"></view>
9 </view> 9 </view>
10 <view class='popup_info_box'> 10 <view class='popup_info_box'>
11 <view class='popup_content'> 11 <view class='popup_content'>
12 - <view class='popup_title'>{{item.name}}111</view> 12 + <view class='popup_title'>{{item.name}}</view>
13 <view class='popup_input'> 13 <view class='popup_input'>
14 - <input type='number' placeholder='请输入' value='{{item.num}}' bindinput='itemNum' data-index='{{index}}' data-id='{{item.id}}'></input>  
15 - <text>{{item.title}}</text> 14 + <input type='number' placeholder='请输入' value='{{item.num}}' bindinput='popupNum' data-index='{{index}}' data-id='{{item.id}}'></input>
  15 + <!-- <text>{{item.title}}</text> -->
16 </view> 16 </view>
17 </view> 17 </view>
18 <view class='popup_label_box'> 18 <view class='popup_label_box'>
19 - <view class='popup_label_item popup_label_active'>万</view>  
20 - <view class='popup_label_item'>元</view> 19 + <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'>
  20 + {{sitem.name}}</view>
21 </view> 21 </view>
22 </view> 22 </view>
23 </view> 23 </view>
@@ -26,307 +26,320 @@ @@ -26,307 +26,320 @@
26 </view> 26 </view>
27 </view> 27 </view>
28 </view> 28 </view>
  29 +
29 <!-- 表单部分 --> 30 <!-- 表单部分 -->
30 <!-- <block wx:else> --> 31 <!-- <block wx:else> -->
31 <form bindsubmit='listVerify' bindreset="formReset"> 32 <form bindsubmit='listVerify' bindreset="formReset">
32 <view class='content_item'> 33 <view class='content_item'>
33 <view class='item_list'> 34 <view class='item_list'>
34 <view class='list_title'>保单号</view> 35 <view class='list_title'>保单号</view>
35 - <block wx:if='{{inforid}}'> 36 + <!-- <block wx:if='{{inforid}}'>
36 <view class='list_input'> 37 <view class='list_input'>
37 - <input type='text' placeholder='请填写' name='list_num' value='{{listdetail.in_num}}' bindinput='itemNum'></input> 38 + <input type='text' placeholder='请输入' name='list_num' value='{{listdetail.in_num}}' bindinput='itemNum'></input>
38 </view> 39 </view>
39 </block> 40 </block>
40 - <block wx:else> 41 + <block wx:else> -->
41 <view class='list_input'> 42 <view class='list_input'>
42 - <input type='text' placeholder='请填写' name='list_num' value='{{nullNum}}' bindinput='itemNum'></input> 43 + <input type='text' placeholder='请输入' name='policy_num' value='{{nullNum}}' bindinput='policyNum'></input>
43 </view> 44 </view>
44 - </block> 45 + <!-- </block> -->
45 </view> 46 </view>
46 <view class='item_list'> 47 <view class='item_list'>
47 <view class='list_title'>所属公司</view> 48 <view class='list_title'>所属公司</view>
48 - <block wx:if='{{inforid}}'> 49 + <!-- <block wx:if='{{inforid}}'>
49 <view class='list_input'> 50 <view class='list_input'>
50 - <input type='text' placeholder='请填写' name='company' value='{{listdetail.firm}}'></input> 51 + <input type='text' placeholder='请输入' name='company' value='{{listdetail.firm}}'></input>
51 </view> 52 </view>
52 </block> 53 </block>
53 - <block wx:else> 54 + <block wx:else> -->
54 <view class='list_input'> 55 <view class='list_input'>
55 - <input type='text' placeholder='请填写' name='company' value='{{nullNum}}'></input> 56 + <input type='text' placeholder='请输入' name='company' value='{{nullNum}}'></input>
56 </view> 57 </view>
57 - </block> 58 + <!-- </block> -->
58 </view> 59 </view>
59 <view class='item_list'> 60 <view class='item_list'>
60 <view class='list_title'>投保人</view> 61 <view class='list_title'>投保人</view>
61 - <block wx:if='{{inforid}}'> 62 + <!-- <block wx:if='{{inforid}}'>
62 <view class='list_input'> 63 <view class='list_input'>
63 - <input type='text' placeholder='请填写' name='policy_holder' value='{{listdetail.applicant}}'></input> 64 + <picker class='picker' range='{{insure}}' value='{{insureindex}}' bindchange='insureSelect'>
  65 + <input type='text' placeholder='请选择' name='policy_holder' value='{{insure[insureindex]}}'></input>
  66 + </picker>
64 </view> 67 </view>
65 </block> 68 </block>
66 - <block wx:else> 69 + <block wx:else> -->
67 <view class='list_input'> 70 <view class='list_input'>
68 - <input type='text' placeholder='请填写' name='policy_holder' value='{{nullNum}}'></input> 71 + <picker class='picker' range='{{insure}}' value='{{insureindex}}' bindchange='insureSelect'>
  72 + <input type='text' placeholder='请选择' name='policy_holder' value='{{insure[insureindex]}}' disabled='true'></input>
  73 + </picker>
  74 + <!-- <input type='text' placeholder='请填写' name='policy_holder' value='{{nullNum}}'></input> -->
69 </view> 75 </view>
70 - </block> 76 + <!-- </block> -->
71 </view> 77 </view>
72 <view class='item_list'> 78 <view class='item_list'>
73 <view class='list_title'>被保险人</view> 79 <view class='list_title'>被保险人</view>
74 - <block wx:if='{{inforid}}'> 80 + <!-- <block wx:if='{{inforid}}'>
75 <view class='list_input'> 81 <view class='list_input'>
76 <picker class='picker' range='{{recognizee}}' value='{{recognizeeindex}}' bindchange='recognizeeSelect'> 82 <picker class='picker' range='{{recognizee}}' value='{{recognizeeindex}}' bindchange='recognizeeSelect'>
77 <text>{{recognizee[recognizeeindex]}}</text> 83 <text>{{recognizee[recognizeeindex]}}</text>
78 </picker> 84 </picker>
79 </view> 85 </view>
80 </block> 86 </block>
81 - <block wx:else> 87 + <block wx:else> -->
82 <view class='list_input'> 88 <view class='list_input'>
83 <picker class='picker' range='{{recognizee}}' value='{{recognizeeindex}}' bindchange='recognizeeSelect'> 89 <picker class='picker' range='{{recognizee}}' value='{{recognizeeindex}}' bindchange='recognizeeSelect'>
84 <input placeholder='请选择' value='{{recognizee[recognizeeindex]}}' disabled='true'></input> 90 <input placeholder='请选择' value='{{recognizee[recognizeeindex]}}' disabled='true'></input>
85 </picker> 91 </picker>
86 </view> 92 </view>
87 - </block> 93 + <!-- </block> -->
88 </view> 94 </view>
89 <view> 95 <view>
90 - <view class='item_list'> 96 + <view class='item_list' wx:for='{{beneficiary_list}}' wx:key='' wx:for-index='its'>
91 <view class='list_title'>受益人</view> 97 <view class='list_title'>受益人</view>
92 <view class='list_input_box'> 98 <view class='list_input_box'>
93 <view class='list_input'> 99 <view class='list_input'>
94 - <input type='text' placeholder='请填写' name='beneficiary' value='{{listdetail.favoree}}'></input> 100 + <picker class='picker' range='{{item.name}}' range-key='' value='{{beneficiaryindex}}' wx:for-index='index' bindchange='beneficiarySelect' data-mindex='{{its}}'>
  101 + <input type='text' placeholder='请选择' name='beneficiary' value='{{item.beneficiary_name}}' disabled='true'></input>
  102 + </picker>
95 </view> 103 </view>
96 <view class='list_input'> 104 <view class='list_input'>
97 - <input class='income_input' type='text' placeholder='请填写' name='beneficiary' value='{{listdetail.favoree}}'></input> 105 + <input class='income_input' type='text' placeholder='受益比例%' name='beneficiary' value='{{item.unit}}' bindinput='addUnit'></input>
98 </view> 106 </view>
99 </view> 107 </view>
100 </view> 108 </view>
101 - <view class='iconfont icon-wuuiconxiangjifangda add_person'> 109 + <view class='iconfont icon-wuuiconxiangjifangda add_person' data-mindex='{{its}}' data-sindex='{{index}}' bindtap='addPersons'>
102 <text>添加受益人</text> 110 <text>添加受益人</text>
103 </view> 111 </view>
104 </view> 112 </view>
105 </view> 113 </view>
106 <view class='content_item'> 114 <view class='content_item'>
107 <view class='item_list'> 115 <view class='item_list'>
108 - <view class='list_title'>合同生效日</view>  
109 - <block wx:if='{{inforid}}'> 116 + <view class='list_title'>
  117 + <text class='symbol_icon'>*</text>
  118 + <text>主险名称</text>
  119 + </view>
  120 + <!-- <block wx:if='{{inforid}}'>
110 <view class='list_input'> 121 <view class='list_input'>
111 - <picker class='picker' mode="date" bindchange='compactTime' value='{{compact_time}}'>  
112 - <view>{{compact_time}}</view>  
113 - <input placeholder='请选择' value='{{compact_time}}' disabled='true'></input>  
114 - </picker>  
115 - <text class='iconfont icon-riqi'></text> 122 + <input type='text' placeholder='请填写' name='main_risks' value='{{listdetail.main_risks}}'></input>
116 </view> 123 </view>
117 </block> 124 </block>
118 - <block wx:else> 125 + <block wx:else> -->
119 <view class='list_input'> 126 <view class='list_input'>
120 - <picker class='picker' mode="date" bindchange='compactTime' value='{{compact_time}}'>  
121 - <input placeholder='请选择' value='{{compact_time}}' disabled='true'></input>  
122 - </picker>  
123 - <text class='iconfont icon-riqi'></text> 127 + <input type='text' placeholder='请填写' name='main_risks' value='{{nullNum}}'></input>
124 </view> 128 </view>
125 - </block> 129 + <!-- </block> -->
126 </view> 130 </view>
127 - <view class='item_list'>  
128 - <view class='list_title'>缴费期满日</view>  
129 - <block wx:if='{{inforid}}'>  
130 - <view class='list_input'>  
131 - <picker class='picker' mode="date" bindchange='impletionTime' value='{{impletion_time}}'>  
132 - <view>{{impletion_time}}</view>  
133 - </picker>  
134 - <text class='iconfont icon-riqi'></text> 131 + <view class='protec_item_box'>
  132 + <view>
  133 + <view class='protec_item' wx:for='{{main_array}}' wx:key='' if='{{item.choose_status}}'>
  134 + <view>{{item.name}}</view>
  135 + <view class='protec_num'>{{item.num}}{{item.title}}
135 </view> 136 </view>
136 - </block>  
137 - <block wx:else>  
138 - <view class='list_input'>  
139 - <picker class='picker' mode="date" bindchange='impletionTime' value='{{impletion_time}}'>  
140 - <input placeholder='请选择' value='{{impletion_time}}' disabled='true'></input>  
141 - </picker>  
142 - <text class='iconfont icon-riqi'></text>  
143 </view> 137 </view>
144 - </block>  
145 </view> 138 </view>
146 - <view class='item_list'>  
147 - <view class='list_title'>主险保障期</view>  
148 - <block wx:if='{{inforid}}'>  
149 - <view class='list_input'>  
150 - <input type='number' placeholder='请填写' name='Guarantee_period' value='{{listdetail.warranty}}'></input>  
151 - <text class='iconfont icon-riqi'></text> 139 + <view class='protec_bottom_box'>
  140 + <view class='add_risk_btn protec_btn' bindtap='ensureProject'>
  141 + <text class='iconfont icon-shezhi'></text>
  142 + <text>管理保障项目</text>
152 </view> 143 </view>
153 - </block>  
154 - <block wx:else>  
155 - <view class='list_input'>  
156 - <picker class='picker' range='{{period_time}}' value='{{period_index}}' bindchange='periodTime'>  
157 - <input placeholder='请选择' value='{{period_time[period_index]}}' disabled='true'></input>  
158 - </picker>  
159 - <text class='iconfont icon-riqi'></text>  
160 </view> 144 </view>
161 - </block>  
162 </view> 145 </view>
163 </view> 146 </view>
164 <view class='content_item'> 147 <view class='content_item'>
165 <view class='item_list'> 148 <view class='item_list'>
166 - <view class='list_title'>续费银行</view>  
167 - <block wx:if='{{inforid}}'> 149 + <view class='list_title'>
  150 + <text class='symbol_icon'>*</text>
  151 + <text>保费</text>
  152 + </view>
  153 + <view class='list_input_box'>
168 <view class='list_input'> 154 <view class='list_input'>
169 - <input type='text' placeholder='请填写' name='Renew_bank' value='{{listdetail.bank}}'></input> 155 + <input type='text' placeholder='请填写' name='beneficiary' value='{{listdetail.favoree}}'></input>
170 </view> 156 </view>
171 - </block>  
172 - <block wx:else>  
173 <view class='list_input'> 157 <view class='list_input'>
174 - <input type='text' placeholder='请填写' name='Renew_bank' value='{{nullNum}}'></input> 158 + <input class='income_input' type='text' placeholder='请填写' name='beneficiary' value='元/年' disabled='true'></input>
  159 + </view>
175 </view> 160 </view>
176 - </block>  
177 </view> 161 </view>
178 <view class='item_list'> 162 <view class='item_list'>
179 - <view class='list_title'>续费账号</view>  
180 - <block wx:if='{{inforid}}'> 163 + <view class='list_title'>合同生效日</view>
  164 + <!-- <block wx:if='{{inforid}}'>
181 <view class='list_input'> 165 <view class='list_input'>
182 - <input type='number' placeholder='输入后四位' name='renew_num' value='{{listdetail.bank_num}}'></input> 166 + <picker class='picker' mode="date" bindchange='compactTime' value='{{compact_time}}'>
  167 + <view>{{compact_time}}</view>
  168 + <input placeholder='请选择' value='{{compact_time}}' disabled='true'></input>
  169 + </picker>
  170 + <text class='iconfont icon-riqi'></text>
183 </view> 171 </view>
184 </block> 172 </block>
185 - <block wx:else> 173 + <block wx:else> -->
186 <view class='list_input'> 174 <view class='list_input'>
187 - <input type='text' placeholder='请填写' name='renew_num' value='{{nullNum}}'></input>  
188 - </view>  
189 - </block>  
190 -  
191 - </view>  
192 - <view class='item_list'>  
193 - <view class='list_title'>缴费方式</view>  
194 - <view class='list_label_box'>  
195 - <view class='list_label_item list_label_active'>年交</view>  
196 - <view class='list_label_item'>趸交(一次付清)</view>  
197 - <view class='list_label_item'>年交</view>  
198 - <view class='list_label_item'>趸交(一次付清)</view>  
199 - <view class='list_label_item'>年交</view> 175 + <picker class='picker' mode="date" bindchange='compactTime' value='{{compact_time}}'>
  176 + <input placeholder='请选择' value='{{compact_time}}' disabled='true'></input>
  177 + </picker>
  178 + <text class='iconfont icon-riqi'></text>
200 </view> 179 </view>
  180 + <!-- </block> -->
201 </view> 181 </view>
202 <view class='item_list'> 182 <view class='item_list'>
203 - <view class='list_title'>缴费时长</view> 183 + <view class='list_title'>保障期</view>
204 <view class='list_input_box'> 184 <view class='list_input_box'>
205 <view class='list_input'> 185 <view class='list_input'>
206 <input type='text' placeholder='请输入' name='beneficiary' value='{{listdetail.favoree}}'></input> 186 <input type='text' placeholder='请输入' name='beneficiary' value='{{listdetail.favoree}}'></input>
207 </view> 187 </view>
208 <view class='list_label_box'> 188 <view class='list_label_box'>
209 - <view class='list_label_item list_label_active'>年交</view>  
210 - <view class='list_label_item'>趸交(一次付清)</view>  
211 - <view class='list_label_item'>年交</view>  
212 - <view class='list_label_item'>趸交(一次付清)</view>  
213 - <view class='list_label_item'>年交</view> 189 + <view class="list_label_item {{unit==1?'list_label_active':''}}" bindtap='selectUnit' data-unit='1'>年</view>
  190 + <view class="list_label_item {{unit==2?'list_label_active':''}}" bindtap='selectUnit' data-unit='2'>岁 </view>
  191 + <view class="list_label_item {{unit==3?'list_label_active':''}}" bindtap='selectUnit' data-unit='3'>终身</view>
214 </view> 192 </view>
215 </view> 193 </view>
216 </view> 194 </view>
217 <view class='item_list'> 195 <view class='item_list'>
218 - <view class='list_title'>保障期</view> 196 + <view class='list_title'>缴费时长</view>
219 <view class='list_input_box'> 197 <view class='list_input_box'>
220 <view class='list_input'> 198 <view class='list_input'>
221 <input type='text' placeholder='请输入' name='beneficiary' value='{{listdetail.favoree}}'></input> 199 <input type='text' placeholder='请输入' name='beneficiary' value='{{listdetail.favoree}}'></input>
222 </view> 200 </view>
223 <view class='list_label_box'> 201 <view class='list_label_box'>
224 - <view class='list_label_item list_label_active'>年交</view>  
225 - <view class='list_label_item'>趸交(一次付清)</view>  
226 - <view class='list_label_item'>年交</view>  
227 - <view class='list_label_item'>趸交(一次付清)</view>  
228 - <view class='list_label_item'>年交</view> 202 + <view class="list_label_item {{unit2==4?'list_label_active':''}}" bindtap='selectUnit2' data-unit='4'>年</view>
  203 + <view class="list_label_item {{unit2==5?'list_label_active':''}}" bindtap='selectUnit2' data-unit='5'>岁 </view>
  204 + <view class="list_label_item {{unit2==6?'list_label_active':''}}" bindtap='selectUnit2' data-unit='6'>终身</view>
229 </view> 205 </view>
230 </view> 206 </view>
231 </view> 207 </view>
232 <view class='item_list'> 208 <view class='item_list'>
233 - <view class='list_title'>  
234 - <text class='symbol_icon'>*</text>  
235 - <text>年交保费</text> 209 + <view class='list_title'>缴费方式</view>
  210 + <view class='list_label_box'>
  211 + <view class="list_label_item {{unit3==7?'list_label_active':''}}" bindtap='selectUnit3' data-unit='7'>年交</view>
  212 + <view class="list_label_item {{unit3==8?'list_label_active':''}}" bindtap='selectUnit3' data-unit='8'>趸交(一次付清)</view>
  213 + <view class="list_label_item {{unit3==9?'list_label_active':''}}" bindtap='selectUnit3' data-unit='9'>年交</view>
236 </view> 214 </view>
237 - <view class='list_input_box'>  
238 - <view class='list_input'>  
239 - <input type='text' placeholder='请填写' name='beneficiary' value='{{listdetail.favoree}}'></input>  
240 </view> 215 </view>
  216 + <view class='item_list'>
  217 + <view class='list_title'>续费银行</view>
  218 + <!-- <block wx:if='{{inforid}}'>
241 <view class='list_input'> 219 <view class='list_input'>
242 - <input class='income_input' type='text' placeholder='请填写' name='beneficiary' value='元/年' disabled='true'></input> 220 + <input type='text' placeholder='请填写' name='Renew_bank' value='{{listdetail.bank}}'></input>
243 </view> 221 </view>
  222 + </block>
  223 + <block wx:else> -->
  224 + <view class='list_input'>
  225 + <input type='text' placeholder='请填写' name='Renew_bank' value='{{nullNum}}'></input>
244 </view> 226 </view>
  227 + <!-- </block> -->
245 </view> 228 </view>
246 <view class='item_list'> 229 <view class='item_list'>
247 - <view class='list_title'>  
248 - <text class='symbol_icon'>*</text>  
249 - <text>主险名称</text>  
250 - </view>  
251 - <block wx:if='{{inforid}}'> 230 + <view class='list_title'>续费账号</view>
  231 + <!-- <block wx:if='{{inforid}}'>
252 <view class='list_input'> 232 <view class='list_input'>
253 - <input type='text' placeholder='请填写' name='main_risks' value='{{listdetail.main_risks}}'></input> 233 + <input type='number' placeholder='输入后四位' name='renew_num' value='{{listdetail.bank_num}}'></input>
254 </view> 234 </view>
255 </block> 235 </block>
256 - <block wx:else> 236 + <block wx:else> -->
257 <view class='list_input'> 237 <view class='list_input'>
258 - <input type='text' placeholder='请填写' name='main_risks' value='{{nullNum}}'></input> 238 + <input type='text' placeholder='请填写' name='renew_num' value='{{nullNum}}'></input>
259 </view> 239 </view>
260 - </block> 240 + <!-- </block> -->
261 </view> 241 </view>
  242 +
262 <view class='item_list'> 243 <view class='item_list'>
263 - <view class='list_title'>  
264 - <text class='symbol_icon'>*</text>  
265 - <text>主险基本保额</text>  
266 - </view>  
267 - <block wx:if='{{inforid}}'> 244 + <view class='list_title'>缴费期满日</view>
  245 + <!-- <block wx:if='{{inforid}}'>
268 <view class='list_input'> 246 <view class='list_input'>
269 - <input type='number' placeholder='请填写' name='base_money' value='{{listdetail.coverage}}'></input> 247 + <picker class='picker' mode="date" bindchange='impletionTime' value='{{impletion_time}}'>
  248 + <view>{{impletion_time}}</view>
  249 + </picker>
  250 + <text class='iconfont icon-riqi'></text>
270 </view> 251 </view>
271 </block> 252 </block>
272 - <block wx:else> 253 + <block wx:else> -->
  254 + <view class='list_input'>
  255 + <picker class='picker' mode="date" bindchange='impletionTime' value='{{impletion_time}}'>
  256 + <input placeholder='请选择' value='{{impletion_time}}' disabled='true'></input>
  257 + </picker>
  258 + <text class='iconfont icon-riqi'></text>
  259 + </view>
  260 + <!-- </block> -->
  261 + </view>
  262 + <view class='item_list'>
  263 + <view class='list_title'>主险保障期</view>
  264 + <!-- <block wx:if='{{inforid}}'>
273 <view class='list_input'> 265 <view class='list_input'>
274 - <input type='text' placeholder='请填写' name='base_money' value='{{nullNum}}'></input> 266 + <input type='number' placeholder='请填写' name='Guarantee_period' value='{{listdetail.warranty}}'></input>
  267 + <!-- <text class='iconfont icon-riqi'></text>
275 </view> 268 </view>
276 </block> 269 </block>
  270 + <block wx:else> -->
  271 + <view class='list_input'>
  272 + <picker class='picker' range='{{period_time}}' value='{{period_index}}' bindchange='periodTime'>
  273 + <input placeholder='请选择' value='{{period_time[period_index]}}' disabled='true'></input>
  274 + </picker>
  275 + <!-- <text class='iconfont icon-riqi'></text> -->
  276 + </view>
  277 + <!-- </block> -->
277 </view> 278 </view>
278 </view> 279 </view>
279 280
280 <view class='content_item'> 281 <view class='content_item'>
281 <!-- wx:for='{{addlist}}' wx:key='' --> 282 <!-- wx:for='{{addlist}}' wx:key='' -->
282 <view class='risk_box'> 283 <view class='risk_box'>
  284 + <view class='risk_item' wx:for='{{risk_list}}' wx:key=''>
  285 + <view class='iconfont icon-guanbi symool_box' bindtap='deleteRisk' data-index='{{index}}'></view>
283 <view class='item_list'> 286 <view class='item_list'>
284 <view class='list_title project'>附加险名称</view> 287 <view class='list_title project'>附加险名称</view>
285 <view class='list_input'> 288 <view class='list_input'>
286 <input type='text' placeholder='请填写' bindinput='additional_risk' value='{{item.name}}'></input> 289 <input type='text' placeholder='请填写' bindinput='additional_risk' value='{{item.name}}'></input>
287 </view> 290 </view>
288 </view> 291 </view>
  292 + <view class='protec_item_box'>
  293 + <view>
  294 + <view class='protec_item'>
  295 + <view>轻症重大疾病</view>
  296 + <view class='protec_num'>50万</view>
  297 + </view>
  298 + <view class='protec_item'>
  299 + <view>轻症重大疾病</view>
  300 + <view class='protec_num'>50万</view>
  301 + </view>
  302 + <view class='protec_item'>
  303 + <view>轻症重大疾病</view>
  304 + <view class='protec_num'>50万</view>
  305 + </view>
  306 + </view>
  307 + <view class='protec_bottom_box'>
  308 + <view class='add_risk_btn protec_btn' bindtap='ensureProject'>
  309 + <text class='iconfont icon-shezhi'></text>
  310 + <text>管理保障项目</text>
  311 + </view>
  312 + </view>
  313 + </view>
289 <view class='item_list'> 314 <view class='item_list'>
290 - <view class='list_title project'>附加险基本保额</view>  
291 - <view class='list_input addrisk'>  
292 - <input type='number' placeholder='请填写金额' bindinput='additional_risk_money' value='{{item.num}}'></input>  
293 - <!-- <block wx:if='{{inforid}}'> -->  
294 - <input type='text' placeholder='单位' class='unit' bindinput='riskUnit' value='{{item.title}}'></input>  
295 - <!-- </block> -->  
296 - <!-- <block wx:else>  
297 - <input type='text' placeholder='单位' class='unit' bindinput='riskUnit' value='万'></input>  
298 - </block> --> 315 + <view class='list_title'>保障期</view>
  316 + <view class='list_input_box'>
  317 + <view class='list_input'>
  318 + <input type='text' placeholder='请输入' name='beneficiary' value='{{listdetail.favoree}}'></input>
  319 + </view>
  320 + <view class='list_label_box'>
  321 + <view class="list_label_item {{unit4==10?'list_label_active':''}}" bindtap='selectUnit4' data-unit='10'>年</view>
  322 + <view class="list_label_item {{unit4==11?'list_label_active':''}}" bindtap='selectUnit4' data-unit='11'>岁 </view>
  323 + <view class="list_label_item {{unit4==12?'list_label_active':''}}" bindtap='selectUnit4' data-unit='12'>终身</view>
  324 + </view>
  325 + </view>
299 </view> 326 </view>
300 </view> 327 </view>
301 <view class='add_risk_box'> 328 <view class='add_risk_box'>
302 - <view class='add_risk_btn' bindtap='deleteRisk' data-index='{{index}}'> 329 + <!-- <view class='add_risk_btn' bindtap='deleteRisk' data-index='{{index}}'>
303 <text class='iconfont icon-shanchu'></text> 330 <text class='iconfont icon-shanchu'></text>
304 <text>删除</text> 331 <text>删除</text>
305 - </view> 332 + </view> -->
306 <view class='add_risk_btn' bindtap='addRisk'> 333 <view class='add_risk_btn' bindtap='addRisk'>
307 <text class='iconfont icon-tianjia'></text> 334 <text class='iconfont icon-tianjia'></text>
308 <text>继续添加附加险</text> 335 <text>继续添加附加险</text>
309 </view> 336 </view>
310 </view> 337 </view>
311 </view> 338 </view>
312 -  
313 -  
314 </view> 339 </view>
315 340
316 -  
317 -  
318 - <view class='content_item'>  
319 - <view class='item_list item' bindtap='ensureProject'>  
320 - <view class='list_title project'>  
321 - <text class='symbol_icon'>*</text>  
322 - <text>保障项目</text>  
323 - </view>  
324 - <view class='iconfont icon-jinru'>  
325 - </view>  
326 - </view>  
327 - </view>  
328 <view class='popup_item' wx:if='{{show}}'> 341 <view class='popup_item' wx:if='{{show}}'>
329 - <block wx:if='{{inforid}}'> 342 + <!-- <block wx:if='{{inforid}}'>
330 <view class='popup_list' wx:for='{{projectlist}}' wx:key='' wx:if='{{item.status}}'> 343 <view class='popup_list' wx:for='{{projectlist}}' wx:key='' wx:if='{{item.status}}'>
331 <view class='popup_content popup_content2'> 344 <view class='popup_content popup_content2'>
332 <view class=''>{{item.name}}</view> 345 <view class=''>{{item.name}}</view>
@@ -336,7 +349,7 @@ @@ -336,7 +349,7 @@
336 </view> 349 </view>
337 </view> 350 </view>
338 </block> 351 </block>
339 - <block wx:else> 352 + <block wx:else> -->
340 <view class='popup_list' wx:for='{{projectlist}}' wx:key='' wx:if='{{item.status}}'> 353 <view class='popup_list' wx:for='{{projectlist}}' wx:key='' wx:if='{{item.status}}'>
341 <view class='popup_content popup_content2'> 354 <view class='popup_content popup_content2'>
342 <view class=''>{{item.name}}</view> 355 <view class=''>{{item.name}}</view>
@@ -345,19 +358,18 @@ @@ -345,19 +358,18 @@
345 </view> 358 </view>
346 </view> 359 </view>
347 </view> 360 </view>
348 - </block> 361 + <!-- </block> -->
349 </view> 362 </view>
350 <view class='box'> 363 <view class='box'>
351 <!-- 上传图片 --> 364 <!-- 上传图片 -->
352 <view class='upload_box'> 365 <view class='upload_box'>
353 - <!-- <block wx:for='{{imgs}}' wx:key=''> --> 366 + <block wx:for='{{imgs}}' wx:key=''>
354 <view class='popup_img'> 367 <view class='popup_img'>
355 <view class='iconfont icon-guanbi' catchtap='deleteImg' data-index='{{index}}'></view> 368 <view class='iconfont icon-guanbi' catchtap='deleteImg' data-index='{{index}}'></view>
356 - <image src='/images/img1.png' bindtap='viewImg' data-index='{{index}}'></image> 369 + <image src='{{item}}' bindtap='viewImg' data-index='{{index}}'></image>
357 </view> 370 </view>
358 - <!-- </block> -->  
359 - <!-- wx:if='{{imgs.length<6}}' -->  
360 - <view class='popup_img' bindtap='uploadImage'> 371 + </block>
  372 + <view class='popup_img' bindtap='uploadImage' wx:if='{{imgs.length<6}}'>
361 <view class='iconfont icon-add'></view> 373 <view class='iconfont icon-add'></view>
362 <view>请上传清晰的保单照片</view> 374 <view>请上传清晰的保单照片</view>
363 </view> 375 </view>
1 /* pages/my/listDetail/listDetail.wxss */ 1 /* pages/my/listDetail/listDetail.wxss */
2 2
  3 +.protec_item_box {
  4 + padding: 0 30rpx;
  5 +}
  6 +
  7 +.protec_item {
  8 + display: flex;
  9 + align-items: center;
  10 + border-bottom: 1rpx dashed #ebebeb;
  11 + padding: 30rpx 0;
  12 + font-size: 28rpx;
  13 + color: #1a1a1a;
  14 +}
  15 +
  16 +.protec_num {
  17 + font-size: 28rpx;
  18 + color: #0286ff;
  19 + margin-left: 25rpx;
  20 +}
  21 +
  22 +.protec_bottom_box {
  23 + display: flex;
  24 + align-items: center;
  25 + justify-content: center;
  26 + padding: 30rpx 0;
  27 + border-bottom: 1rpx dashed #ebebeb;
  28 +}
  29 +
  30 +.icon-shezhi {
  31 + font-size: 30rpx;
  32 + margin-right: 20rpx;
  33 +}
  34 +
  35 +.protec_btn {
  36 + width: 270rpx;
  37 + color: #999;
  38 + font-size: 28rpx;
  39 + text-align: center;
  40 +}
  41 +
3 .info { 42 .info {
4 font-size: 21rpx; 43 font-size: 21rpx;
5 color: #999; 44 color: #999;
@@ -82,10 +121,11 @@ page { @@ -82,10 +121,11 @@ page {
82 } 121 }
83 122
84 .list_label_box { 123 .list_label_box {
85 - width: 75%; 124 + width: 120%;
86 display: flex; 125 display: flex;
87 align-items: center; 126 align-items: center;
88 - overflow: scroll; 127 + /* overflow: scroll; */
  128 + justify-content: flex-end;
89 white-space: nowrap; 129 white-space: nowrap;
90 } 130 }
91 131
@@ -95,7 +135,7 @@ page { @@ -95,7 +135,7 @@ page {
95 border-radius: 30rpx; 135 border-radius: 30rpx;
96 font-size: 26rpx; 136 font-size: 26rpx;
97 color: #0286ff; 137 color: #0286ff;
98 - margin-right: 12rpx; 138 + margin-left: 12rpx;
99 } 139 }
100 140
101 .list_label_active { 141 .list_label_active {
@@ -160,7 +200,7 @@ page { @@ -160,7 +200,7 @@ page {
160 200
161 .icon-guanbi { 201 .icon-guanbi {
162 position: absolute; 202 position: absolute;
163 - top: 10rpx; 203 + top: 0rpx;
164 right: 20rpx; 204 right: 20rpx;
165 color: #ccc; 205 color: #ccc;
166 } 206 }
@@ -189,7 +229,7 @@ page { @@ -189,7 +229,7 @@ page {
189 align-items: center; 229 align-items: center;
190 position: fixed; 230 position: fixed;
191 bottom: 0; 231 bottom: 0;
192 - z-index: 5; 232 + z-index: 55;
193 } 233 }
194 234
195 .bottom_btn { 235 .bottom_btn {
@@ -248,7 +288,7 @@ page { @@ -248,7 +288,7 @@ page {
248 color: #999; 288 color: #999;
249 display: flex; 289 display: flex;
250 align-items: center; 290 align-items: center;
251 - justify-content: flex-end; 291 + justify-content: center;
252 padding: 15rpx 0; 292 padding: 15rpx 0;
253 } 293 }
254 294
@@ -258,7 +298,8 @@ page { @@ -258,7 +298,8 @@ page {
258 padding: 10rpx 20rpx; 298 padding: 10rpx 20rpx;
259 margin-left: 30rpx; 299 margin-left: 30rpx;
260 } 300 }
261 -.icon-shanchu,.icon-tianjia{ 301 +
  302 +.icon-shanchu, .icon-tianjia {
262 font-size: 26rpx; 303 font-size: 26rpx;
263 margin-right: 10rpx; 304 margin-right: 10rpx;
264 } 305 }
@@ -276,7 +317,6 @@ page { @@ -276,7 +317,6 @@ page {
276 left: 0; 317 left: 0;
277 z-index: 100; 318 z-index: 100;
278 overflow-y: scroll; 319 overflow-y: scroll;
279 -  
280 } 320 }
281 321
282 .popup_box { 322 .popup_box {
@@ -325,6 +365,7 @@ page { @@ -325,6 +365,7 @@ page {
325 } 365 }
326 366
327 .popup_info_box { 367 .popup_info_box {
  368 + width: 100%;
328 display: flex; 369 display: flex;
329 align-items: center; 370 align-items: center;
330 justify-content: space-between; 371 justify-content: space-between;
@@ -347,12 +388,12 @@ page { @@ -347,12 +388,12 @@ page {
347 display: flex; 388 display: flex;
348 align-items: center; 389 align-items: center;
349 justify-content: center; 390 justify-content: center;
  391 + margin-right: 13rpx;
350 } 392 }
351 393
352 .popup_label_active { 394 .popup_label_active {
353 background: #007aff; 395 background: #007aff;
354 color: #fff; 396 color: #fff;
355 - margin-right: 13rpx;  
356 } 397 }
357 398
358 .popup_content2 { 399 .popup_content2 {
@@ -366,7 +407,7 @@ page { @@ -366,7 +407,7 @@ page {
366 } 407 }
367 408
368 .popup_input { 409 .popup_input {
369 - width: 80%; 410 + width: 55%;
370 display: flex; 411 display: flex;
371 align-items: center; 412 align-items: center;
372 justify-content: center; 413 justify-content: center;
@@ -383,8 +424,10 @@ page { @@ -383,8 +424,10 @@ page {
383 } 424 }
384 425
385 .popup_input input { 426 .popup_input input {
  427 + /* width: 30%; */
386 font-size: 28rpx; 428 font-size: 28rpx;
387 color: #1a1a1a; 429 color: #1a1a1a;
  430 + text-align: left;
388 } 431 }
389 432
390 .icon-xuanzhongkuang, .icon-fangkuang { 433 .icon-xuanzhongkuang, .icon-fangkuang {
@@ -407,26 +450,21 @@ page { @@ -407,26 +450,21 @@ page {
407 justify-content: center; 450 justify-content: center;
408 } 451 }
409 452
410 -.risk_box {  
411 - position: relative;  
412 -}  
413 453
  454 +.risk_item{
  455 + position: relative
  456 +}
414 .symool_box { 457 .symool_box {
415 - width: 50rpx;  
416 - height: 50rpx; 458 + font-size: 25rpx;
  459 + color: #999;
417 position: absolute; 460 position: absolute;
418 - top: 22rpx;  
419 - right: -27rpx;  
420 - display: flex;  
421 - align-items: center;  
422 - justify-content: center;  
423 z-index: 10; 461 z-index: 10;
  462 + text-align: right;
  463 + right: 0;
  464 + top: 20rpx;
424 } 465 }
425 466
426 -.risk_box .icon-guanbi {  
427 - font-size: 25rpx;  
428 - z-index: 10;  
429 -} 467 +
430 468
431 .add_person { 469 .add_person {
432 font-size: 60rpx; 470 font-size: 60rpx;
1 // pages/articleBrowseRecord/articleBrowseRecord.js 1 // pages/articleBrowseRecord/articleBrowseRecord.js
  2 +const app=getApp();
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
8 - 9 + list:[],
  10 + page:0
9 }, 11 },
10 //文章详情 12 //文章详情
11 - listDetail(){ 13 + listDetail(e){
  14 + console.log(e.currentTarget.id)
12 wx.navigateTo({ 15 wx.navigateTo({
13 - url: '../ArticleDetails/ArticleDetails', 16 + url: '../ArticleDetails/ArticleDetails?NewsId='+e.currentTarget.id,
  17 + })
  18 + },
  19 + getlist(){
  20 + let that=this;
  21 + let params = {
  22 + userId: app.globalData.UserId,
  23 + // userId: 166,
  24 + page: that.data.page
  25 + }
  26 + let url ='counselor/NewsSend';
  27 + app.post(url, params).then((res)=>{
  28 + console.log(res)
  29 + if(res.data.code==200){
  30 + that.setData({
  31 + list:res.data.data,
  32 + page: res.data.data.page
  33 + })
  34 + }
  35 + }).catch((err)=>{
  36 + console.log(err)
14 }) 37 })
15 }, 38 },
16 -  
17 /** 39 /**
18 * 生命周期函数--监听页面加载 40 * 生命周期函数--监听页面加载
19 */ 41 */
20 onLoad: function (options) { 42 onLoad: function (options) {
21 43
  44 +
22 }, 45 },
23 46
24 /** 47 /**
@@ -32,7 +55,8 @@ Page({ @@ -32,7 +55,8 @@ Page({
32 * 生命周期函数--监听页面显示 55 * 生命周期函数--监听页面显示
33 */ 56 */
34 onShow: function () { 57 onShow: function () {
35 - 58 + let that = this;
  59 + that.getlist();
36 }, 60 },
37 61
38 /** 62 /**
@@ -67,6 +91,37 @@ Page({ @@ -67,6 +91,37 @@ Page({
67 * 用户点击右上角分享 91 * 用户点击右上角分享
68 */ 92 */
69 onShareAppMessage: function () { 93 onShareAppMessage: function () {
  94 + this.prizeshare();
  95 +
  96 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  97 + var shareObj = {
  98 + title: this.data.articleDetail.title, // 默认是小程序的名称(可以写slogan等)
  99 + path: '/pages/start/start?status=' + this.data.articleDetail.status, // 默认是当前页面,必须是以‘/’开头的完整路径
  100 + imgUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  101 + success: function (res) {
  102 + // 转发成功之后的回调
  103 + if (res.errMsg == 'shareAppMessage:ok') { }
  104 + },
  105 + fail: function () {
  106 + // 转发失败之后的回调
  107 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  108 + // 用户取消转发
  109 + } else if (res.errMsg == 'shareAppMessage:fail') {
  110 + // 转发失败,其中 detail message 为详细失败信息
  111 + }
  112 + },
  113 + complete: function () {
  114 + // 转发结束之后的回调(转发成不成功都会执行)
  115 + }
  116 + }   // 来自页面内的按钮的转发
  117 +
  118 + if (options.from == 'button') {
  119 + var eData = options.target.dataset;
  120 + console.log(eData.name); // shareBtn
  121 + // 此处可以修改 shareObj 中的内容
  122 + shareObj.path = '/pages/start/start?status=' + options.target.dataset.status
  123 + }   // 返回shareObj
70 124
  125 + return shareObj;
71 } 126 }
72 }) 127 })
1 <!--pages/articleBrowseRecord/articleBrowseRecord.wxml--> 1 <!--pages/articleBrowseRecord/articleBrowseRecord.wxml-->
2 <view class='content_box'> 2 <view class='content_box'>
3 - <view class='item_list' wx:for='{{[1,2,3]}}' wx:key='' bindtap='listDetail'> 3 + <view class='item_list' wx:for='{{list.list}}' wx:key='' bindtap='listDetail' id='{{item.id}}'>
4 <view class='list_img'> 4 <view class='list_img'>
5 - <image src='/images/img1.png'></image> 5 + <image src='{{item.thumbnail}}'></image>
6 </view> 6 </view>
7 <view class='list_content_box'> 7 <view class='list_content_box'>
8 - <view class='list_title'>健康险签单全攻略</view> 8 + <view class='list_title'>{{item.title}}</view>
9 <view class='list_content'> 9 <view class='list_content'>
10 - <text class='list_label list_label_active'>健康</text> 10 + <text class='list_label list_label_active'>{{item.category}}</text>
11 </view> 11 </view>
12 <view class='list_info_box'> 12 <view class='list_info_box'>
13 <view> 13 <view>
14 <text class='list_label'>来源</text> 14 <text class='list_label'>来源</text>
15 - <text>人民日报</text> 15 + <text>{{item.come}}</text>
16 </view> 16 </view>
17 <view class='list_btn_box'> 17 <view class='list_btn_box'>
18 <view> 18 <view>
19 <text class='iconfont icon-shu'></text> 19 <text class='iconfont icon-shu'></text>
20 - <text>100</text> 20 + <text>{{item.sum}}</text>
21 </view> 21 </view>
22 <view> 22 <view>
23 <text class='iconfont icon-fenxiang2'></text> 23 <text class='iconfont icon-fenxiang2'></text>
24 - <text>10</text> 24 + <text>{{item.num}}</text>
25 </view> 25 </view>
26 </view> 26 </view>
27 </view> 27 </view>
1 // pages/browseRecord/browseRecord.js 1 // pages/browseRecord/browseRecord.js
  2 +const app=getApp();
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
8 - 9 + Page:0,
  10 + list:[]
9 }, 11 },
10 - //报告浏览记录详情  
11 - listDetail() {  
12 - wx,wx.navigateTo({  
13 - url: '../browseRecordDetail/browseRecordDetail', 12 +
  13 + getlist(){
  14 + let that=this;
  15 + let url ='counselor/PushSend';
  16 + let params={
  17 + UserId: app.globalData.UserId,
  18 + // UserId:166,
  19 + Page: that.data.Page
  20 + }
  21 + app.post(url, params).then((res)=>{
  22 + if(res.data.code==200){
  23 + that.setData({
  24 + list:res.data.data
  25 + })
  26 + }
  27 + }).catch((err)=>{
  28 + console.log(err)
14 }) 29 })
15 - },  
16 30
  31 + },
17 /** 32 /**
18 * 生命周期函数--监听页面加载 33 * 生命周期函数--监听页面加载
19 */ 34 */
20 onLoad: function(options) { 35 onLoad: function(options) {
  36 + let that = this;
  37 + that.getlist();
21 38
22 }, 39 },
23 40
@@ -32,6 +49,8 @@ Page({ @@ -32,6 +49,8 @@ Page({
32 * 生命周期函数--监听页面显示 49 * 生命周期函数--监听页面显示
33 */ 50 */
34 onShow: function() { 51 onShow: function() {
  52 + let that=this;
  53 + that.getlist();
35 54
36 }, 55 },
37 56
1 <!--pages/browseRecord/browseRecord.wxml--> 1 <!--pages/browseRecord/browseRecord.wxml-->
2 <view class='content_box'> 2 <view class='content_box'>
3 - <view class='item_list' wx:for='{{[1,1,1,1,1]}}' wx:key='' bindtap=''> 3 + <view class='item_list' wx:for='{{list}}' wx:key=''>
4 <view> 4 <view>
5 <view class='list_time'> 5 <view class='list_time'>
6 - <text>2018-10-14</text>  
7 - <text> 10:00:04</text> 6 + <text>{{item.time}}</text>
  7 +
8 </view> 8 </view>
9 - <view class='user_name'>顾问姓名:某某某</view>  
10 - <view class='user_name'>被保险人:向昱筱</view> 9 + <view class='user_name'>顾问姓名:{{item.name}}</view>
  10 + <view class='user_name'>被保险人:{{item.def_name}}</view>
11 </view> 11 </view>
12 - <view class='list_btn' bindtap='listDetail'>查看浏览记录</view> 12 + <navigator class='list_btn' hover-class="navigator-hover" url='/pages/index/browseRecordDetail/browseRecordDetail?id={{item.push_id}}'>查看浏览记录</navigator>
13 </view> 13 </view>
14 </view> 14 </view>
1 // pages/index/browseRecordDetail/browseRecordDetail.js 1 // pages/index/browseRecordDetail/browseRecordDetail.js
  2 +const app=getApp();
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
8 - 9 + PushId:'',
  10 + list:[]
9 }, 11 },
  12 + getlist(){
  13 + let that=this;
  14 + let url ='counselor/PushDef';
  15 + let params={
  16 + pushId: that.data.PushId,
  17 + userId: app.globalData.UserId,
10 18
  19 + }
  20 + app.post(url,params).then((res)=>{
  21 + if(res.data.code==200){
  22 + that.setData({
  23 + list:res.data.data
  24 + })
  25 + }
  26 + }).catch((err)=>{
  27 + console.log(err)
  28 + })
  29 + },
11 /** 30 /**
12 * 生命周期函数--监听页面加载 31 * 生命周期函数--监听页面加载
13 */ 32 */
14 onLoad: function (options) { 33 onLoad: function (options) {
15 - 34 + let that=this;
  35 + that.setData({
  36 + PushId:options.id
  37 + })
  38 + that.getlist();
16 }, 39 },
17 40
18 /** 41 /**
@@ -3,9 +3,9 @@ @@ -3,9 +3,9 @@
3 <text>交易记录</text> 3 <text>交易记录</text>
4 </view> 4 </view>
5 <view class='list_box'> 5 <view class='list_box'>
6 - <view class="item_list" wx:for='{{[1,1,1,1,1,1,1,1,1]}}'>  
7 - <view class="list_content">向昱筱</view>  
8 - <view class='list_info'>浏览5次</view> 6 + <view class="item_list" wx:for='{{list.list}}' wx:key>
  7 + <view class="list_content">{{item.user_nickname}}</view>
  8 + <view class='list_info'>浏览{{item.num}}次</view>
9 </view> 9 </view>
10 </view> 10 </view>
11 </view> 11 </view>
1 // pages/index/inviteList/inviteList.js 1 // pages/index/inviteList/inviteList.js
  2 +const app=getApp();
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
8 - tab_state:false 9 + tab_state:false,
  10 + invitalist:[]
9 }, 11 },
10 //展开收起 12 //展开收起
11 tabExpand() { 13 tabExpand() {
@@ -13,11 +15,27 @@ Page({ @@ -13,11 +15,27 @@ Page({
13 tab_state: !(this.data.tab_state) 15 tab_state: !(this.data.tab_state)
14 }) 16 })
15 }, 17 },
  18 + invitationList() {
  19 + let url = 'counselor/invite'
  20 + let params = {
  21 + UserId: app.globalData.UserId,
  22 + // UserId: 166
  23 + }
  24 + app.post(url, params).then((res) => {
  25 + console.log(res)
  26 + if (res.data.code == 200) {
  27 + this.setData({
  28 + invitalist: res.data.data.listmessages
  29 + })
  30 +
  31 + }
  32 + })
  33 + },
16 /** 34 /**
17 * 生命周期函数--监听页面加载 35 * 生命周期函数--监听页面加载
18 */ 36 */
19 onLoad: function(options) { 37 onLoad: function(options) {
20 - 38 + this.invitationList();
21 }, 39 },
22 40
23 /** 41 /**
1 <!--pages/index/inviteList/inviteList.wxml--> 1 <!--pages/index/inviteList/inviteList.wxml-->
2 - <view class='charge_box'> 2 +<view class='charge_box'>
3 <view class='envoy_title_box'> 3 <view class='envoy_title_box'>
4 <text>邀请名单</text> 4 <text>邀请名单</text>
5 <text>充值记录</text> 5 <text>充值记录</text>
6 </view> 6 </view>
7 - <view class='box' wx:for='{{[1,1]}}'> 7 + <view class='box' wx:for='{{invitalist}}'>
8 <view class='envoy_content_box'> 8 <view class='envoy_content_box'>
9 <view> 9 <view>
10 - <view class='envoy_title'>某顾问</view> 10 + <view class='envoy_title'>{{item.name}}</view>
11 </view> 11 </view>
12 <view bindtap='tabExpand'> 12 <view bindtap='tabExpand'>
13 <text class="iconfont font_icon {{tab_state?'icon-shang':'icon-xiala'}}"></text> 13 <text class="iconfont font_icon {{tab_state?'icon-shang':'icon-xiala'}}"></text>
@@ -15,23 +15,11 @@ @@ -15,23 +15,11 @@
15 <text class='envoy_hint' wx:else>展开</text> 15 <text class='envoy_hint' wx:else>展开</text>
16 </view> 16 </view>
17 </view> 17 </view>
18 - <view class="envoy_info_box {{!tab_state?'expand':''}}">  
19 - <view class='envoy_content'>  
20 - <view>2018-11-16</view>  
21 - <view class='envoy_title'>+10元</view>  
22 - </view>  
23 - <view class='envoy_content'>  
24 - <view>2018-11-16</view>  
25 - <view class='envoy_title'>+10元</view>  
26 - </view>  
27 - <view class='envoy_content'>  
28 - <view>2018-11-16</view>  
29 - <view class='envoy_title'>+10元</view>  
30 - </view>  
31 - <view class='envoy_content'>  
32 - <view>2018-11-16</view>  
33 - <view class='envoy_title'>+10元</view>  
34 - </view> 18 + <view class="envoy_info_box {{!tab_state?'expand':''}}" wx:if='{{item.paylog.length>0}}'>
  19 + <view class='envoy_content' wx:for='{{item.paylog}}' wx:key>
  20 + <view>{{item.time}}</view>
  21 + <view class='envoy_title'>{{item.log}}</view>
35 </view> 22 </view>
36 </view> 23 </view>
37 </view> 24 </view>
  25 +</view>
@@ -72,6 +72,7 @@ Page({ @@ -72,6 +72,7 @@ Page({
72 KeyWord: that.data.KeyWord 72 KeyWord: that.data.KeyWord
73 } 73 }
74 app.post(url, param).then((res) => { 74 app.post(url, param).then((res) => {
  75 + console.log(res)
75 if (res.data.code == 200) { 76 if (res.data.code == 200) {
76 if (res.data.data.type == '-13') { 77 if (res.data.data.type == '-13') {
77 setTimeout(function () { 78 setTimeout(function () {
@@ -10,35 +10,36 @@ @@ -10,35 +10,36 @@
10 </view> 10 </view>
11 <view class='line_box'></view> 11 <view class='line_box'></view>
12 <view class='content_box'> 12 <view class='content_box'>
13 - <view class='item_list' wx:for='{{[1,1,1]}}' wx:key=''> 13 + <view class='item_list' wx:for='{{list}}' wx:key='' wx:for-index='indexs' wx:for-item='items'>
14 <view class='list_left_box'> 14 <view class='list_left_box'>
15 - <view class='list_label_box' bindtap='summaryList'> 15 + <view class='list_label_box' bindtap='summaryList' data-num='{{items.infor}}'
  16 + data-family_id='{{items.family_id}}' data-allinfo='{{items}}'>
16 <view class='iconfont icon-jiating1'></view> 17 <view class='iconfont icon-jiating1'></view>
17 <view>生成报告</view> 18 <view>生成报告</view>
18 - <text class='peoper_num'>3</text> 19 + <text class='peoper_num'>{{items.infor}}</text>
19 <!-- <text class='iconfont icon-yuan label_icon'></text> --> 20 <!-- <text class='iconfont icon-yuan label_icon'></text> -->
20 </view> 21 </view>
21 <view class='list_label_item'> 22 <view class='list_label_item'>
22 - <view class='label_item' bindtap='policyList'>  
23 - <text>曹文正(爸爸)</text> 23 + <view class='label_item' bindtap='policyList' wx:for='{{items.users}}' wx:for-item='item' wx:for-index="index" wx:key id='{{item.id}}'>
  24 + <text>{{item.name}}({{item.family_role}})</text>
24 <text class='iconfont icon-yuan '></text> 25 <text class='iconfont icon-yuan '></text>
25 </view> 26 </view>
26 - <view class='label_item'> 27 + <!-- <view class='label_item'>
27 <text>曹文正(爸爸)</text> 28 <text>曹文正(爸爸)</text>
28 - <!-- <text class='iconfont icon-yuan '></text> --> 29 + <!-- <text class='iconfont icon-yuan '></text>
29 </view> 30 </view>
30 <view class='label_item'> 31 <view class='label_item'>
31 <text>曹文正(爸爸)</text> 32 <text>曹文正(爸爸)</text>
32 - <!-- <text class='iconfont icon-yuan user_point'></text> -->  
33 - </view> 33 + <!-- <text class='iconfont icon-yuan user_point'></text>
  34 + </view> -->
34 </view> 35 </view>
35 </view> 36 </view>
36 <view class='list_right_box'> 37 <view class='list_right_box'>
37 <view class='list_btn_box'> 38 <view class='list_btn_box'>
38 - <view class='list_btn' bindtap='PolicyManage'> 39 + <view class='list_btn' bindtap='PolicyManage' data-familyid='{{items.family_id}}'>
39 <view>保单管理</view> 40 <view>保单管理</view>
40 </view> 41 </view>
41 - <view class='list_btn' bindtap='reportList'> 42 + <view class='list_btn' bindtap='reportList' data-familyid='{{items.family_id}}' data-allinfo='{{items}}'>
42 <view>报告列表</view> 43 <view>报告列表</view>
43 </view> 44 </view>
44 </view> 45 </view>
1 -// pages/index/share/share.js 1 +// pages/my/share/share.js
  2 +const app = getApp()
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
  8 +
7 data: { 9 data: {
  10 + data: [], //界面初始化的数据
  11 + sharetext: ''
  12 + },
  13 + getData() {
  14 + let that = this;
  15 + let url = 'counselor/share';
  16 + app.post(url, {
  17 + UserId: app.globalData.UserId
  18 + // UserId: 166
  19 + }).then((res) => {
  20 + console.log(res)
  21 + if (res.data.code == 200) {
  22 + that.setData({
  23 + data: res.data.data,
  24 + sharetext: res.data.data.sharetext
  25 + })
  26 +
  27 + }
  28 + }).catch((errMsg) => {
  29 + console.log(errMsg)
  30 + })
  31 + },
8 32
  33 + settextdata(e) {
  34 + let data = this.data.data;
  35 + data.sharetext = e.detail.value;
  36 + this.setData({
  37 + data: data,
  38 + sharetext: e.detail.value
  39 + })
9 }, 40 },
10 41
  42 + //有奖分享
  43 + prizeshare() {
  44 + var that = this;
  45 + let url = 'pubilc/sharetext';
  46 + app.post(url, {
  47 + UserId: app.globalData.UserId
  48 + }).then((res) => {
  49 + }).catch((errMsg) => {
  50 + console.log(errMsg)
  51 + })
  52 + },
11 /** 53 /**
12 * 生命周期函数--监听页面加载 54 * 生命周期函数--监听页面加载
13 */ 55 */
14 onLoad: function (options) { 56 onLoad: function (options) {
15 - 57 + let that = this;
  58 + that.getData();
16 }, 59 },
17 60
18 /** 61 /**
@@ -60,7 +103,34 @@ Page({ @@ -60,7 +103,34 @@ Page({
60 /** 103 /**
61 * 用户点击右上角分享 104 * 用户点击右上角分享
62 */ 105 */
63 - onShareAppMessage: function () {  
64 - 106 + onShareAppMessage: function (options) {
  107 +
  108 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  109 + var shareObj = {
  110 + title: "保单体验专家", // 默认是小程序的名称(可以写slogan等)
  111 + path: '/pages/start/start?status =' + options.target.dataset.status, // 默认是当前页面,必须是以‘/’开头的完整路径
  112 + imgUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  113 + success: function (res) {
  114 + // 转发成功之后的回调
  115 + if (res.errMsg == 'shareAppMessage:ok') { }
  116 + },
  117 + fail: function () {
  118 + // 转发失败之后的回调
  119 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  120 + // 用户取消转发
  121 + } else if (res.errMsg == 'shareAppMessage:fail') {
  122 + // 转发失败,其中 detail message 为详细失败信息
  123 + }
  124 + },
  125 + complete: function () {
  126 + // 转发结束之后的回调(转发成不成功都会执行)
  127 + }
  128 + }   // 来自页面内的按钮的转发
  129 + if (options.from == 'button') {
  130 + var sharetext = this.data.sharetext
  131 + // 此处可以修改 shareObj 中的内容
  132 + shareObj.path = '/pages/start/start?status=' + options.target.dataset.status + '&sharetext=' + sharetext;
  133 + }   // 返回shareObj
  134 + return shareObj;
65 } 135 }
66 }) 136 })
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 </view> 5 </view>
6 <view class='content'> 6 <view class='content'>
7 <!-- {{data.sharetext}} --> 7 <!-- {{data.sharetext}} -->
8 - <textarea value='111' bindinput='settextdata'></textarea> 8 + <textarea value='{{data.sharetext}}' bindinput='settextdata'></textarea>
9 </view> 9 </view>
10 <button open-type="share" class='bottom_btn' data-status='{{data.status}}'>立即分享</button> 10 <button open-type="share" class='bottom_btn' data-status='{{data.status}}'>立即分享</button>
11 </view> 11 </view>
1 // pages/index/smartRemind/smartRemind.js 1 // pages/index/smartRemind/smartRemind.js
  2 +const app=getApp();
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
  9 + timearray: ["提前一天", "提前两天", "提前三天", "提前四天", "提前五天", "提前六天", "提前七天"],//当天传0,第一天传1...
  10 + list: [],//"nameid": "生日提醒为1,续保提醒为2","states": "开启状态,1为开启2为关闭","opentime": "提醒时间"
8 11
9 - }, 12 + dateTime:'请选择',//选择保单客户生日提醒
  13 + dateopentime:'',
  14 + datestates:2,
10 15
  16 + time:'请选择',//选择续保提醒,
  17 + opentime: '',
  18 + states:2,
  19 + tabstate: true//true为近7天生日客户,flase为近7天到期保单
  20 + },
  21 + //得到智能提醒的值
  22 + getdata() {
  23 + let that = this;
  24 + let url = 'counselor/alertone';
  25 + app.post(url, {
  26 + UserId: app.globalData.UserId
  27 + // UserId: 166
  28 + }).then((res) => {
  29 + if (res.data.code == 200) {
  30 + if(res.data.data.type=='1'){
  31 + let timearray = that.data.timearray;
  32 + that.setData({
  33 + list: res.data.data
  34 + });
  35 + for (let obj of res.data.data.list) {
  36 + if (obj.nameid == '1') {//nameid==1为生日提醒,
  37 + if (obj.opentime== '') {
  38 + that.setData({
  39 + dateTime: '请选择',
  40 + datestates: obj.states,
  41 + dateopentime: obj.opentime
  42 + })
  43 + } else {
  44 + that.setData({
  45 + dateTime: timearray[obj.opentime],
  46 + datestates: obj.states,
  47 + dateopentime: obj.opentime
  48 + })
  49 + }
  50 + } else {//nameid==2为续保提醒
  51 + if (obj.opentime== '') {
  52 + that.setData({
  53 + time: '请选择',
  54 + states: obj.states,
  55 + opentime: obj.opentime
  56 + })
  57 + } else {
  58 + that.setData({
  59 + time: timearray[obj.opentime],
  60 + states: obj.states,
  61 + opentime: obj.opentime
  62 + })
  63 + }
  64 + }
  65 + }
  66 + }
  67 + }
  68 + }).catch((errMsg) => {
  69 + console.log(errMsg)
  70 + })
  71 + },
  72 + //选择保单客户生日提醒提前时间
  73 + binddateTimeChange(e){
  74 + console.log(e);
  75 + this.alertonetype('1', e.detail.value, this.data.datestates);
  76 + },
  77 + //选择续保提醒提前时间
  78 + bindTimeChange(e){
  79 + this.alertonetype('2', e.detail.value, this.data.states);
  80 + },
  81 + //开启或关闭保单客户生日
  82 + setdateopentime(){
  83 + this.alertonetype('1', this.data.dateopentime, this.data.datestates == '2' ? '1' : '2');
  84 + },
  85 + //开启或关闭续保提醒
  86 + setstates() {
  87 + this.alertonetype('2', this.data.opentime, this.data.states=='2'?'1':'2');
  88 + },
  89 + //智能提醒状态接口
  90 + alertonetype(NameId, OpenTime, States){
  91 + let that=this;
  92 + let url ='counselor/alertonetype';
  93 + let params={
  94 + UserId: app.globalData.UserId,
  95 + // UserId: 166,
  96 + NameId: NameId,
  97 + OpenTime: OpenTime,
  98 + States: States
  99 + }
  100 + app.post(url,params).then((res)=>{
  101 + if(res.data.code==200){
  102 + wx.showToast({
  103 + title: '操作成功',
  104 + icon: 'none',
  105 + duration: 2000
  106 + })
  107 + that.getdata();
  108 + }
  109 + }).catch((err)=>{
  110 + console.log(err)
  111 + })
  112 + },
  113 + settabstate_true(){
  114 + this.setData({
  115 + tabstate:true
  116 + })
  117 + },
  118 + settabstate_flase(){
  119 + this.setData({
  120 + tabstate: false
  121 + })
  122 + },
11 /** 123 /**
12 * 生命周期函数--监听页面加载 124 * 生命周期函数--监听页面加载
13 */ 125 */
14 onLoad: function (options) { 126 onLoad: function (options) {
  127 + this.getdata();
15 128
16 }, 129 },
17 130
@@ -2,51 +2,58 @@ @@ -2,51 +2,58 @@
2 <view class='content_box'> 2 <view class='content_box'>
3 <view class='item_list'> 3 <view class='item_list'>
4 <view class='list_title'>保单客户生日提醒</view> 4 <view class='list_title'>保单客户生日提醒</view>
5 - <view class='list_content'>  
6 - <view class='iconfont icon-xuanzhongyuandian circle'></view>  
7 - <view class='iconfont icon-xuanzhong circle'></view> 5 + <view class='list_content' bindtap='setdateopentime'>
  6 + <view class='iconfont icon-xuanzhongyuandian circle' wx:if='{{datestates==2}}'></view>
  7 + <view class='iconfont icon-xuanzhong circle' wx:else></view>
8 </view> 8 </view>
9 </view> 9 </view>
  10 + <picker class='picker_box' value="{{timeindex}}" range="{{timearray}}" bindchange="binddateTimeChange" data-index="{{index}}">
10 <view class='item_list'> 11 <view class='item_list'>
11 - <view class='list_title'>某某某</view> 12 + <view class='list_title'>提醒时间</view>
12 <view class='list_content'> 13 <view class='list_content'>
13 - <text>请选择</text> 14 + <text>{{dateTime}}</text>
14 <text class='iconfont icon-jinru'></text> 15 <text class='iconfont icon-jinru'></text>
15 </view> 16 </view>
16 </view> 17 </view>
  18 + </picker>
17 </view> 19 </view>
18 <view class='content_box'> 20 <view class='content_box'>
19 <view class='item_list'> 21 <view class='item_list'>
20 - <view class='list_title'>保单客户生日提醒</view>  
21 - <view class='list_content'>  
22 - <view class='iconfont icon-xuanzhongyuandian circle'></view>  
23 - <view class='iconfont icon-xuanzhong circle'></view> 22 + <view class='list_title'>续保提醒</view>
  23 + <view class='list_content' bindtap='setstates'>
  24 + <view class='iconfont icon-xuanzhongyuandian circle' wx:if='{{states==2}}'></view>
  25 + <view class='iconfont icon-xuanzhong circle' wx:else></view>
24 </view> 26 </view>
25 </view> 27 </view>
  28 + <picker class='picker_box' value="{{timeindex}}" range="{{timearray}}" bindchange="bindTimeChange" data-index="{{index}}">
26 <view class='item_list'> 29 <view class='item_list'>
27 - <view class='list_title'>某某某</view> 30 + <view class='list_title'>提醒时间</view>
28 <view class='list_content'> 31 <view class='list_content'>
29 - <text>请选择</text> 32 + <text>{{time}}</text>
30 <text class='iconfont icon-jinru'></text> 33 <text class='iconfont icon-jinru'></text>
31 </view> 34 </view>
32 </view> 35 </view>
  36 + </picker>
33 </view> 37 </view>
34 -<view class='list_info_box'>注:提醒时间为具体时间的上午9:00</view> 38 +<view class='list_info_box'>注:提醒时间为具体时间的上午8:00</view>
35 <view class='content_box'> 39 <view class='content_box'>
36 <view class='list_tab_box'> 40 <view class='list_tab_box'>
37 - <view class='list_tab_item tab_active'>近7天生日客户</view>  
38 - <view class='list_tab_item'>近7天到期保单</view> 41 + <view class="list_tab_item {{tabstate?'tab_active':''}}" bindtap='settabstate_true'>近7天生日客户</view>
  42 + <view class="list_tab_item {{tabstate?'':'tab_active'}}" bindtap='settabstate_flase'>近7天到期保单</view>
39 </view> 43 </view>
40 - <view class='item_list'>  
41 - <view class='list_title'>某某某</view>  
42 - <view class='list_content'>1999年11月10日</view> 44 + <view wx:if='{{tabstate}}'>
  45 + <view class='item_list' wx:for='{{list.people}}' wx:key>
  46 + <view class='list_title'>{{item.name}}</view>
  47 + <view class='list_content'>{{item.birthday}}</view>
43 </view> 48 </view>
44 - <view class='item_list'>  
45 - <view class='list_title'>某某某</view>  
46 - <view class='list_content'>1999年11月10日</view>  
47 </view> 49 </view>
48 - <view class='item_list'>  
49 - <view class='list_title'>某某某</view>  
50 - <view class='list_content'>1999年11月10日</view> 50 + <view wx:else>
  51 + <view class='item_list' wx:for='{{list.information}}' wx:key>
  52 + <view class='list_title'>{{item.recognizee}}</view>
  53 + <view class='list_content'>{{item.compact_time}}</view>
  54 + </view>
51 </view> 55 </view>
  56 +
  57 +
  58 +
52 </view> 59 </view>
1 -// pages/new/new.js  
2 -Page({  
3 -  
4 - /**  
5 - * 页面的初始数据  
6 - */  
7 - data: {  
8 -  
9 - },  
10 -  
11 - /**  
12 - * 生命周期函数--监听页面加载  
13 - */  
14 - onLoad: function (options) {  
15 -  
16 - },  
17 -  
18 - /**  
19 - * 生命周期函数--监听页面初次渲染完成  
20 - */  
21 - onReady: function () {  
22 -  
23 - },  
24 -  
25 - /**  
26 - * 生命周期函数--监听页面显示  
27 - */  
28 - onShow: function () {  
29 -  
30 - },  
31 -  
32 - /**  
33 - * 生命周期函数--监听页面隐藏  
34 - */  
35 - onHide: function () {  
36 -  
37 - },  
38 -  
39 - /**  
40 - * 生命周期函数--监听页面卸载  
41 - */  
42 - onUnload: function () {  
43 -  
44 - },  
45 -  
46 - /**  
47 - * 页面相关事件处理函数--监听用户下拉动作  
48 - */  
49 - onPullDownRefresh: function () {  
50 -  
51 - },  
52 -  
53 - /**  
54 - * 页面上拉触底事件的处理函数  
55 - */  
56 - onReachBottom: function () {  
57 -  
58 - },  
59 -  
60 - /**  
61 - * 用户点击右上角分享  
62 - */  
63 - onShareAppMessage: function () {  
64 -  
65 - }  
66 -})  
1 -<!--pages/new/new.wxml-->  
2 -<text>pages/new/new.wxml</text>  
1 -/* pages/new/new.wxss */  
@@ -27,13 +27,24 @@ @@ -27,13 +27,24 @@
27 "current": -1, 27 "current": -1,
28 "list": [] 28 "list": []
29 }, 29 },
  30 + "plugin": {
  31 + "current": -1,
  32 + "list": []
  33 + },
30 "game": { 34 "game": {
31 "currentL": -1, 35 "currentL": -1,
32 "list": [] 36 "list": []
33 }, 37 },
34 "miniprogram": { 38 "miniprogram": {
35 "current": -1, 39 "current": -1,
36 - "list": [] 40 + "list": [
  41 + {
  42 + "id": -1,
  43 + "name": "list",
  44 + "pathName": "pages/index/addListDetail/addListDetail",
  45 + "query": ""
  46 + }
  47 + ]
37 } 48 }
38 } 49 }
39 } 50 }