作者 刘晓艳

家庭保险

正在显示 48 个修改的文件 包含 2013 行增加950 行删除

要显示太多修改。

为保证性能只显示 48 of 48+ 个文件。

@@ -84,6 +84,8 @@ App({ @@ -84,6 +84,8 @@ App({
84 checkstatus: '', //分享参数(0为无分享参数,1为保单分享,2为注册分享,3为文章分享) 84 checkstatus: '', //分享参数(0为无分享参数,1为保单分享,2为注册分享,3为文章分享)
85 UserStatus: '', //用户状态(1初次登录需要授权操作,2多次登录不需要授权) 85 UserStatus: '', //用户状态(1初次登录需要授权操作,2多次登录不需要授权)
86 PublishId: '', //如果是保单分享返回保单id 86 PublishId: '', //如果是保单分享返回保单id
87 - NewsId: '' //如果是文章分享返回文章id 87 + NewsId: '', //如果是文章分享返回文章id
  88 + temp_UserType:'',
  89 + user_index:''
88 } 90 }
89 }) 91 })
1 { 1 {
2 "pages": [ 2 "pages": [
3 "pages/start/start", 3 "pages/start/start",
  4 + "pages/index/summaryList2/summaryList2",
4 "pages/index/register/register", 5 "pages/index/register/register",
5 "pages/about/about", 6 "pages/about/about",
  7 + "pages/index/personalPolicyList/personalPolicyList",
6 "pages/index/agreement/agreement", 8 "pages/index/agreement/agreement",
7 "pages/index/browseRecordDetail/browseRecordDetail", 9 "pages/index/browseRecordDetail/browseRecordDetail",
8 "pages/index/consultantList/consultantList", 10 "pages/index/consultantList/consultantList",
@@ -10,7 +12,9 @@ @@ -10,7 +12,9 @@
10 "pages/index/CustomerManagement/CustomerManagement", 12 "pages/index/CustomerManagement/CustomerManagement",
11 "pages/index/ArticleDetails/ArticleDetails", 13 "pages/index/ArticleDetails/ArticleDetails",
12 "pages/index/reportList/reportList", 14 "pages/index/reportList/reportList",
  15 + "pages/index/reportList2/reportList2",
13 "pages/index/editProfile/editProfile", 16 "pages/index/editProfile/editProfile",
  17 + "pages/index/editProfile2/editProfile2",
14 "pages/index/policyList/policyList", 18 "pages/index/policyList/policyList",
15 "pages/index/policyListDetail/policyListDetail", 19 "pages/index/policyListDetail/policyListDetail",
16 "pages/index/policyManage/policyManage", 20 "pages/index/policyManage/policyManage",
@@ -27,6 +31,7 @@ @@ -27,6 +31,7 @@
27 "pages/index/remind/remind", 31 "pages/index/remind/remind",
28 "pages/index/summaryList/summaryList", 32 "pages/index/summaryList/summaryList",
29 "pages/index/learnShare/learnShare", 33 "pages/index/learnShare/learnShare",
  34 + "pages/index/EntryInformation2/EntryInformation2",
30 "pages/index/EntryInformation/EntryInformation", 35 "pages/index/EntryInformation/EntryInformation",
31 "pages/index/Program/Program", 36 "pages/index/Program/Program",
32 "pages/index/Suggest/Suggest", 37 "pages/index/Suggest/Suggest",
1 -  
2 -  
3 -  
4 -  
5 -  
6 -  
7 -  
8 -  
9 -  
10 -  
11 -  
12 - 1 +.no_data {
  2 + color: #999;
  3 + font-size: 36rpx;
  4 + text-align: center;
  5 + width: 100%;
  6 + height: 100%;
  7 + position: fixed;
  8 + left: 0;
  9 + top: 0;
  10 + display: flex;
  11 + align-items: center;
  12 + justify-content: center;
  13 +}
13 14
14 /* iconfont */ 15 /* iconfont */
15 @font-face { 16 @font-face {
16 font-family: 'iconfont'; /* project id 926819 */ 17 font-family: 'iconfont'; /* project id 926819 */
17 - src: url('//at.alicdn.com/t/font_926819_0twe6hg7mqhh.eot');  
18 - src: url('//at.alicdn.com/t/font_926819_0twe6hg7mqhh.eot?#iefix') format('embedded-opentype'),  
19 - url('//at.alicdn.com/t/font_926819_0twe6hg7mqhh.woff') format('woff'),  
20 - url('//at.alicdn.com/t/font_926819_0twe6hg7mqhh.ttf') format('truetype'),  
21 - url('//at.alicdn.com/t/font_926819_0twe6hg7mqhh.svg#iconfont') format('svg'); 18 + src: url('//at.alicdn.com/t/font_926819_0pzhvmpbjahd.eot');
  19 + src: url('//at.alicdn.com/t/font_926819_0pzhvmpbjahd.eot?#iefix') format('embedded-opentype'),
  20 + url('//at.alicdn.com/t/font_926819_0pzhvmpbjahd.woff2') format('woff2'),
  21 + url('//at.alicdn.com/t/font_926819_0pzhvmpbjahd.woff') format('woff'),
  22 + url('//at.alicdn.com/t/font_926819_0pzhvmpbjahd.ttf') format('truetype'),
  23 + url('//at.alicdn.com/t/font_926819_0pzhvmpbjahd.svg#iconfont') format('svg');
22 } 24 }
23 25
24 .iconfont { 26 .iconfont {
25 - font-family:"iconfont" !important;  
26 - font-size:16px;  
27 - font-style:normal; 27 + font-family: "iconfont" !important;
  28 + font-size: 16px;
  29 + font-style: normal;
28 -webkit-font-smoothing: antialiased; 30 -webkit-font-smoothing: antialiased;
29 -moz-osx-font-smoothing: grayscale; 31 -moz-osx-font-smoothing: grayscale;
30 } 32 }
31 33
32 -.icon-chongzhi:before { content: "\e606"; } 34 +.icon-chongzhi:before {
  35 + content: "\e606";
  36 +}
33 37
34 -.icon-bi:before { content: "\e60a"; } 38 +.icon-bi:before {
  39 + content: "\e60a";
  40 +}
35 41
36 -.icon-renzheng:before { content: "\e646"; } 42 +.icon-renzheng:before {
  43 + content: "\e646";
  44 +}
37 45
38 -.icon-anquan:before { content: "\e63c"; } 46 +.icon-anquan:before {
  47 + content: "\e63c";
  48 +}
39 49
40 -.icon-listpress:before { content: "\e627"; } 50 +.icon-listpress:before {
  51 + content: "\e627";
  52 +}
41 53
42 -.icon-xiala1:before { content: "\e61c"; } 54 +.icon-xiala1:before {
  55 + content: "\e61c";
  56 +}
43 57
44 -.icon-baodanyuhetong:before { content: "\e642"; } 58 +.icon-baodanyuhetong:before {
  59 + content: "\e642";
  60 +}
45 61
46 -.icon-shu:before { content: "\e645"; } 62 +.icon-shu:before {
  63 + content: "\e645";
  64 +}
47 65
48 -.icon-fenxiang2:before { content: "\e620"; } 66 +.icon-fenxiang2:before {
  67 + content: "\e620";
  68 +}
49 69
50 -.icon-fangxingxuanzhongfill:before { content: "\e721"; } 70 +.icon-fangxingxuanzhongfill:before {
  71 + content: "\e721";
  72 +}
51 73
52 -.icon-bianji:before { content: "\e6b4"; } 74 +.icon-bianji:before {
  75 + content: "\e6b4";
  76 +}
53 77
54 -.icon-zhaoxiangji1:before { content: "\e663"; } 78 +.icon-zhaoxiangji1:before {
  79 + content: "\e663";
  80 +}
55 81
56 -.icon-guanyuwomen:before { content: "\e61e"; } 82 +.icon-xuanzhong2:before {
  83 + content: "\e62b";
  84 +}
57 85
58 -.icon-ren-copy:before { content: "\e600"; } 86 +.icon-guanyuwomen:before {
  87 + content: "\e61e";
  88 +}
59 89
60 -.icon-xuanzhong:before { content: "\e61a"; } 90 +.icon-ren-copy:before {
  91 + content: "\e600";
  92 +}
61 93
62 -.icon-artboard61:before { content: "\e788"; } 94 +.icon-xuanzhong:before {
  95 + content: "\e61a";
  96 +}
63 97
64 -.icon-jinru:before { content: "\e618"; } 98 +.icon-artboard61:before {
  99 + content: "\e788";
  100 +}
65 101
66 -.icon-kehu:before { content: "\e613"; } 102 +.icon-jinru:before {
  103 + content: "\e618";
  104 +}
67 105
68 -.icon-jiating1:before { content: "\e81d"; } 106 +.icon-kehu:before {
  107 + content: "\e613";
  108 +}
69 109
70 -.icon-wuuiconxiangjifangda:before { content: "\e623"; } 110 +.icon-jiating1:before {
  111 + content: "\e81d";
  112 +}
71 113
72 -.icon-guwen:before { content: "\e61d"; } 114 +.icon-wuuiconxiangjifangda:before {
  115 + content: "\e623";
  116 +}
73 117
74 -.icon-tianjia:before { content: "\e648"; } 118 +.icon-guwen:before {
  119 + content: "\e61d";
  120 +}
75 121
76 -.icon-xiala:before { content: "\e619"; } 122 +.icon-tianjia:before {
  123 + content: "\e648";
  124 +}
77 125
78 -.icon-icon-test:before { content: "\e72e"; } 126 +.icon-xiala:before {
  127 + content: "\e619";
  128 +}
79 129
80 -.icon-fangkuang:before { content: "\e629"; } 130 +.icon-icon-test:before {
  131 + content: "\e72e";
  132 +}
81 133
82 -.icon-jiating:before { content: "\e73d"; } 134 +.icon-fangkuang:before {
  135 + content: "\e629";
  136 +}
83 137
84 -.icon-jiaoyijilu:before { content: "\e638"; } 138 +.icon-jiating:before {
  139 + content: "\e73d";
  140 +}
85 141
86 -.icon-jinbi:before { content: "\e672"; } 142 +.icon-jiaoyijilu:before {
  143 + content: "\e638";
  144 +}
87 145
88 -.icon-bianji1:before { content: "\e68a"; } 146 +.icon-jinbi:before {
  147 + content: "\e672";
  148 +}
89 149
90 -.icon-mingdanguanli:before { content: "\e658"; } 150 +.icon-bianji1:before {
  151 + content: "\e68a";
  152 +}
91 153
92 -.icon-renzheng1:before { content: "\e62a"; } 154 +.icon-mingdanguanli:before {
  155 + content: "\e658";
  156 +}
93 157
94 -.icon-dkw_wode-:before { content: "\e60e"; } 158 +.icon-renzheng1:before {
  159 + content: "\e62a";
  160 +}
95 161
96 -.icon-guanbi2:before { content: "\e60f"; } 162 +.icon-dkw_wode-:before {
  163 + content: "\e60e";
  164 +}
97 165
98 -.icon-wenjian:before { content: "\e67d"; } 166 +.icon-guanbi2:before {
  167 + content: "\e60f";
  168 +}
99 169
100 -.icon-xuanzhongyuandian:before { content: "\e624"; } 170 +.icon-wenjian:before {
  171 + content: "\e67d";
  172 +}
101 173
102 -.icon-sousuo:before { content: "\e617"; } 174 +.icon-xuanzhongyuandian:before {
  175 + content: "\e624";
  176 +}
103 177
104 -.icon-xuanze:before { content: "\e6c3"; } 178 +.icon-sousuo:before {
  179 + content: "\e617";
  180 +}
  181 +
  182 +.icon-xuanze:before {
  183 + content: "\e6c3";
  184 +}
105 185
106 -.icon-sousuo1:before { content: "\e632"; } 186 +.icon-sousuo1:before {
  187 + content: "\e632";
  188 +}
107 189
108 -.icon-yuan:before { content: "\e622"; } 190 +.icon-yuan:before {
  191 + content: "\e622";
  192 +}
109 193
110 -.icon-YDUI-naozhong:before { content: "\e65d"; } 194 +.icon-YDUI-naozhong:before {
  195 + content: "\e65d";
  196 +}
111 197
112 -.icon-ren:before { content: "\e6d9"; } 198 +.icon-ren:before {
  199 + content: "\e6d9";
  200 +}
113 201
114 -.icon-ziliao:before { content: "\e603"; } 202 +.icon-ziliao:before {
  203 + content: "\e603";
  204 +}
115 205
116 -.icon-kehuguanli-copy-copy:before { content: "\e63a"; } 206 +.icon-kehuguanli-copy-copy:before {
  207 + content: "\e63a";
  208 +}
117 209
118 -.icon-add:before { content: "\e604"; } 210 +.icon-add:before {
  211 + content: "\e604";
  212 +}
119 213
120 -.icon-baodanxinxi:before { content: "\e602"; } 214 +.icon-baodanxinxi:before {
  215 + content: "\e602";
  216 +}
121 217
122 -.icon-hengxian1:before { content: "\e626"; } 218 +.icon-hengxian1:before {
  219 + content: "\e626";
  220 +}
123 221
124 -.icon-riqi:before { content: "\ea1a"; } 222 +.icon-riqi:before {
  223 + content: "\ea1a";
  224 +}
125 225
126 -.icon-tijian:before { content: "\e605"; } 226 +.icon-tijian:before {
  227 + content: "\e605";
  228 +}
127 229
128 -.icon-hengxian:before { content: "\e657"; } 230 +.icon-hengxian:before {
  231 + content: "\e657";
  232 +}
129 233
130 -.icon-gouwuche:before { content: "\e609"; } 234 +.icon-gouwuche:before {
  235 + content: "\e609";
  236 +}
131 237
132 -.icon-yaoqing:before { content: "\e60b"; } 238 +.icon-yaoqing:before {
  239 + content: "\e60b";
  240 +}
133 241
134 -.icon-guanbi:before { content: "\e621"; } 242 +.icon-guanbi:before {
  243 + content: "\e621";
  244 +}
135 245
136 -.icon-xiazai:before { content: "\e625"; } 246 +.icon-xiazai:before {
  247 + content: "\e625";
  248 +}
137 249
138 -.icon-fenxiang:before { content: "\e62e"; } 250 +.icon-fenxiang:before {
  251 + content: "\e62e";
  252 +}
139 253
140 -.icon-xuexi:before { content: "\e61b"; } 254 +.icon-xuexi:before {
  255 + content: "\e61b";
  256 +}
141 257
142 -.icon-baogao:before { content: "\e639"; } 258 +.icon-baogao:before {
  259 + content: "\e639";
  260 +}
143 261
144 -.icon-weixinzhifu:before { content: "\e647"; } 262 +.icon-weixinzhifu:before {
  263 + content: "\e647";
  264 +}
145 265
146 -.icon-dianhua:before { content: "\e67c"; } 266 +.icon-dianhua:before {
  267 + content: "\e67c";
  268 +}
147 269
148 -.icon-xiugai:before { content: "\e607"; } 270 +.icon-xiugai:before {
  271 + content: "\e607";
  272 +}
149 273
150 -.icon-xuanzhong1:before { content: "\e61f"; } 274 +.icon-xuanzhong1:before {
  275 + content: "\e61f";
  276 +}
151 277
152 -.icon-guanli:before { content: "\e6e3"; } 278 +.icon-guanli:before {
  279 + content: "\e6e3";
  280 +}
153 281
154 -.icon-tixian:before { content: "\e62d"; } 282 +.icon-tixian:before {
  283 + content: "\e62d";
  284 +}
155 285
156 -.icon-shang:before { content: "\e611"; } 286 +.icon-shang:before {
  287 + content: "\e611";
  288 +}
157 289
158 -.icon-rizhi:before { content: "\e614"; } 290 +.icon-rizhi:before {
  291 + content: "\e614";
  292 +}
159 293
160 -.icon-baogao1:before { content: "\e62f"; } 294 +.icon-baogao1:before {
  295 + content: "\e62f";
  296 +}
161 297
162 -.icon-jisuanqi:before { content: "\e608"; } 298 +.icon-jisuanqi:before {
  299 + content: "\e608";
  300 +}
163 301
164 -.icon-jiatingzhanghu:before { content: "\e615"; } 302 +.icon-jiatingzhanghu:before {
  303 + content: "\e615";
  304 +}
165 305
166 -.icon-shuoming:before { content: "\e633"; } 306 +.icon-shuoming:before {
  307 + content: "\e633";
  308 +}
167 309
168 -.icon-nav:before { content: "\e601"; } 310 +.icon-nav:before {
  311 + content: "\e601";
  312 +}
169 313
170 -.icon-xuanzhongkuang:before { content: "\e628"; } 314 +.icon-xuanzhongkuang:before {
  315 + content: "\e628";
  316 +}
171 317
172 -.icon-ling:before { content: "\e8bf"; } 318 +.icon-ling:before {
  319 + content: "\e8bf";
  320 +}
173 321
174 -.icon-dianhua2:before { content: "\e649"; } 322 +.icon-dianhua2:before {
  323 + content: "\e649";
  324 +}
175 325
176 -.icon-fangan:before { content: "\e60c"; } 326 +.icon-fangan:before {
  327 + content: "\e60c";
  328 +}
177 329
178 -.icon-fenxiang1:before { content: "\e634"; } 330 +.icon-fenxiang1:before {
  331 + content: "\e634";
  332 +}
179 333
180 -.icon-gray-crown:before { content: "\e60d"; } 334 +.icon-gray-crown:before {
  335 + content: "\e60d";
  336 +}
181 337
182 -.icon-shanchu1:before { content: "\e616"; } 338 +.icon-shanchu1:before {
  339 + content: "\e616";
  340 +}
183 341
184 -.icon-kakou:before { content: "\e660"; } 342 +.icon-kakou:before {
  343 + content: "\e660";
  344 +}
185 345
186 -.icon-shezhi:before { content: "\e610"; } 346 +.icon-shezhi:before {
  347 + content: "\e610";
  348 +}
187 349
188 -.icon-jianyi:before { content: "\e696"; } 350 +.icon-jianyi:before {
  351 + content: "\e696";
  352 +}
189 353
190 -.icon-zhuanfa:before { content: "\e783"; } 354 +.icon-zhuanfa:before {
  355 + content: "\e783";
  356 +}
191 357
192 -.icon-shanchu:before { content: "\e67b"; } 358 +.icon-shanchu:before {
  359 + content: "\e67b";
  360 +}
193 361
194 -.icon-danjiantou:before { content: "\e612"; } 362 +.icon-danjiantou:before {
  363 + content: "\e612";
  364 +}
@@ -10,6 +10,8 @@ Page({ @@ -10,6 +10,8 @@ Page({
10 GoId: '', //分享人id 10 GoId: '', //分享人id
11 articleDetail: [], //文章详情内容 11 articleDetail: [], //文章详情内容
12 share_num: '', 12 share_num: '',
  13 + UserId:'',
  14 + UserType:''
13 }, 15 },
14 //文章详情 16 //文章详情
15 listDetail() { 17 listDetail() {
@@ -33,6 +35,22 @@ Page({ @@ -33,6 +35,22 @@ Page({
33 }) 35 })
34 }, 36 },
35 37
  38 +//注册顾问
  39 + goRegister(){
  40 + wx.navigateTo({
  41 + url: '/pages/index/register/register',
  42 + })
  43 + },
  44 +
  45 + //查看顾问详情
  46 + goDetail(e){
  47 + var CounselorId = this.data.GoId
  48 + console.log(222, CounselorId)
  49 + wx.navigateTo({
  50 + url: '/pages/index/editProfile2/editProfile2?CounselorId=' + CounselorId,
  51 + })
  52 + },
  53 +
36 //有奖分享 54 //有奖分享
37 prizeshare() { 55 prizeshare() {
38 var that = this; 56 var that = this;
@@ -69,9 +87,13 @@ Page({ @@ -69,9 +87,13 @@ Page({
69 * 生命周期函数--监听页面加载 87 * 生命周期函数--监听页面加载
70 */ 88 */
71 onLoad: function(options) { 89 onLoad: function(options) {
  90 + console.log(options.GoId)
72 let that = this; 91 let that = this;
73 that.setData({ 92 that.setData({
74 - NewsId: options.NewsId 93 + NewsId: options.NewsId,
  94 + UserId:app.globalData.UserId,
  95 + GoId: options.GoId,
  96 + UserType:app.globalData.UserType
75 }) 97 })
76 that.listDetail(); 98 that.listDetail();
77 99
@@ -88,7 +110,7 @@ Page({ @@ -88,7 +110,7 @@ Page({
88 * 生命周期函数--监听页面显示 110 * 生命周期函数--监听页面显示
89 */ 111 */
90 onShow: function() { 112 onShow: function() {
91 - 113 + // this.listDetail()
92 }, 114 },
93 115
94 /** 116 /**
@@ -122,30 +144,39 @@ Page({ @@ -122,30 +144,39 @@ Page({
122 /** 144 /**
123 * 用户点击右上角分享 145 * 用户点击右上角分享
124 */ 146 */
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 - } 147 + onShareAppMessage: function (options) {
  148 + console.log(options)
  149 + this.prizeshare()
  150 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  151 + var shareObj = {
  152 + title: options.target.dataset.title, // 默认是小程序的名称(可以写slogan等)
  153 + path: '/pages/start/start?status=' + options.target.dataset.status + '&GoId=' + app.globalData.UserId, // 默认是当前页面,必须是以‘/’开头的完整路径
  154 + imgUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  155 + success: function (res) {
  156 + // 转发成功之后的回调
  157 + if (res.errMsg == 'shareAppMessage:ok') { }
  158 + },
  159 + fail: function () {
  160 + // 转发失败之后的回调
  161 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  162 + // 用户取消转发
  163 + } else if (res.errMsg == 'shareAppMessage:fail') {
  164 + // 转发失败,其中 detail message 为详细失败信息
  165 + }
  166 + },
  167 + complete: function () {
  168 + // 转发结束之后的回调(转发成不成功都会执行)
  169 + }
  170 + }   // 来自页面内的按钮的转发
  171 +
  172 + if (options.from == 'button') {
  173 + // var eData = options.target.dataset;
  174 + // console.log(eData.name); // shareBtn
  175 + // 此处可以修改 shareObj 中的内容
  176 + shareObj.path = '/pages/start/start?status=' + options.target.dataset.status
  177 + }   // 返回shareObj
  178 +
  179 + return shareObj;
  180 + }
150 181
151 }) 182 })
@@ -11,30 +11,25 @@ @@ -11,30 +11,25 @@
11 </view> 11 </view>
12 <view class='banner_box' wx:if="{{GoId!=''}}"> 12 <view class='banner_box' wx:if="{{GoId!=''}}">
13 <view class='head_img'> 13 <view class='head_img'>
14 - <image src='/images/img2.png'></image> 14 + <image src='{{articleDetail.user.picurl}}'></image>
15 </view> 15 </view>
16 <view class='head_info_box'> 16 <view class='head_info_box'>
17 - <view class='user_name'>苏菀菁</view>  
18 - <view>15869584682</view>  
19 - <view>某某机构</view>  
20 - <view>某某职业</view> 17 + <view class='user_name'>{{articleDetail.user.name}}</view>
  18 + <view>{{articleDetail.user.mobile}}</view>
  19 + <view>{{articleDetail.user.work}}</view>
  20 + <view>{{articleDetail.user.work_post}}</view>
21 </view> 21 </view>
22 - <view class='edit_box'> 22 + <view class='edit_box' bindtap='goDetail'>
23 <view>查看详情</view> 23 <view>查看详情</view>
24 </view> 24 </view>
25 - <view class='banner_info'>我要开通名片功能</view> 25 + <view class='banner_info' wx:if='{{UserType!=3}}' bindtap='goRegister'>我要开通名片功能</view>
26 </view> 26 </view>
27 <view class='list_content'> 27 <view class='list_content'>
28 - <!-- <view>八月的阳光下,蝉隐去鸣噪,只剩下天空,纯净如水一样湛蓝,八月的浓绿,连接着真情与彩虹,连接着嫩绿与金黄;八月的激情,连接着幼稚与成熟,连接着真诚和永恒;八月的力度,连接着单一与和谐,连接着平安与幸福。八月,岂止是绿的画、情的诗、力的歌,它更是花粉朋友们一个美好的回忆!下面是关于八月的精美随拍,欢迎欣赏!</view>  
29 - <view> 文章详情标题字号大小为40号,行高72px; 正文字号大小为30号,行高56px。</view> -->  
30 -  
31 <template is="wxParse" data="{{wxParseData:content.nodes}}" /> 28 <template is="wxParse" data="{{wxParseData:content.nodes}}" />
32 -  
33 -  
34 </view> 29 </view>
35 30
36 - <view class='bottom_box' >  
37 - <button open-type='share'></button> 31 + <view class='bottom_box'>
  32 + <button data-status="{{articleDetail.status}}" data-title='{{articleDetail.title}}' open-type='share'></button>
38 <text class='iconfont icon-zhuanfa'></text> 33 <text class='iconfont icon-zhuanfa'></text>
39 <text>转发</text> 34 <text>转发</text>
40 </view> 35 </view>
@@ -80,7 +80,7 @@ @@ -80,7 +80,7 @@
80 } 80 }
81 81
82 .list_info_box { 82 .list_info_box {
83 - font-size: 24rpx; 83 + font-size: 28rpx;
84 color: #97a0a8; 84 color: #97a0a8;
85 margin-bottom: 30rpx; 85 margin-bottom: 30rpx;
86 } 86 }
@@ -7,11 +7,13 @@ Page({ @@ -7,11 +7,13 @@ Page({
7 */ 7 */
8 data: { 8 data: {
9 currentTab: 2, 9 currentTab: 2,
10 - Status:'',  
11 - KeyWord:'',  
12 - list:'' 10 + Status: '',
  11 + KeyWord: '',
  12 + list: '',
  13 + mainid: '',
  14 + vip_state: false
13 }, 15 },
14 - 16 +
15 //点击切换 17 //点击切换
16 tabCharge(e) { 18 tabCharge(e) {
17 var that = this; 19 var that = this;
@@ -50,50 +52,80 @@ Page({ @@ -50,50 +52,80 @@ Page({
50 title: '会员到期,请充值', 52 title: '会员到期,请充值',
51 icon: 'none' 53 icon: 'none'
52 }, 2000) 54 }, 2000)
53 - wx.navigateTo({  
54 - url: '../../my/recharge/recharge', 55 + that.setData({
  56 + vip_state: false
55 }) 57 })
56 } else if (res.data.data.type == '-12') { 58 } else if (res.data.data.type == '-12') {
57 wx.showToast({ 59 wx.showToast({
58 title: '您已经被禁用,请联系管理员', 60 title: '您已经被禁用,请联系管理员',
59 icon: 'none' 61 icon: 'none'
60 }, 2000) 62 }, 2000)
  63 + that.setData({
  64 + vip_state: false
  65 + })
61 } else if (res.data.data.type == '-11') { 66 } else if (res.data.data.type == '-11') {
62 wx.showToast({ 67 wx.showToast({
63 title: '您的权限不足', 68 title: '您的权限不足',
64 icon: 'none' 69 icon: 'none'
65 }, 2000) 70 }, 2000)
66 - } else { 71 + that.setData({
  72 + vip_state: false
  73 + })
  74 + } else if (res.data.data.type == '1') {
67 that.setData({ 75 that.setData({
68 list: res.data.data.list, 76 list: res.data.data.list,
69 - cid: res.data.data.list[0].users[0].cid,  
70 - KeyWord: '' 77 + // cid: res.data.data.list[0].users[0].cid,
  78 + KeyWord: '',
  79 + vip_state: true
71 }) 80 })
  81 + if (res.data.data.list[0].users[0].cid != '') {
  82 + that.setData({
  83 + cid: res.data.data.list[0].users[0].cid,
  84 + })
  85 + }
72 } 86 }
73 } 87 }
74 -  
75 }).catch((errMsg) => { 88 }).catch((errMsg) => {
76 // console.log(errMsg) 89 // console.log(errMsg)
77 }) 90 })
78 }, 91 },
79 92
80 //家庭信息 93 //家庭信息
81 - familyData() { 94 + familyData(e) {
  95 + var that = this
  96 + let familyid = e.currentTarget.dataset.familyid;
  97 + let list = that.data.list;
  98 + // console.log(list)
  99 + for (let items of list) {
  100 + if (items.family_id == familyid) {
  101 + for (let j in items.users) {
  102 + if (items.users[j].user_family == 1) {
  103 + that.setData({
  104 + mainid: items.users[j].id, //户主ID
  105 + cid: items.users[j].cid //顾问ID
  106 + })
  107 + }
  108 + }
  109 + }
  110 + }
82 wx.navigateTo({ 111 wx.navigateTo({
83 - url: '../remind/remind', 112 + url: '../remind/remind?cid=' + this.data.cid + '&mainid=' + this.data.mainid,
84 }) 113 })
85 }, 114 },
86 115
87 //个人信息详情 116 //个人信息详情
88 - infoDetail() { 117 + infoDetail(e) {
  118 + // wx.navigateTo({
  119 + // url: '../personInfo/personInfo?DefId=' + e.currentTarget.dataset.id,
  120 + // })
89 wx.navigateTo({ 121 wx.navigateTo({
90 - url: '../personInfo/personInfo', 122 + url: '/pages/index/EntryInformation2/EntryInformation2?DefId=' + e.currentTarget.dataset.id,
91 }) 123 })
92 }, 124 },
93 125
94 //创建新家庭 126 //创建新家庭
95 addFamily() { 127 addFamily() {
96 - var flag=true 128 + var flag = true
97 wx.navigateTo({ 129 wx.navigateTo({
98 url: '../addNewFamily/addNewFamily?flag=' + flag, 130 url: '../addNewFamily/addNewFamily?flag=' + flag,
99 }) 131 })
@@ -106,6 +138,7 @@ Page({ @@ -106,6 +138,7 @@ Page({
106 url: '../addNewFamily/addNewFamily?familyid=' + familyid, 138 url: '../addNewFamily/addNewFamily?familyid=' + familyid,
107 }) 139 })
108 }, 140 },
  141 +
109 /** 142 /**
110 * 生命周期函数--监听页面加载 143 * 生命周期函数--监听页面加载
111 */ 144 */
@@ -124,7 +157,7 @@ Page({ @@ -124,7 +157,7 @@ Page({
124 * 生命周期函数--监听页面显示 157 * 生命周期函数--监听页面显示
125 */ 158 */
126 onShow: function() { 159 onShow: function() {
127 - 160 + this.getdata()
128 }, 161 },
129 162
130 /** 163 /**
@@ -16,15 +16,16 @@ @@ -16,15 +16,16 @@
16 </view> 16 </view>
17 <view class='item_list' wx:for='{{list}}' wx:key=''> 17 <view class='item_list' wx:for='{{list}}' wx:key=''>
18 <view class='list_left_box'> 18 <view class='list_left_box'>
19 - <view class='list_label_box' bindtap='familyData'> 19 + <view class='list_label_box' bindtap='familyData' data-familyid='{{item.family_id}}'>
20 <view class='iconfont icon-jiating1'></view> 20 <view class='iconfont icon-jiating1'></view>
21 <view>跟踪提醒</view> 21 <view>跟踪提醒</view>
22 <text class='iconfont icon-yuan label_icon' wx:if='{{item.warn_status==1}}'></text> 22 <text class='iconfont icon-yuan label_icon' wx:if='{{item.warn_status==1}}'></text>
23 </view> 23 </view>
24 <view class='list_label_item'> 24 <view class='list_label_item'>
25 - <view class='label_item' wx:for='{{item.users}}' wx:for-item='user' wx:key='' data-family_id='{{user.family_id}}' bindtap='infoDetail'> 25 + <view class='label_item' wx:for='{{item.users}}' wx:for-item='user' wx:key='' data-id='{{user.id}}' bindtap='infoDetail'>
26 <text>{{user.name}}({{user.family_role}})</text> 26 <text>{{user.name}}({{user.family_role}})</text>
27 - <text class='iconfont icon-yuan '></text> 27 + <text class='iconfont icon-yuan' wx:if='{{user.user_family==1}}'></text>
  28 + <text class='iconfont icon-yuan user_point' wx:if='{{user.key_status==1}}'></text>
28 </view> 29 </view>
29 <!-- <view class='label_item'> 30 <!-- <view class='label_item'>
30 <text>曹文正(爸爸)</text> 31 <text>曹文正(爸爸)</text>
@@ -37,7 +38,7 @@ @@ -37,7 +38,7 @@
37 </view> 38 </view>
38 </view> 39 </view>
39 <view class='list_right_box'> 40 <view class='list_right_box'>
40 - <view class='list_btn_box' bindtap='addPerson' data-familyid='{{item.family_id}}'> 41 + <view class='list_btn_box' bindtap="{{vip_state?'addPerson':''}}" data-familyid='{{item.family_id}}'>
41 <view class='list_btn'> 42 <view class='list_btn'>
42 <view class='iconfont icon-shezhi'></view> 43 <view class='iconfont icon-shezhi'></view>
43 </view> 44 </view>
@@ -47,6 +48,6 @@ @@ -47,6 +48,6 @@
47 </view> 48 </view>
48 <view class='null_box'></view> 49 <view class='null_box'></view>
49 <view class='bottom'> 50 <view class='bottom'>
50 - <view class='bottom_box' bindtap='addFamily'>创建新家庭</view> 51 + <view class='bottom_box' bindtap="{{vip_state?'addFamily':''}}">创建新家庭</view>
51 </view> 52 </view>
52 </view> 53 </view>
@@ -91,6 +91,7 @@ @@ -91,6 +91,7 @@
91 } 91 }
92 92
93 .list_left_box { 93 .list_left_box {
  94 + width: 87%;
94 display: flex; 95 display: flex;
95 align-items: flex-start; 96 align-items: flex-start;
96 } 97 }
@@ -39,7 +39,7 @@ Page({ @@ -39,7 +39,7 @@ Page({
39 39
40 //名字 40 //名字
41 setName(e) { 41 setName(e) {
42 - console.log(e) 42 + // console.log(e)
43 var list = this.data.list; 43 var list = this.data.list;
44 list.name = e.detail.value; 44 list.name = e.detail.value;
45 this.setData({ 45 this.setData({
@@ -172,7 +172,7 @@ Page({ @@ -172,7 +172,7 @@ Page({
172 let url = 'counselor/DefAdd'; 172 let url = 'counselor/DefAdd';
173 let params = {} 173 let params = {}
174 app.post(url, params).then((res) => { 174 app.post(url, params).then((res) => {
175 - console.log(res) 175 + // console.log(res)
176 if (res.data.code == 200) { 176 if (res.data.code == 200) {
177 var list = this.data.list 177 var list = this.data.list
178 that.setData({ 178 that.setData({
@@ -186,14 +186,21 @@ Page({ @@ -186,14 +186,21 @@ Page({
186 186
187 //选择用户标签 187 //选择用户标签
188 selectLabel(e) { 188 selectLabel(e) {
  189 + var mindex = e.currentTarget.dataset.mindex
  190 + var sindex = e.currentTarget.dataset.sindex
189 var list = this.data.list 191 var list = this.data.list
190 var id = e.currentTarget.dataset.id 192 var id = e.currentTarget.dataset.id
191 - var label_ids = this.data.label_ids  
192 - label_ids.push(id)  
193 var status = e.currentTarget.dataset.status 193 var status = e.currentTarget.dataset.status
194 var label_list = this.data.label_list 194 var label_list = this.data.label_list
195 - var mindex = e.currentTarget.dataset.mindex  
196 - var sindex = e.currentTarget.dataset.sindex 195 + var label_ids = this.data.label_ids;
  196 +
  197 + //去重
  198 + const add = label_ids.every((label_ids) => {
  199 + return label_ids != id
  200 + })
  201 + if (add) {
  202 + label_ids.push(id)
  203 + }
197 label_list[mindex].data[sindex].status = !(label_list[mindex].data[sindex].status) 204 label_list[mindex].data[sindex].status = !(label_list[mindex].data[sindex].status)
198 this.setData({ 205 this.setData({
199 label_list: label_list, 206 label_list: label_list,
@@ -247,9 +254,10 @@ Page({ @@ -247,9 +254,10 @@ Page({
247 var flag = true; 254 var flag = true;
248 var state = that.data.state 255 var state = that.data.state
249 var list = this.data.list; 256 var list = this.data.list;
  257 + console.log(list.sex, list.sex == '')
250 if (list.name == "") { 258 if (list.name == "") {
251 warn = "请填写您的姓名"; 259 warn = "请填写您的姓名";
252 - } else if (list.sex == '') { 260 + } else if (list.sex !=0 && list.sex!=1) {
253 warn = "请填写您的性别"; 261 warn = "请填写您的性别";
254 } else if (list.family_role == '') { 262 } else if (list.family_role == '') {
255 warn = '请填写您的家庭角色' 263 warn = '请填写您的家庭角色'
@@ -270,7 +278,7 @@ Page({ @@ -270,7 +278,7 @@ Page({
270 mid: list.mid, 278 mid: list.mid,
271 user_status: list.user_status, 279 user_status: list.user_status,
272 status_num: list.status_num, 280 status_num: list.status_num,
273 - picurl: list.picurl, 281 + picurl: this.data.hasimg,
274 text: list.text, 282 text: list.text,
275 label_ids: this.data.label_ids, 283 label_ids: this.data.label_ids,
276 family_id: that.data.familyid, 284 family_id: that.data.familyid,
@@ -321,16 +329,17 @@ Page({ @@ -321,16 +329,17 @@ Page({
321 var label_ids = this.data.label_ids 329 var label_ids = this.data.label_ids
322 var label_list = res.data.data.label_list 330 var label_list = res.data.data.label_list
323 for (var i = 0; i < label_list.length; i++) { 331 for (var i = 0; i < label_list.length; i++) {
324 - console.log(label_list[i].data.length)  
325 for (var j = 0; j < label_list[i].data.length; j++) { 332 for (var j = 0; j < label_list[i].data.length; j++) {
326 if (label_list[i].data[j].status == 1) { 333 if (label_list[i].data[j].status == 1) {
327 label_ids.push(label_list[i].data[j].id) 334 label_ids.push(label_list[i].data[j].id)
328 } 335 }
329 } 336 }
330 } 337 }
331 - 338 + var list = res.data.data.list;
  339 + list.sex = res.data.data.list.sex;
  340 + console.log(list.sex)
332 that.setData({ 341 that.setData({
333 - list: res.data.data.list, 342 + list: list,
334 label_list: res.data.data.label_list, 343 label_list: res.data.data.label_list,
335 sex_index: res.data.data.list.sex, 344 sex_index: res.data.data.list.sex,
336 card_index: parseInt(res.data.data.list.user_status) - 1, 345 card_index: parseInt(res.data.data.list.user_status) - 1,
@@ -49,8 +49,8 @@ @@ -49,8 +49,8 @@
49 <text>出生日期</text> 49 <text>出生日期</text>
50 </view> 50 </view>
51 <view class='list_input'> 51 <view class='list_input'>
52 - <picker class='picker' mode="date" value='{{list.birthday }}' bindchange='birthDate'>  
53 - <input placeholder='请选择出生日期' value='{{list.birthday }}' disabled='true'></input> 52 + <picker class='picker' mode="date" value='{{list.birthday}}' bindchange='birthDate'>
  53 + <input placeholder='请选择出生日期' value='{{list.birthday}}' disabled='true'></input>
54 </picker> 54 </picker>
55 </view> 55 </view>
56 </view> 56 </view>
@@ -104,7 +104,7 @@ @@ -104,7 +104,7 @@
104 </view> 104 </view>
105 <view bindtap='chooseImg' wx:else> 105 <view bindtap='chooseImg' wx:else>
106 <view class='iconfont icon-add'></view> 106 <view class='iconfont icon-add'></view>
107 - <view>请上传清晰的保单照片</view> 107 + <view>上传客户照片</view>
108 </view> 108 </view>
109 </view> 109 </view>
110 </view> 110 </view>
@@ -120,14 +120,14 @@ @@ -120,14 +120,14 @@
120 <view class='item_list'> 120 <view class='item_list'>
121 <view class='list_title'>添加用户标签</view> 121 <view class='list_title'>添加用户标签</view>
122 </view> 122 </view>
123 - <view class='item_list item_label_box' wx:for='{{label_list}}' wx:key='' data-Mindex='{{index}}'> 123 + <view class='item_list item_label_box' wx:for='{{label_list}}' wx:key='' wx:for-index='mindex'>
124 <view class='list_label_title'>{{item.label}} </view> 124 <view class='list_label_title'>{{item.label}} </view>
125 <view class='list_label'> 125 <view class='list_label'>
126 - <view class="address_btn {{item.status?'unit_address':''}}" data-id='{{item.id}}' data-status='{{item.status}}' wx:for='{{item.data}}' wx:key='' data-Sindex='{{index}}' data-Mindex='{{index}}' bindtap='selectLabel'>{{item.name}}</view> 126 + <view class="address_btn {{sub_its.status?'unit_address':''}}" data-id='{{sub_its.id}}' data-status='{{sub_its.status}}' wx:for='{{item.data}}' wx:for-item='sub_its' wx:key='' wx:for-index='sindex' data-sindex='{{sindex}}' data-mindex='{{mindex}}' bindtap='selectLabel'>{{sub_its.name}}</view>
127 </view> 127 </view>
128 </view> 128 </view>
129 </view> 129 </view>
130 - 130 +
131 <!-- 底部按钮 --> 131 <!-- 底部按钮 -->
132 <view class='null_box'></view> 132 <view class='null_box'></view>
133 <view class='bottom_box'> 133 <view class='bottom_box'>
1 // pages/Program/Program.js 1 // pages/Program/Program.js
2 -const app=getApp(); 2 +const app = getApp();
3 Page({ 3 Page({
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) { 8 + list: [],
  9 + temobj: {
  10 + name: '',
  11 + firm: '',
  12 + text: '',
  13 + last_state: true,
  14 + add_state: false,
  15 + input_stete:false
  16 + },
  17 +
  18 + },
  19 +
  20 + //获取预设方案列表
  21 + getlist() {
  22 + let that = this;
  23 + // var list=this.data.list
  24 + // list.push({
  25 + // name: '',
  26 + // firm: '',
  27 + // text: '',
  28 + // id: 0,
  29 + // last_state: true
  30 + // })
  31 + // that.setData({
  32 + // list: list
  33 + // })
  34 + let url = 'counselor/SchemeList';
  35 + let params = {
  36 + userId: app.globalData.UserId
  37 + }
  38 + app.post(url, params).then((res) => {
  39 + console.log(res)
  40 + if (res.data.code == 200) {
  41 + var list = res.data.data.list
  42 + if (list.length == 0) {
  43 + list.push({
  44 + name: '',
  45 + firm: '',
  46 + text: '',
  47 + id: 0,
  48 + last_state: true
  49 + })
  50 + that.setData({
  51 + list: list
  52 + })
  53 + } else {
  54 + that.setData({
  55 + list: res.data.data.list
  56 + })
  57 + }
  58 + that.getLength()
  59 + }
  60 + }).catch((err) => {
  61 + // console.log(err)
  62 + })
  63 + },
  64 +
  65 + //设置名字
  66 + setName(e) {
  67 + let that = this;
  68 + let list = that.data.list;
  69 + let index = e.currentTarget.dataset.index;
  70 + list[index].name = e.detail.value;
23 that.setData({ 71 that.setData({
24 - list: res.data.data.list 72 + list: list
25 }) 73 })
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 - } 74 + },
  75 +
  76 + //设置公司名
  77 + setFirm(e) {
  78 + let that = this;
  79 + let list = that.data.list;
  80 + let index = e.currentTarget.dataset.index;
  81 + list[index].firm = e.detail.value;
111 that.setData({ 82 that.setData({
112 - temobj: temobj 83 + list: list
113 }) 84 })
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 - }  
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, 85 + },
  86 +
  87 + //保障内容
  88 + setText(e) {
  89 + let that = this;
  90 + let list = that.data.list;
  91 + let index = e.currentTarget.dataset.index;
  92 + list[index].text = e.detail.value;
  93 + that.setData({
  94 + list: list
  95 + })
  96 + },
  97 +
  98 + //添加方案
  99 + addPlan(e) {
  100 + let that = this;
  101 + let list = that.data.list;
  102 + let index = e.currentTarget.dataset.index;
  103 + list[index].add_state = false
  104 + list[index].input_stete=true
  105 + this.setData({
  106 + list: list
168 }) 107 })
169 - setTimeout(function(){  
170 - wx.navigateBack({  
171 - delta: 1  
172 - })  
173 - },1000)  
174 - }else{  
175 let url = 'counselor/SchemeSave'; 108 let url = 'counselor/SchemeSave';
176 let params = { 109 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 110 + userId: app.globalData.UserId,
  111 + schemeId: e.currentTarget.dataset.id,
  112 + name: list[index].name,
  113 + firm: list[index].firm,
  114 + text: list[index].text
182 } 115 }
183 app.post(url, params).then((res) => { 116 app.post(url, params).then((res) => {
184 - if (res.data.code == 200) { 117 + console.log(res)
  118 + if (res.data.code == 200) {
  119 + list.push({
  120 + name: '',
  121 + firm: '',
  122 + text: '',
  123 + id: 0,
  124 + last_state: true,
  125 + add_state: false,
  126 + input_stete:false
  127 + })
  128 + that.setData({
  129 + list: list
  130 + })
  131 + that.getLength2();
  132 + }
  133 + })
  134 + },
185 135
186 - }  
187 - }).catch((err) => {  
188 - console.log(err) 136 + getLength() {
  137 + var list = this.data.list
  138 + list[list.length - 1].add_state = true
  139 + for (var obj in list) {
  140 + if (obj == list.length - 1) {
  141 + list[list.length - 1].last_state = false
  142 + } else {
  143 + list[obj].last_state = true
  144 + }
  145 + }
  146 + this.setData({
  147 + list: list
189 }) 148 })
190 - }  
191 - }  
192 - }, 149 + },
  150 +
  151 + getLength2() {
  152 + // this.getlist()
  153 + var list = this.data.list
  154 + list[list.length - 1].add_state = true
  155 + for (var obj in list) {
  156 + if (obj == list.length - 1) {
  157 + list[list.length - 1].last_state = false
  158 + } else {
  159 + list[obj].last_state = true
  160 + }
  161 + }
  162 + this.setData({
  163 + list: list
  164 + })
  165 +
  166 + },
  167 +
  168 + //保存按钮
  169 + del(e) {
  170 + let that = this;
  171 + let index = e.currentTarget.dataset.index;
  172 + let list = that.data.list;
  173 + let id = e.currentTarget.dataset.id;
  174 + if (list.length != 1) {
  175 + wx.showModal({
  176 + title: '提示',
  177 + content: '是否删除预设方案',
  178 + cancelColor: '#000000',
  179 + confirmColor: '#3cc51f',
  180 + showCancel: true,
  181 + cancelText: '取消',
  182 + confirmText: '确定',
  183 + success(res) {
  184 + if (res.confirm) {
  185 + let url = 'counselor/SchemeDelete';
  186 + let params = {
  187 + SchemeId: id
  188 + }
  189 + app.post(url, params).then((res) => {
  190 + // console.log(res)
  191 + that.getlist();
  192 + })
  193 + } else if (res.cancel) {
  194 + // console.log('用户点击取消')
  195 + }
  196 + }
  197 + })
  198 + } else {
  199 + this.setData({
  200 + last_state: false
  201 + })
  202 + }
  203 + },
  204 +
  205 +
  206 + settemname(e) {
  207 + let that = this;
  208 + let temobj = that.data.temobj;
  209 + temobj.name = e.detail.value;
  210 + that.setData({
  211 + temobj: temobj
  212 + })
  213 + },
  214 +
  215 + settemfirm(e) {
  216 + let that = this;
  217 + let temobj = that.data.temobj;
  218 + temobj.firm = e.detail.value;
  219 + that.setData({
  220 + temobj: temobj
  221 + })
  222 + },
  223 +
  224 + settemtext(e) {
  225 + let that = this;
  226 + let temobj = that.data.temobj;
  227 + temobj.text = e.detail.value;
  228 + that.setData({
  229 + temobj: temobj
  230 + })
  231 + },
  232 +
  233 + deltemobj() {
  234 + let that = this;
  235 + let temobj = {
  236 + name: '',
  237 + firm: '',
  238 + text: '',
  239 + }
  240 + that.setData({
  241 + temobj: temobj
  242 + })
  243 + },
  244 +
  245 +
  246 +
  247 + //保存所有
  248 + allsave() {
  249 + let that = this;
  250 + let list = this.data.list;
  251 + console.log(list[list.length - 1].name)
  252 + if (list[list.length - 1].name != '' && list[list.length - 1].id == 0) {
  253 + let url = 'counselor/SchemeSave';
  254 + let params = {
  255 + userId: app.globalData.UserId,
  256 + schemeId: 0,
  257 + name: list[list.length - 1].name,
  258 + firm: list[list.length - 1].firm,
  259 + text: list[list.length - 1].text
  260 + }
  261 + app.post(url, params).then((res) => {
  262 + if (res.data.code == 200) {
  263 + // wx.showToast({
  264 + // title: '添加成功',
  265 + // })
  266 + wx.navigateBack({
  267 + delta: 1
  268 + })
  269 + }
  270 +
  271 + })
  272 + } else {
  273 + list.pop()
  274 + that.setData({
  275 + list: list
  276 + })
  277 + }
  278 + that.getlist();
  279 + console.log(that.data.list)
  280 + },
193 281
194 /** 282 /**
195 * 生命周期函数--监听页面加载 283 * 生命周期函数--监听页面加载
196 */ 284 */
197 - onLoad: function (options) {  
198 - let that=this;  
199 - that.getlist(); 285 + onLoad: function(options) {
  286 + let that = this;
  287 + that.getlist();
  288 +
200 }, 289 },
201 - 290 +
202 /** 291 /**
203 * 生命周期函数--监听页面初次渲染完成 292 * 生命周期函数--监听页面初次渲染完成
204 */ 293 */
205 - onReady: function () { 294 + onReady: function() {
206 295
207 }, 296 },
208 297
209 /** 298 /**
210 * 生命周期函数--监听页面显示 299 * 生命周期函数--监听页面显示
211 */ 300 */
212 - onShow: function () {  
213 - let that = this;  
214 - that.getlist(); 301 + onShow: function() {
  302 + let that = this;
  303 + that.getlist();
215 }, 304 },
216 305
217 /** 306 /**
218 * 生命周期函数--监听页面隐藏 307 * 生命周期函数--监听页面隐藏
219 */ 308 */
220 - onHide: function () { 309 + onHide: function() {
221 310
222 }, 311 },
223 312
224 /** 313 /**
225 * 生命周期函数--监听页面卸载 314 * 生命周期函数--监听页面卸载
226 */ 315 */
227 - onUnload: function () { 316 + onUnload: function() {
228 317
229 }, 318 },
230 319
231 /** 320 /**
232 * 页面相关事件处理函数--监听用户下拉动作 321 * 页面相关事件处理函数--监听用户下拉动作
233 */ 322 */
234 - onPullDownRefresh: function () { 323 + onPullDownRefresh: function() {
235 324
236 }, 325 },
237 326
238 /** 327 /**
239 * 页面上拉触底事件的处理函数 328 * 页面上拉触底事件的处理函数
240 */ 329 */
241 - onReachBottom: function () { 330 + onReachBottom: function() {
242 331
243 }, 332 },
244 333
245 /** 334 /**
246 * 用户点击右上角分享 335 * 用户点击右上角分享
247 */ 336 */
248 - onShareAppMessage: function () { 337 + onShareAppMessage: function() {
249 338
250 } 339 }
251 }) 340 })
1 <!--pages/Program/Program.wxml--> 1 <!--pages/Program/Program.wxml-->
2 -<view class='line_box'></view>  
3 <view wx:for='{{list}}' wx:key> 2 <view wx:for='{{list}}' wx:key>
  3 + <view class='line_box'></view>
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='请输入产品名称' value='{{item.name}}' bindinput='setmame'  
9 - data-index='{{index}}'></input> 8 + <input placeholder='请输入产品名称' value='{{item.name}}' bindinput='setName' data-index='{{index}}' placeholder-class='pl_style' disabled='{{item.last_state}}'></input>
10 </view> 9 </view>
11 </view> 10 </view>
12 <view class='item_list'> 11 <view class='item_list'>
13 <view>保险公司</view> 12 <view>保险公司</view>
14 <view class='list_input'> 13 <view class='list_input'>
15 - <input placeholder='请输入保险公司' value='{{item.firm}}' bindinput='setfirm'  
16 - data-index='{{index}}'></input> 14 + <input placeholder='请输入保险公司' value='{{item.firm}}' bindinput='setFirm' data-index='{{index}}' placeholder-class='pl_style' disabled='{{item.last_state}}'></input>
17 </view> 15 </view>
18 </view> 16 </view>
19 <view class='item_list'> 17 <view class='item_list'>
20 <view>保障内容</view> 18 <view>保障内容</view>
21 <view class='list_input'> 19 <view class='list_input'>
22 - <input placeholder='请输入保障内容' value='{{item.text}}' bindinput='settext' data-index='{{index}}'></input> 20 + <textarea placeholder='请输入保障内容' value='{{item.text}}' bindinput='setText' data-index='{{index}}' placeholder-class='pl_style' disabled='{{item.last_state}}'></textarea>
23 </view> 21 </view>
24 </view> 22 </view>
25 </view> 23 </view>
26 <view class='list_btn_box'> 24 <view class='list_btn_box'>
27 - <view class='list_btn' bindtap='del' id='{{item.id}}'>删除方案</view> 25 + <view class='list_btn' bindtap='del' data-id='{{item.id}}' wx:if='{{item.last_state}}'>删除方案</view>
  26 + <view class='list_btn add_btn' bindtap='addPlan' data-id='{{item.id}}' data-index='{{index}}' wx:if='{{item.add_state}}'>添加方案</view>
28 </view> 27 </view>
29 - <view class='line_box'></view> 28 + <!-- <view class='line_box'></view> -->
30 </view> 29 </view>
31 -<view> 30 +<!-- <view wx:if='{{}}'>
32 <view class='content_box'> 31 <view class='content_box'>
33 <view class='item_list'> 32 <view class='item_list'>
34 <view>产品名称</view> 33 <view>产品名称</view>
@@ -51,9 +50,9 @@ @@ -51,9 +50,9 @@
51 </view> 50 </view>
52 <view class='list_btn_box'> 51 <view class='list_btn_box'>
53 <view class='list_btn' bindtap='deltemobj'>删除方案</view> 52 <view class='list_btn' bindtap='deltemobj'>删除方案</view>
54 - <view class='list_btn add_btn' bindtap='addtemobj'>添加方案</view> 53 + <view class='list_btn add_btn' bindtap='addtemobj'>添加方案</view>
55 </view> 54 </view>
56 -</view> 55 +</view> -->
57 <view class='bottom_box'> 56 <view class='bottom_box'>
58 <view class='save_btn' bindtap='allsave'>保存</view> 57 <view class='save_btn' bindtap='allsave'>保存</view>
59 </view> 58 </view>
1 /* pages/Program/Program.wxss */ 1 /* pages/Program/Program.wxss */
2 -page{  
3 - padding:0 0 150rpx 0; 2 +
  3 +page {
  4 + padding: 0 0 150rpx 0;
4 } 5 }
  6 +
5 .line_box { 7 .line_box {
6 width: 100%; 8 width: 100%;
7 height: 16rpx; 9 height: 16rpx;
@@ -24,17 +26,29 @@ page{ @@ -24,17 +26,29 @@ page{
24 .list_input { 26 .list_input {
25 width: 79%; 27 width: 79%;
26 margin-left: 30rpx; 28 margin-left: 30rpx;
  29 + font-size: 28rpx;
27 } 30 }
28 31
29 .list_input input { 32 .list_input input {
30 width: 100%; 33 width: 100%;
31 border: 0; 34 border: 0;
32 outline: none; 35 outline: none;
  36 + padding-bottom: 3rpx;
  37 + box-sizing: border-box;
  38 + font-size: 28rpx;
33 } 39 }
34 40
35 .list_input textarea { 41 .list_input textarea {
36 width: 100%; 42 width: 100%;
37 - min-height: 160rpx; 43 + height: 200rpx;
  44 + padding-top: 10rpx;
  45 + font-size: 28rpx;
  46 + box-sizing: border-box;
  47 +}
  48 +
  49 +.pl_style {
  50 + font-size: 28rpx;
  51 + color: #999;
38 } 52 }
39 53
40 .list_btn_box { 54 .list_btn_box {
@@ -55,12 +69,14 @@ page{ @@ -55,12 +69,14 @@ page{
55 align-items: center; 69 align-items: center;
56 justify-content: center; 70 justify-content: center;
57 } 71 }
58 -.add_btn{ 72 +
  73 +.add_btn {
59 border: 0; 74 border: 0;
60 - background: #0286FF; 75 + background: #0286ff;
61 color: #fff; 76 color: #fff;
62 margin-left: 20rpx; 77 margin-left: 20rpx;
63 } 78 }
  79 +
64 .bottom_box { 80 .bottom_box {
65 width: 100%; 81 width: 100%;
66 padding: 30rpx; 82 padding: 30rpx;
@@ -68,6 +84,8 @@ page{ @@ -68,6 +84,8 @@ page{
68 bottom: 0; 84 bottom: 0;
69 left: 0; 85 left: 0;
70 box-sizing: border-box; 86 box-sizing: border-box;
  87 + z-index: 100;
  88 + background: #fff;
71 } 89 }
72 90
73 .save_btn { 91 .save_btn {
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 33
34 .pl_style { 34 .pl_style {
35 font-size: 28rpx; 35 font-size: 28rpx;
36 - color: #1a1a1a; 36 + color: #999999;
37 } 37 }
38 38
39 .bottom_box { 39 .bottom_box {
@@ -18,12 +18,13 @@ Page({ @@ -18,12 +18,13 @@ Page({
18 insure: ['投保人', '投保人2'], 18 insure: ['投保人', '投保人2'],
19 insureindex: -1, 19 insureindex: -1,
20 beneficiary_list: [{ 20 beneficiary_list: [{
21 - name: ['受益人1', '受益人2'], 21 + name_array: ['受益人1', '受益人2'],
22 unit: '' 22 unit: ''
23 }], 23 }],
  24 + beneficiaryindex: -1,
24 tempfavoree: [], // 已选择的受益人 25 tempfavoree: [], // 已选择的受益人
25 beneficiaryList: [], 26 beneficiaryList: [],
26 - beneficiaryindex: -1, 27 + name: '', //受益人的名字,
27 beneficiary_name: '', 28 beneficiary_name: '',
28 imgs: [], 29 imgs: [],
29 main_risk: [], 30 main_risk: [],
@@ -36,18 +37,37 @@ Page({ @@ -36,18 +37,37 @@ Page({
36 rang_beneficiary: [], 37 rang_beneficiary: [],
37 risk_list: [{ 38 risk_list: [{
38 name: '', 39 name: '',
39 - projectlist: [], 40 + mo: [],
40 project_time: '', 41 project_time: '',
41 - time: 1 42 + title: '',
  43 + num: ''
42 }], 44 }],
43 main_array: [], 45 main_array: [],
44 - warranty_one: [],  
45 - warranty_two: [], 46 + warranty_one: '',
  47 + warranty_two: {},
46 guarantee_name: '', 48 guarantee_name: '',
47 - long_money: [], 49 + long_money: {},
48 time_name: '', 50 time_name: '',
49 type_money: '', 51 type_money: '',
  52 + more: [],
  53 + guarantee: [],
  54 + InfoId: 0,
  55 + def_id: '',
  56 + edit_state: false
  57 + },
  58 +
  59 + //保单号
  60 + policyNum(e) {
  61 + this.setData({
  62 + in_num: e.detail.value,
  63 + })
  64 + },
50 65
  66 + //保单号
  67 + setFirm(e) {
  68 + this.setData({
  69 + firm: e.detail.value,
  70 + })
51 }, 71 },
52 72
53 //投保人 73 //投保人
@@ -55,7 +75,7 @@ Page({ @@ -55,7 +75,7 @@ Page({
55 var insure = this.data.insure 75 var insure = this.data.insure
56 this.setData({ 76 this.setData({
57 insureindex: e.detail.value, 77 insureindex: e.detail.value,
58 - applicant_name: insure[e.detail.value] 78 + applicant_name: insure[e.detail.value],
59 }) 79 })
60 }, 80 },
61 81
@@ -68,11 +88,43 @@ Page({ @@ -68,11 +88,43 @@ Page({
68 }) 88 })
69 }, 89 },
70 90
  91 + //主险名称
  92 + setRiskName(e) {
  93 + // console.log(e)
  94 + this.setData({
  95 + main_risks: e.detail.value,
  96 + })
  97 + // console.log(this.data.main_risks)
  98 + },
  99 +
  100 + //保费
  101 + yearMoney(e) {
  102 + this.setData({
  103 + year_money: e.detail.value,
  104 + })
  105 + },
  106 +
  107 + //设置银行
  108 + setBank(e) {
  109 + this.setData({
  110 + bank: e.detail.value,
  111 + })
  112 + },
  113 +
  114 + //设置账号
  115 + setBankNum(e) {
  116 + this.setData({
  117 + bank_num: e.detail.value,
  118 + })
  119 + },
  120 +
71 //合同生效日 121 //合同生效日
72 compactTime(e) { 122 compactTime(e) {
73 this.setData({ 123 this.setData({
74 compact_time: e.detail.value, 124 compact_time: e.detail.value,
75 }) 125 })
  126 + this.countImpletionTime()
  127 + this.countImpletionTime2()
76 }, 128 },
77 129
78 //缴费期满日 130 //缴费期满日
@@ -91,13 +143,18 @@ Page({ @@ -91,13 +143,18 @@ Page({
91 143
92 //保障项目弹窗 144 //保障项目弹窗
93 ensureProject(e) { 145 ensureProject(e) {
  146 + this.setData({
  147 + edit_state: false
  148 + })
  149 +
94 let that = this; 150 let that = this;
95 let type = e.currentTarget.dataset.type; 151 let type = e.currentTarget.dataset.type;
96 let index = e.currentTarget.dataset.xulie; 152 let index = e.currentTarget.dataset.xulie;
97 let tempProjectlist = Object.assign(this.data.projectlist, {}); 153 let tempProjectlist = Object.assign(this.data.projectlist, {});
98 // 已经添加的附加险 154 // 已经添加的附加险
99 let rist_list = Object.assign(this.data.risk_list, {}); 155 let rist_list = Object.assign(this.data.risk_list, {});
100 - let tempRist = rist_list[index].projectlist; 156 + console.log(rist_list)
  157 + let tempRist = rist_list[index].mo;
101 // 已经添加的主险 158 // 已经添加的主险
102 let tempMain_list = Object.assign(this.data.main_array, {}) 159 let tempMain_list = Object.assign(this.data.main_array, {})
103 if (type == 'zhuxian') { 160 if (type == 'zhuxian') {
@@ -120,18 +177,19 @@ Page({ @@ -120,18 +177,19 @@ Page({
120 } 177 }
121 } 178 }
122 } 179 }
123 -  
124 } 180 }
  181 +
125 wx.setNavigationBarTitle({ 182 wx.setNavigationBarTitle({
126 title: '选择保障项目', 183 title: '选择保障项目',
127 }) 184 })
  185 +
128 this.setData({ 186 this.setData({
129 popup_state: true, 187 popup_state: true,
130 addType: type, 188 addType: type,
131 xulie: index, 189 xulie: index,
132 projectlist: tempProjectlist 190 projectlist: tempProjectlist
133 -  
134 }) 191 })
  192 + // }
135 }, 193 },
136 194
137 // 调取保障项目接口 195 // 调取保障项目接口
@@ -167,6 +225,9 @@ Page({ @@ -167,6 +225,9 @@ Page({
167 var title = projectlist[index].title 225 var title = projectlist[index].title
168 for (var i = 0; i < title.length; i++) { 226 for (var i = 0; i < title.length; i++) {
169 title[i].current = '' 227 title[i].current = ''
  228 + if (title[i].current == '') {
  229 + title[i].label_state = false
  230 + }
170 } 231 }
171 projectlist[index].title[sindex].current = sindex 232 projectlist[index].title[sindex].current = sindex
172 if (projectlist[index].title[sindex].current == sindex) { 233 if (projectlist[index].title[sindex].current == sindex) {
@@ -197,8 +258,11 @@ Page({ @@ -197,8 +258,11 @@ Page({
197 projectlist[index].choose_status = !projectlist[index].choose_status; 258 projectlist[index].choose_status = !projectlist[index].choose_status;
198 // console.log(projectlist) 259 // console.log(projectlist)
199 this.setData({ 260 this.setData({
200 - projectlist: projectlist 261 + projectlist: projectlist,
201 }) 262 })
  263 + if (this.data.inforid != 0) {
  264 + edit_state: false
  265 + }
202 }, 266 },
203 267
204 //确认选择的推荐方案 268 //确认选择的推荐方案
@@ -209,12 +273,27 @@ Page({ @@ -209,12 +273,27 @@ Page({
209 var main_array = [] 273 var main_array = []
210 var projectlist = Object.assign(this.data.projectlist, {}) 274 var projectlist = Object.assign(this.data.projectlist, {})
211 for (var i = 0; i < projectlist.length; i++) { 275 for (var i = 0; i < projectlist.length; i++) {
212 - 276 + // for (var j = 0; j < projectlist[i].title.length; j++) {
213 if (projectlist[i].choose_status) { 277 if (projectlist[i].choose_status) {
  278 + // if (projectlist[i].title[j].current == ''){
  279 + // projectlist[i].title[j].label_state=false
214 main_array.push(projectlist[i]) 280 main_array.push(projectlist[i])
  281 + // }
  282 +
215 } 283 }
  284 + // }
216 } 285 }
  286 + // for (var i = 0; i < projectlist.length; i++) {
  287 + // for (var j = 0; j < projectlist[i].title.length; j++) {
  288 + // if (projectlist[i].choose_status) {
  289 + // if (projectlist[i].title[j].current == '') {
  290 + // projectlist[i].title[j].label_state = false
  291 + // main_array.push(projectlist[i])
  292 + // }
217 293
  294 + // }
  295 + // }
  296 + // }
218 if (main_array != '') { 297 if (main_array != '') {
219 wx.showToast({ 298 wx.showToast({
220 title: '添加成功', 299 title: '添加成功',
@@ -223,7 +302,8 @@ Page({ @@ -223,7 +302,8 @@ Page({
223 302
224 if (type == 'fujiaxian') { 303 if (type == 'fujiaxian') {
225 let tempRist = that.data.risk_list; 304 let tempRist = that.data.risk_list;
226 - tempRist[index]['projectlist'] = main_array; 305 + console.log(tempRist)
  306 + tempRist[index]['mo'] = main_array;
227 that.setData({ 307 that.setData({
228 risk_list: tempRist, 308 risk_list: tempRist,
229 }) 309 })
@@ -259,39 +339,106 @@ Page({ @@ -259,39 +339,106 @@ Page({
259 }, 1000) 339 }, 1000)
260 }, 340 },
261 341
262 - //主线保障期 342 + //重组主险的保障项目
263 tempMain() { 343 tempMain() {
264 - // var main_array = this.data.main_array  
265 - // var warranty_one = this.data.warranty_one  
266 - // var temp = {}  
267 - // var len = main_array.length  
268 - // for (var i = 0; i < main_array.length; i++) {  
269 - // if (main_array[i].choose_status) {  
270 - // temp.num = main_array[i].beneficiary_name  
271 - // temp.title = main_array[i].name  
272 - // warranty_one.push(temp)  
273 - // }  
274 - // var hash = {};  
275 - // var temrecommend = warranty_one.reduce(function (item, next) {  
276 - // hash[next.name] ? '' : hash[next.name] = true && item.push(next);  
277 - // return item  
278 - // }, [])  
279 - // console.log(temrecommend)  
280 - // this.setData({  
281 - // warranty_one: temrecommend  
282 - // })  
283 - // } 344 + var main_array = this.data.main_array
  345 + var warranty_one1 = []
  346 + console.log(main_array)
  347 + for (var i = 0; i < main_array.length; i++) {
  348 + var temp = {}
  349 + for (var j = 0; j < main_array[i].title.length; j++) {
  350 +
  351 + if (main_array[i].choose_status) {
  352 + if (main_array[i].title[j].label_state) {
  353 + temp.id = main_array[i].id
  354 + temp.name = main_array[i].name
  355 + temp.num = main_array[i].num
  356 + temp.title = main_array[i].title[j].name
  357 + temp.t_id = main_array[i].title[j].t_id
  358 + }
  359 + }
  360 + }
  361 + warranty_one1.push(temp)
  362 + console.log(warranty_one1)
  363 + this.setData({
  364 + guarantee: warranty_one1
  365 + })
  366 + }
  367 +
  368 + },
  369 +
  370 + //主险名称
  371 + addRiskName(e) {
  372 + var risk_list = this.data.risk_list
  373 + var index = e.currentTarget.dataset.index
  374 + risk_list[index].name = e.detail.value
  375 + this.setData({
  376 + risk_list: risk_list
  377 + })
  378 + },
  379 +
  380 + //主险保障其
  381 + addRiskUnit(e) {
  382 + var risk_list = this.data.risk_list
  383 + var index = e.currentTarget.dataset.index
  384 + risk_list[index].num = e.detail.value
  385 + this.setData({
  386 + risk_list: risk_list
  387 + })
  388 + },
  389 +
  390 + //重组附加险整体数据结构
  391 + tempAddRisk() {
  392 + var risk_list = this.data.risk_list
  393 + var temp_risk = []
  394 + var sub_array = []
  395 + console.log(risk_list)
  396 + for (var i = 0; i < risk_list.length; i++) {
  397 + var temp = {}
  398 + for (var j = 0; j < risk_list[i].mo.length; j++) {
  399 + var subtemp = {}
  400 + for (var k = 0; k < risk_list[i].mo[j].title.length; k++) {
  401 + if (risk_list[i].name != '') {
  402 + if (risk_list[i].mo[j].choose_status) {
  403 + if (risk_list[i].mo[j].title[k].label_state) {
  404 + temp.name = risk_list[i].name
  405 + temp.num = risk_list[i].num
  406 + temp.title = risk_list[i].title
  407 + subtemp.id = risk_list[i].mo[j].id
  408 + subtemp.name = risk_list[i].mo[j].name
  409 + subtemp.num = risk_list[i].mo[j].num
  410 + subtemp.title = risk_list[i].mo[j].title[k].name
  411 + subtemp.t_id = risk_list[i].mo[j].title[k].t_id
  412 + }
  413 + }
  414 + }
  415 + }
  416 + sub_array.push(subtemp)
  417 + }
  418 +
  419 + temp.mo = sub_array
  420 + temp_risk.push(temp)
  421 + console.log(temp_risk)
  422 + this.setData({
  423 + more: temp_risk
  424 + })
  425 + }
  426 +
284 }, 427 },
285 428
286 //选择受益人姓名 429 //选择受益人姓名
287 beneficiarySelect(e) { 430 beneficiarySelect(e) {
288 - // console.log(e) 431 + if (this.data.inforid != 0) {
  432 + this.setData({
  433 + edit_state: false
  434 + })
  435 + }
289 var index = e.currentTarget.dataset.mindex 436 var index = e.currentTarget.dataset.mindex
290 var beneficiary_list = Object.assign(this.data.beneficiary_list, {}); 437 var beneficiary_list = Object.assign(this.data.beneficiary_list, {});
291 // 获取当前已选择的收益人 438 // 获取当前已选择的收益人
292 let tempBenefice = Object.assign(this.data.beneficiaryList, {}) 439 let tempBenefice = Object.assign(this.data.beneficiaryList, {})
293 // 当前选择的收益人 440 // 当前选择的收益人
294 - let nowPerson = beneficiary_list[index].name[e.detail.value]; 441 + let nowPerson = beneficiary_list[index].name_array[e.detail.value];
295 // 判断受益人是否已经添加 442 // 判断受益人是否已经添加
296 const add = tempBenefice.every((tempBenefice) => { 443 const add = tempBenefice.every((tempBenefice) => {
297 return tempBenefice != nowPerson 444 return tempBenefice != nowPerson
@@ -306,28 +453,14 @@ Page({ @@ -306,28 +453,14 @@ Page({
306 icon: 'none' 453 icon: 'none'
307 }) 454 })
308 } 455 }
309 - // for (var i = 0; i < beneficiary_list.length; i++) {  
310 - // for (var j = 0; j < beneficiary_list[i].name.length; j++) {  
311 - // var beneficiary_name =  
312 -  
313 - // beneficiary_list[index].beneficiary_name = beneficiary_list[i].name[e.detail.value]  
314 - // // console.log(beneficiary_list)  
315 - // }  
316 - // }  
317 -  
318 - // let tempRangArry = this.data.rang_beneficiary;  
319 - // tempRangArry[index] = beneficiary_list[index].name[e.detail.value]  
320 - // console.log(tempRangArry)  
321 456
322 this.setData({ 457 this.setData({
323 -  
324 beneficiary_list: beneficiary_list, 458 beneficiary_list: beneficiary_list,
325 beneficiaryList: tempBenefice 459 beneficiaryList: tempBenefice
326 }) 460 })
327 461
328 }, 462 },
329 463
330 -  
331 //添加收益比例 464 //添加收益比例
332 addUnit(e) { 465 addUnit(e) {
333 var beneficiary_list = this.data.beneficiary_list; 466 var beneficiary_list = this.data.beneficiary_list;
@@ -354,7 +487,7 @@ Page({ @@ -354,7 +487,7 @@ Page({
354 }) 487 })
355 } else { 488 } else {
356 list[len] = { 489 list[len] = {
357 - name: ['受益人1', '受益人2'], 490 + name_array: this.data.insure,
358 unit: '' 491 unit: ''
359 } 492 }
360 } 493 }
@@ -365,7 +498,6 @@ Page({ @@ -365,7 +498,6 @@ Page({
365 }, 498 },
366 499
367 //重组添加受益人 500 //重组添加受益人
368 -  
369 tempBeneficiary() { 501 tempBeneficiary() {
370 var beneficiary_list = this.data.beneficiary_list 502 var beneficiary_list = this.data.beneficiary_list
371 var len = beneficiary_list.length; 503 var len = beneficiary_list.length;
@@ -377,12 +509,6 @@ Page({ @@ -377,12 +509,6 @@ Page({
377 temp.unit = beneficiary_list[i].unit; 509 temp.unit = beneficiary_list[i].unit;
378 } 510 }
379 tempfavoree1.push(temp) 511 tempfavoree1.push(temp)
380 - // var hash = {};  
381 - // var temrecommend = tempfavoree.reduce(function (item, next) {  
382 - // hash[next.name] ? '' : hash[next.name] = true && item.push(next);  
383 - // return item  
384 - // }, [])  
385 -  
386 this.setData({ 512 this.setData({
387 tempfavoree: tempfavoree1 513 tempfavoree: tempfavoree1
388 }) 514 })
@@ -390,7 +516,6 @@ Page({ @@ -390,7 +516,6 @@ Page({
390 } 516 }
391 }, 517 },
392 518
393 -  
394 //删除收益人 519 //删除收益人
395 deletebenefict(e) { 520 deletebenefict(e) {
396 let index = e.currentTarget.dataset.index; 521 let index = e.currentTarget.dataset.index;
@@ -409,13 +534,19 @@ Page({ @@ -409,13 +534,19 @@ Page({
409 534
410 //添加附加险 535 //添加附加险
411 addRisk() { 536 addRisk() {
  537 + if (this.data.inforid != 0) {
  538 + this.setData({
  539 + edit_state: false
  540 + })
  541 + }
412 var risk_list = Object.assign(this.data.risk_list, {}); 542 var risk_list = Object.assign(this.data.risk_list, {});
413 var len = risk_list.length 543 var len = risk_list.length
414 risk_list[len] = { 544 risk_list[len] = {
415 name: '', 545 name: '',
416 - projectlist: [], 546 + mo: [],
417 project_time: '', 547 project_time: '',
418 - time: '' 548 + title: '',
  549 + num: ''
419 } 550 }
420 this.setData({ 551 this.setData({
421 risk_list: risk_list 552 risk_list: risk_list
@@ -431,6 +562,7 @@ Page({ @@ -431,6 +562,7 @@ Page({
431 risk_list: risk_list 562 risk_list: risk_list
432 }) 563 })
433 }, 564 },
  565 +
434 //上传图片 566 //上传图片
435 uploadImage() { 567 uploadImage() {
436 let that = this; 568 let that = this;
@@ -533,12 +665,20 @@ Page({ @@ -533,12 +665,20 @@ Page({
533 }); 665 });
534 }, 666 },
535 667
  668 +
  669 +
536 //保障期 670 //保障期
537 warrantyTwo(e) { 671 warrantyTwo(e) {
  672 + if (this.data.inforid != 0) {
  673 + this.setData({
  674 + edit_state: false
  675 + })
  676 + }
538 var guarantee_name = e.detail.value 677 var guarantee_name = e.detail.value
539 this.setData({ 678 this.setData({
540 - guarantee_name: guarantee_name 679 + guarantee_name: e.detail.value
541 }) 680 })
  681 + this.countImpletionTime2()
542 }, 682 },
543 683
544 //选择各项单位 684 //选择各项单位
@@ -547,8 +687,10 @@ Page({ @@ -547,8 +687,10 @@ Page({
547 this.setData({ 687 this.setData({
548 unit: unit 688 unit: unit
549 }) 689 })
  690 + this.countImpletionTime2()
550 }, 691 },
551 692
  693 +
552 //重组保障期数据格式 694 //重组保障期数据格式
553 tempWarranty() { 695 tempWarranty() {
554 var guarantee_name = this.data.guarantee_name 696 var guarantee_name = this.data.guarantee_name
@@ -556,14 +698,68 @@ Page({ @@ -556,14 +698,68 @@ Page({
556 var warranty_two = this.data.warranty_two 698 var warranty_two = this.data.warranty_two
557 warranty_two.num = guarantee_name 699 warranty_two.num = guarantee_name
558 warranty_two.title = unit 700 warranty_two.title = unit
559 -  
560 this.setData({ 701 this.setData({
561 warranty_two: warranty_two 702 warranty_two: warranty_two
562 }) 703 })
563 }, 704 },
564 705
  706 +
  707 + //计算缴费期满日,主线保障其
  708 + countImpletionTime2() {
  709 + var guarantee_name = parseInt(this.data.guarantee_name)
  710 + var unit = this.data.unit
  711 + var compact_time = this.data.compact_time
  712 + var year = parseInt(new Date(compact_time).getFullYear())
  713 + console.log(year)
  714 + var month = parseInt(new Date(compact_time).getMonth() + 1)
  715 + var day = parseInt(new Date(compact_time).getDate())
  716 + // var impletion_time = this.data.impletion_time
  717 + var warranty_one = this.data.warranty_one
  718 +
  719 + var tempbirth_time = ''
  720 + var birthday = '1995-04-20'
  721 + var birthday_year = parseInt(new Date(birthday).getFullYear())
  722 +
  723 + if (compact_time == '') {
  724 + wx.showToast({
  725 + title: '请选择合同生效日',
  726 + icon: 'none'
  727 + })
  728 + } else {
  729 + if (unit == '年') {
  730 + var temp_year = (year + guarantee_name)
  731 + var temp_day = day - 1
  732 + if (month < 10) month = "0" + month;
  733 + if (temp_day < 10) temp_day = "0" + temp_day;
  734 + // impletion_time = temp_year + '-' + month + '-' + temp_day
  735 + warranty_one = temp_year + '-' + month + '-' + temp_day
  736 + } else if (unit == '岁') {
  737 + var temp_year = (birthday_year + guarantee_name - 1)
  738 + var temp_year2 = (birthday_year + guarantee_name)
  739 + var temp_month = month
  740 + if (temp_month < 10) temp_month = "0" + temp_month;
  741 + if (month < 10) month = "0" + month;
  742 + if (day < 10) day = "0" + day;
  743 + // impletion_time = temp_year + '-' + temp_month + '-' + day
  744 + warranty_one = temp_year2 + '-' + month + '-' + day
  745 + } else if (unit == '终身') {
  746 + // impletion_time = '终身缴费'
  747 + warranty_one = '终身'
  748 + }
  749 + this.setData({
  750 + // impletion_time: impletion_time,
  751 + warranty_one: warranty_one
  752 + })
  753 + }
  754 + },
  755 +
565 //缴费时长 756 //缴费时长
566 burningTime(e) { 757 burningTime(e) {
  758 + if (this.data.inforid != 0) {
  759 + this.setData({
  760 + edit_state: false
  761 + })
  762 + }
567 var time_name = e.detail.value 763 var time_name = e.detail.value
568 this.setData({ 764 this.setData({
569 time_name: time_name 765 time_name: time_name
@@ -583,10 +779,10 @@ Page({ @@ -583,10 +779,10 @@ Page({
583 tempburningTime() { 779 tempburningTime() {
584 var time_name = this.data.time_name 780 var time_name = this.data.time_name
585 var unit = this.data.unit2 781 var unit = this.data.unit2
  782 + console.log(unit)
586 var long_money = this.data.long_money 783 var long_money = this.data.long_money
587 long_money.num = time_name 784 long_money.num = time_name
588 long_money.title = unit 785 long_money.title = unit
589 - // console.log(long_money)  
590 this.setData({ 786 this.setData({
591 long_money: long_money 787 long_money: long_money
592 }) 788 })
@@ -597,42 +793,49 @@ Page({ @@ -597,42 +793,49 @@ Page({
597 countImpletionTime() { 793 countImpletionTime() {
598 var time_name = parseInt(this.data.time_name) 794 var time_name = parseInt(this.data.time_name)
599 var unit = this.data.unit2 795 var unit = this.data.unit2
  796 +
600 var compact_time = this.data.compact_time 797 var compact_time = this.data.compact_time
601 var year = parseInt(new Date(compact_time).getFullYear()) 798 var year = parseInt(new Date(compact_time).getFullYear())
602 var month = parseInt(new Date(compact_time).getMonth() + 1) 799 var month = parseInt(new Date(compact_time).getMonth() + 1)
603 var day = parseInt(new Date(compact_time).getDate()) 800 var day = parseInt(new Date(compact_time).getDate())
604 var impletion_time = this.data.impletion_time 801 var impletion_time = this.data.impletion_time
605 - var warranty_one = this.data.warranty_one 802 + // var warranty_one = this.data.warranty_one
606 803
607 var tempbirth_time = '' 804 var tempbirth_time = ''
608 var birthday = '1995-04-20' 805 var birthday = '1995-04-20'
609 var birthday_year = parseInt(new Date(birthday).getFullYear()) 806 var birthday_year = parseInt(new Date(birthday).getFullYear())
610 - if (unit == '年') {  
611 - var temp_year = (year + time_name)  
612 - var temp_day = day - 1  
613 - if (month < 10) month = "0" + month;  
614 - if (temp_day < 10) temp_day = "0" + temp_day;  
615 - impletion_time = temp_year + '-' + month + '-' + temp_day  
616 - warranty_one = temp_year + '-' + month + '-' + temp_day  
617 - } else if (unit == '岁') {  
618 -  
619 - var temp_year = (birthday_year + time_name - 1)  
620 - var temp_year2 = (birthday_year + time_name)  
621 - var temp_month = month  
622 - if (temp_month < 10) temp_month = "0" + temp_month;  
623 - if (month < 10) month = "0" + month;  
624 - if (day < 10) day = "0" + day;  
625 - impletion_time = temp_year + '-' + temp_month + '-' + day  
626 - warranty_one = temp_year2 + '-' + month + '-' + day  
627 -  
628 - } else if (unit == '终身') {  
629 - impletion_time = '终身缴费'  
630 - warranty_one = '终身' 807 +
  808 + if (compact_time == '') {
  809 + wx.showToast({
  810 + title: '请选择合同生效日',
  811 + icon: 'none'
  812 + })
  813 + } else {
  814 + if (unit == '年') {
  815 + var temp_year = (year + time_name)
  816 + var temp_day = day - 1
  817 + if (month < 10) month = "0" + month;
  818 + if (temp_day < 10) temp_day = "0" + temp_day;
  819 + impletion_time = temp_year + '-' + month + '-' + temp_day
  820 + // warranty_one = temp_year + '-' + month + '-' + temp_day
  821 + } else if (unit == '岁') {
  822 + var temp_year = (birthday_year + time_name - 1)
  823 + var temp_year2 = (birthday_year + time_name)
  824 + var temp_month = month
  825 + if (temp_month < 10) temp_month = "0" + temp_month;
  826 + if (month < 10) month = "0" + month;
  827 + if (day < 10) day = "0" + day;
  828 + impletion_time = temp_year + '-' + temp_month + '-' + day
  829 + // warranty_one = temp_year2 + '-' + month + '-' + day
  830 + } else if (unit == '终身') {
  831 + impletion_time = '终身缴费'
  832 + // warranty_one = '终身'
  833 + }
  834 + this.setData({
  835 + impletion_time: impletion_time,
  836 + // warranty_one: warranty_one
  837 + })
631 } 838 }
632 - this.setData({  
633 - impletion_time: impletion_time,  
634 - warranty_one: warranty_one  
635 - })  
636 }, 839 },
637 840
638 //缴费方式 841 //缴费方式
@@ -644,49 +847,202 @@ Page({ @@ -644,49 +847,202 @@ Page({
644 }) 847 })
645 }, 848 },
646 849
  850 + //附加险保障其
647 selectUnit4(e) { 851 selectUnit4(e) {
648 var unit = e.currentTarget.dataset.unit; 852 var unit = e.currentTarget.dataset.unit;
649 let index = e.currentTarget.dataset.index; 853 let index = e.currentTarget.dataset.index;
650 let risk_list = Object.assign(this.data.risk_list, {}); 854 let risk_list = Object.assign(this.data.risk_list, {});
651 - risk_list[index].time = unit 855 + risk_list[index].title = unit
652 this.setData({ 856 this.setData({
653 risk_list: risk_list 857 risk_list: risk_list
654 }) 858 })
655 }, 859 },
656 860
657 - // 保单验证&&上传保单  
658 - listVerify(e) { 861 +
  862 + //家庭成员
  863 + familyMember() {
  864 + var FamilyId = this.data.FamilyId
  865 + let url = 'counselor/familyname'
  866 + let params = {
  867 + FamilyId: FamilyId,
  868 + }
  869 + app.post(url, params).then((res) => {
  870 + // console.log(res)
  871 + var beneficiary_list = this.data.beneficiary_list
  872 + for (var i in beneficiary_list) {
  873 + beneficiary_list[i].name_array = res.data.data.list
  874 + }
  875 + // console.log(beneficiary_list)
  876 +
  877 + if (res.data.code == 200) {
  878 + this.setData({
  879 + insure: res.data.data.list,
  880 + recognizee: res.data.data.list,
  881 + beneficiary_list: beneficiary_list,
  882 + })
  883 + }
  884 + })
  885 + },
  886 +
  887 + setStorge(e) {
659 this.tempBeneficiary() 888 this.tempBeneficiary()
660 this.tempWarranty() 889 this.tempWarranty()
661 this.tempburningTime() 890 this.tempburningTime()
  891 + this.tempMain()
  892 + this.tempAddRisk()
  893 + var favoree = JSON.stringify(this.data.tempfavoree)
  894 + var warranty_two = JSON.stringify(this.data.warranty_two)
  895 + var long_money = JSON.stringify(this.data.long_money)
  896 + var more = JSON.stringify(this.data.more)
  897 + var guarantee = JSON.stringify(this.data.guarantee)
  898 + var warn = ""; //弹框时提示的内容
  899 + var in_num = this.data.in_num
  900 + var firm = this.data.firm
  901 + var applicant = this.data.applicant_name
  902 + var recognizee = this.data.recognizee_name
  903 + var main_risks = this.data.main_risks
  904 + var year_money = this.data.year_money
  905 + var compact_time = this.data.compact_time
  906 + var impletion_time = this.data.impletion_time
  907 + var warranty_one = JSON.stringify(this.data.warranty_one)
  908 + var type_money = this.data.type_money
  909 + var bank = this.data.bank
  910 + var bank_num = this.data.bank_num
  911 + var picurl = JSON.stringify(this.data.imgs)
  912 + let url = 'counselor/inforsave'
  913 + let params = {
  914 + // InfoId: this.data.inforid,
  915 + def_id: this.data.def_id,
  916 + in_num: in_num,
  917 + firm: firm,
  918 + applicant: applicant,
  919 + recognizee: recognizee,
  920 + favoree: favoree,
  921 + main_risks: main_risks,
  922 + guarantee: guarantee,
  923 + year_money: year_money,
  924 + warranty_two: warranty_two,
  925 + compact_time: compact_time,
  926 + impletion_time: impletion_time,
  927 + warranty_one: warranty_one,
  928 + long_money: long_money,
  929 + type_money: type_money,
  930 + bank: bank,
  931 + bank_num: bank_num,
  932 + more: more,
  933 + picurl: picurl,
  934 + }
  935 + app.post(url, params).then((res) => {
  936 + if (res.data.code == 200) {
  937 + wx.navigateBack({
  938 + delta: 1,
  939 + })
  940 + }
  941 + })
  942 + },
662 943
  944 + //获取缓存内容
  945 + getStorage() {
  946 + let url = 'counselor/inforCopy'
  947 + let params = {
  948 + def_id: this.data.def_id,
  949 + }
  950 + app.post(url, params).then((res) => {
  951 + console.log(res)
  952 + if (res.data.code == 200) {
  953 + var warranty_two = res.data.data.def.warranty_two
  954 + var unit = this.data.unit
  955 + unit = warranty_two.title
  956 + var long_money = res.data.data.def.long_money
  957 + var unit2 = this.data.unit2
  958 + unit2 = long_money.title
  959 + var type_money = res.data.data.def.type_money
  960 + var unit3 = this.data.unit3
  961 + unit3 = type_money
  962 + var beneficiary_list = res.data.data.def.favoree
  963 + for (var obj in beneficiary_list) {
  964 + beneficiary_list[obj].beneficiary_name = beneficiary_list[obj].name
  965 + beneficiary_list[obj].name_array = this.data.insure
  966 + }
  967 +
  968 + this.setData({
  969 + imgs: res.data.data.def.picurl,
  970 + type_money: res.data.data.def.type_money,
  971 + unit3: unit3,
  972 + year_money: res.data.data.def.year_money,
  973 + long_money: res.data.data.def.long_money,
  974 + unit2: unit2,
  975 + in_num: res.data.data.def.in_num,
  976 + firm: res.data.data.def.firm,
  977 + main_risks: res.data.data.def.main_risks,
  978 + main_array: res.data.data.def.guarantee,
  979 + applicant_name: res.data.data.def.applicant,
  980 + recognizee_name: res.data.data.def.recognizee,
  981 + warranty_one: res.data.data.def.warranty_one,
  982 + warranty_two: res.data.data.def.warranty_two,
  983 + unit: unit,
  984 + compact_time: res.data.data.def.compact_time,
  985 + impletion_time: res.data.data.def.impletion_time,
  986 + bank: res.data.data.def.bank,
  987 + bank_num: res.data.data.def.bank_num,
  988 + risk_list: res.data.data.def.more,
  989 + beneficiary_list: beneficiary_list,
  990 + edit_state: true,
  991 + })
  992 + }
  993 + })
  994 + },
  995 +
  996 + // 保单验证&&上传保单
  997 + listVerify(e) {
  998 + console.log(this.data.inforid)
  999 + if (this.data.inforid == 0 || this.data.inforid == undefined) {
  1000 + this.tempBeneficiary()
  1001 + this.tempWarranty()
  1002 + this.tempburningTime()
  1003 + this.tempMain()
  1004 + this.tempAddRisk()
  1005 + var favoree = JSON.stringify(this.data.tempfavoree)
  1006 + var warranty_two = JSON.stringify(this.data.warranty_two)
  1007 + var long_money = JSON.stringify(this.data.long_money)
  1008 + var more = JSON.stringify(this.data.more)
  1009 + var guarantee = JSON.stringify(this.data.guarantee)
  1010 + } else if (this.data.edit_state) {
  1011 + var favoree = JSON.stringify(this.data.beneficiary_list)
  1012 + var warranty_two = JSON.stringify(this.data.warranty_two)
  1013 + var long_money = JSON.stringify(this.data.long_money)
  1014 + var more = JSON.stringify(this.data.risk_list)
  1015 + var guarantee = JSON.stringify(this.data.main_array)
  1016 + } else {
  1017 + this.tempBeneficiary()
  1018 + this.tempWarranty()
  1019 + this.tempburningTime()
  1020 + this.tempMain()
  1021 + this.tempAddRisk()
  1022 + var favoree = JSON.stringify(this.data.tempfavoree)
  1023 + var warranty_two = JSON.stringify(this.data.warranty_two)
  1024 + var long_money = JSON.stringify(this.data.long_money)
  1025 + var more = JSON.stringify(this.data.more)
  1026 + var guarantee = JSON.stringify(this.data.guarantee)
  1027 + }
663 1028
664 var warn = ""; //弹框时提示的内容 1029 var warn = ""; //弹框时提示的内容
665 var flag = true; //判断信息输入是否完整判断弹窗 1030 var flag = true; //判断信息输入是否完整判断弹窗
666 -  
667 var in_num = e.detail.value.policy_num 1031 var in_num = e.detail.value.policy_num
668 var firm = e.detail.value.company; 1032 var firm = e.detail.value.company;
669 var applicant = this.data.applicant_name 1033 var applicant = this.data.applicant_name
670 var recognizee = this.data.recognizee_name 1034 var recognizee = this.data.recognizee_name
671 - var favoree = this.data.tempfavoree 1035 + var main_risks = e.detail.value.main_risks
  1036 +
  1037 + var year_money = e.detail.value.year_money
672 var compact_time = this.data.compact_time 1038 var compact_time = this.data.compact_time
673 var impletion_time = this.data.impletion_time 1039 var impletion_time = this.data.impletion_time
674 - var warranty_one = this.data.main_array  
675 - var warranty_two = this.data.warranty_two 1040 + var warranty_one = JSON.stringify(this.data.warranty_one)
  1041 + var type_money = this.data.type_money
676 var bank = e.detail.value.bank 1042 var bank = e.detail.value.bank
677 var bank_num = e.detail.value.bank_num 1043 var bank_num = e.detail.value.bank_num
678 - var type_money = this.data.type_money  
679 - var long_money = this.data.long_money  
680 - var year_money = e.detail.value.year_money  
681 - // var coverage = e.detail.value.base_money  
682 - var main_risks = e.detail.value.main_risks  
683 -  
684 - var warranty = e.detail.value.Guarantee_period  
685 var picurl = JSON.stringify(this.data.imgs) 1044 var picurl = JSON.stringify(this.data.imgs)
686 - var guarantee = JSON.stringify(this.data.selectitem) //保障项目  
687 - var more = JSON.stringify(this.data.addlist)  
688 1045
689 - // if (this.data.inforid != undefined) {  
690 if (in_num == '') { 1046 if (in_num == '') {
691 warn = '请输入保单号!' 1047 warn = '请输入保单号!'
692 } else if (firm == '') { 1048 } else if (firm == '') {
@@ -697,28 +1053,30 @@ Page({ @@ -697,28 +1053,30 @@ Page({
697 warn = '请输入被保险人!' 1053 warn = '请输入被保险人!'
698 } else if (favoree == '') { 1054 } else if (favoree == '') {
699 warn = '请输入受益人!' 1055 warn = '请输入受益人!'
  1056 + } else if (main_risks == '') {
  1057 + warn = '请输入主险名称!'
  1058 + } else if (year_money == '') {
  1059 + warn = '请输入年交保费!'
700 } else if (compact_time == '') { 1060 } else if (compact_time == '') {
701 warn = '请输入合同生效日!' 1061 warn = '请输入合同生效日!'
702 - } else if (impletion_time == '') {  
703 - warn = '请输入缴费期满日!'  
704 - } else if (warranty == '') { 1062 + } else if (warranty_two.num == '') {
705 warn = '请输入保障期!' 1063 warn = '请输入保障期!'
  1064 + } else if (long_money.num == '') {
  1065 + warn = '请输入缴费时长!'
  1066 + } else if (type_money == '') {
  1067 + warn = '请输入缴费方式!'
706 } else if (bank == '') { 1068 } else if (bank == '') {
707 warn = '请输入续费银行!' 1069 warn = '请输入续费银行!'
708 } else if (bank_num == '') { 1070 } else if (bank_num == '') {
709 warn = '请输入续费账号!' 1071 warn = '请输入续费账号!'
710 } else if (!(/^[0-9]+.?[0-9]*/.test(bank_num))) { 1072 } else if (!(/^[0-9]+.?[0-9]*/.test(bank_num))) {
711 warn = '请输入正确续费账号!' 1073 warn = '请输入正确续费账号!'
712 - } else if (year_money == '') {  
713 - warn = '请输入年交保费!'  
714 - } else if (main_risks == '') {  
715 - warn = '请输入主险名称!'  
716 - } else if (coverage == '') {  
717 - warn = '请输入主险基本保额!'  
718 - } else if (more.length == 2) {  
719 - warn = '请上传上传附加险!'  
720 - } else if (guarantee.length == 0) {  
721 - warn = '请选择保障项目!' 1074 + } else if (impletion_time == '') {
  1075 + warn = '请输入缴费期满日!'
  1076 + } else if (warranty_one == '') {
  1077 + warn = '请输入主险保障期!'
  1078 + } else if (more == '') {
  1079 + warn = '请输入附加险!'
722 } else if (picurl.length == 2) { 1080 } else if (picurl.length == 2) {
723 warn = '请选择图片!' 1081 warn = '请选择图片!'
724 } else { 1082 } else {
@@ -733,17 +1091,19 @@ Page({ @@ -733,17 +1091,19 @@ Page({
733 applicant: applicant, 1091 applicant: applicant,
734 recognizee: recognizee, 1092 recognizee: recognizee,
735 favoree: favoree, 1093 favoree: favoree,
  1094 + main_risks: main_risks,
  1095 + guarantee: guarantee,
  1096 + year_money: year_money,
  1097 + warranty_two: warranty_two,
736 compact_time: compact_time, 1098 compact_time: compact_time,
737 impletion_time: impletion_time, 1099 impletion_time: impletion_time,
738 - warranty: warranty, 1100 + warranty_one: warranty_one,
  1101 + long_money: long_money,
  1102 + type_money: type_money,
739 bank: bank, 1103 bank: bank,
740 bank_num: bank_num, 1104 bank_num: bank_num,
741 - year_money: year_money,  
742 - main_risks: main_risks,  
743 - coverage: coverage,  
744 more: more, 1105 more: more,
745 - guarantee: guarantee,  
746 - picurl: picurl 1106 + picurl: picurl,
747 } 1107 }
748 app.post(url, params).then((res) => { 1108 app.post(url, params).then((res) => {
749 if (res.data.code == 200) { 1109 if (res.data.code == 200) {
@@ -753,105 +1113,7 @@ Page({ @@ -753,105 +1113,7 @@ Page({
753 } 1113 }
754 }) 1114 })
755 } 1115 }
756 - // }  
757 - // else {  
758 - // if (in_num == '') {  
759 - // warn = '请输入保单号!'  
760 - // } else if (firm == '') {  
761 - // warn = '请输入所属公司!'  
762 - // } else if (applicant == '') {  
763 - // warn = '请输入投保人!'  
764 - // } else if (recognizee == '') {  
765 - // warn = '请输入被保险人!'  
766 - // } else if (favoree == '') {  
767 - // warn = '请输入受益人!'  
768 - // } else if (compact_time == '') {  
769 - // warn = '请输入合同生效日!'  
770 - // } else if (impletion_time == '') {  
771 - // warn = '请输入缴费期满日!'  
772 - // } else if (warranty == '') {  
773 - // warn = '请输入保障期!'  
774 - // } else if (bank == '') {  
775 - // warn = '请输入续费银行!'  
776 - // } else if (bank_num == '') {  
777 - // warn = '请输入续费账号!'  
778 - // } else if (!(/^[0-9]+.?[0-9]*/.test(bank_num))) {  
779 - // warn = '请输入正确续费账号!'  
780 - // } else if (year_money == '') {  
781 - // warn = '请输入年交保费!'  
782 - // } else if (main_risks == '') {  
783 - // warn = '请输入主险名称!'  
784 - // } else if (coverage == '') {  
785 - // warn = '请输入主险基本保额!'  
786 - // } else if (more.length == 2) {  
787 - // warn = '请上传上传附加险!'  
788 - // } else if (guarantee.length == 2) {  
789 - // warn = '请选择保障项目!'  
790 - // } else if (picurl.length == 2) {  
791 - // warn = '请选择图片!'  
792 - // } else {  
793 - // flag = false  
794 - // // 添加、修改保单接口调取  
795 - // let url = 'counselor/inforuodate'  
796 - // let params = {  
797 - // def_id: this.data.def_id,  
798 - // in_num: in_num,  
799 - // firm: firm,  
800 - // applicant: applicant,  
801 - // recognizee: recognizee,  
802 - // favoree: favoree,  
803 - // compact_time: compact_time,  
804 - // impletion_time: impletion_time,  
805 - // warranty: warranty,  
806 - // bank: bank,  
807 - // bank_num: bank_num,  
808 - // year_money: year_money,  
809 - // main_risks: main_risks,  
810 - // coverage: coverage,  
811 - // more: more,  
812 - // guarantee: guarantee,  
813 - // picurl: picurl  
814 - // }  
815 - // app.post(url, params).then((res) => {  
816 - // var projectlist = this.data.projectlist  
817 - // for (var i = 0; i < projectlist.length; i++) {  
818 - // projectlist[i].status = false  
819 - // }  
820 - // if (res.data.code == 200) {  
821 - // var continue1 = e.detail.target.dataset.type  
822 - // var complete = e.detail.target.dataset.type  
823 - // if (continue1 == 'continue1') {  
824 - // wx.showToast({  
825 - // title: '添加成功',  
826 - // icon: 'none',  
827 - // duration: 2000,  
828 - // })  
829 - // this.setData({  
830 - // nullNum: '',  
831 - // addlist: [{  
832 - // name: '',  
833 - // num: '',  
834 - // title: ''  
835 - // }],  
836 - // projectlist: projectlist,  
837 - // imgs: [],  
838 - // compact_time: '',  
839 - // impletion_time: ''  
840 - // })  
841 - // } else if (complete == complete) {  
842 - // wx.showToast({  
843 - // title: '添加成功',  
844 - // icon: 'none',  
845 - // duration: 2000,  
846 - // })  
847 - // wx.navigateBack({  
848 - // delta: 1,  
849 - // })  
850 - // }  
851 - // }  
852 - // })  
853 - // }  
854 - // } 1116 +
855 if (flag == true) { 1117 if (flag == true) {
856 wx.showToast({ 1118 wx.showToast({
857 title: warn, 1119 title: warn,
@@ -862,11 +1124,107 @@ Page({ @@ -862,11 +1124,107 @@ Page({
862 }, 1124 },
863 1125
864 1126
  1127 +
  1128 + //获取编辑保单接口
  1129 + getlistVerify() {
  1130 + let url = 'counselor/infordef'
  1131 + let params = {
  1132 + InfoId: this.data.inforid,
  1133 + }
  1134 + app.post(url, params).then((res) => {
  1135 + console.log(res)
  1136 + if (res.data.code == 200) {
  1137 + var warranty_two = res.data.data.def.warranty_two
  1138 + var unit = this.data.unit
  1139 + unit = warranty_two.title
  1140 + var long_money = res.data.data.def.long_money
  1141 + var unit2 = this.data.unit2
  1142 + unit2 = long_money.title
  1143 + var type_money = res.data.data.def.type_money
  1144 + var unit3 = this.data.unit3
  1145 + unit3 = type_money
  1146 + var beneficiary_list = res.data.data.def.favoree
  1147 + for (var obj in beneficiary_list) {
  1148 + beneficiary_list[obj].beneficiary_name = beneficiary_list[obj].name
  1149 + beneficiary_list[obj].name_array = this.data.insure
  1150 + }
  1151 +
  1152 + var risk_list = res.data.data.def.more
  1153 + var projectlist = this.data.projectlist
  1154 + for (var i = 0; i < risk_list.length; i++) {
  1155 + for (var j = 0; j < projectlist.length; j++) {
  1156 + for (var k = 0; k < projectlist[j].title.length; k++) {
  1157 + if (risk_list[i].id == projectlist[j].id) {
  1158 + if (risk_list[i].title == projectlist[j].title[k].name) {
  1159 + var title = {}
  1160 + title.name = projectlist[j].title[k]
  1161 + // risk_list[i].push(title)
  1162 + }
  1163 + }
  1164 + }
  1165 + }
  1166 + }
  1167 +
  1168 + var warranty_two = res.data.data.def.warranty_two
  1169 + var guarantee_name = warranty_two.num
  1170 +
  1171 + var long_money = res.data.data.def.long_money
  1172 + var time_name = long_money.num
  1173 +
  1174 + this.setData({
  1175 + imgs: res.data.data.def.picurl,
  1176 + type_money: res.data.data.def.type_money,
  1177 + unit3: unit3,
  1178 + year_money: res.data.data.def.year_money,
  1179 + long_money: res.data.data.def.long_money,
  1180 + unit2: unit2,
  1181 + in_num: res.data.data.def.in_num,
  1182 + firm: res.data.data.def.firm,
  1183 + main_risks: res.data.data.def.main_risks,
  1184 + main_array: res.data.data.def.guarantee,
  1185 + applicant_name: res.data.data.def.applicant,
  1186 + recognizee_name: res.data.data.def.recognizee,
  1187 + warranty_one: res.data.data.def.warranty_one,
  1188 + warranty_two: res.data.data.def.warranty_two,
  1189 + unit: unit,
  1190 + compact_time: res.data.data.def.compact_time,
  1191 + impletion_time: res.data.data.def.impletion_time,
  1192 + bank: res.data.data.def.bank,
  1193 + bank_num: res.data.data.def.bank_num,
  1194 + risk_list: risk_list,
  1195 + beneficiary_list: beneficiary_list,
  1196 + edit_state: true,
  1197 + guarantee_name: guarantee_name,
  1198 + time_name: time_name,
  1199 + })
  1200 + }
  1201 + })
  1202 + },
  1203 +
865 /** 1204 /**
866 * 生命周期函数--监听页面加载 1205 * 生命周期函数--监听页面加载
867 */ 1206 */
868 onLoad: function(options) { 1207 onLoad: function(options) {
869 this.ensureProjectList() 1208 this.ensureProjectList()
  1209 + this.setData({
  1210 + def_id: options.def_id,
  1211 + inforid: options.inforid,
  1212 + FamilyId: options.FamilyId,
  1213 + recognizee_name: options.name
  1214 + })
  1215 + if (options.inforid == undefined) {
  1216 + this.setData({
  1217 + inforid: 0
  1218 + })
  1219 + }
  1220 + if (options.FamilyId != '') {
  1221 + this.familyMember()
  1222 + }
  1223 + if (options.inforid != undefined) {
  1224 + this.getlistVerify()
  1225 + } else {
  1226 + // this.getStorage()
  1227 + }
870 }, 1228 },
871 1229
872 /** 1230 /**
@@ -28,86 +28,54 @@ @@ -28,86 +28,54 @@
28 </view> 28 </view>
29 29
30 <!-- 表单部分 --> 30 <!-- 表单部分 -->
31 -<!-- <block wx:else> -->  
32 <form bindsubmit='listVerify' bindreset="formReset"> 31 <form bindsubmit='listVerify' bindreset="formReset">
33 <view class='content_item'> 32 <view class='content_item'>
34 <view class='item_list'> 33 <view class='item_list'>
35 <view class='list_title'>保单号</view> 34 <view class='list_title'>保单号</view>
36 - <!-- <block wx:if='{{inforid}}'>  
37 - <view class='list_input'>  
38 - <input type='text' placeholder='请输入' name='list_num' value='{{listdetail.in_num}}' bindinput='itemNum'></input>  
39 - </view>  
40 - </block>  
41 - <block wx:else> -->  
42 <view class='list_input'> 35 <view class='list_input'>
43 - <input type='text' placeholder='请输入' name='policy_num' value='{{nullNum}}' bindinput='policyNum'></input> 36 + <input type='text' placeholder='请输入' name='policy_num' value='{{in_num}}' bindinput='policyNum'></input>
44 </view> 37 </view>
45 - <!-- </block> -->  
46 </view> 38 </view>
47 <view class='item_list'> 39 <view class='item_list'>
48 <view class='list_title'>所属公司</view> 40 <view class='list_title'>所属公司</view>
49 - <!-- <block wx:if='{{inforid}}'>  
50 - <view class='list_input'>  
51 - <input type='text' placeholder='请输入' name='company' value='{{listdetail.firm}}'></input>  
52 - </view>  
53 - </block>  
54 - <block wx:else> -->  
55 <view class='list_input'> 41 <view class='list_input'>
56 - <input type='text' placeholder='请输入' name='company' value='{{nullNum}}'></input> 42 + <input type='text' placeholder='请输入' name='company' value='{{firm}}' bindinput='setFirm'></input>
57 </view> 43 </view>
58 - <!-- </block> -->  
59 </view> 44 </view>
60 <view class='item_list'> 45 <view class='item_list'>
61 <view class='list_title'>投保人</view> 46 <view class='list_title'>投保人</view>
62 - <!-- <block wx:if='{{inforid}}'>  
63 - <view class='list_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>  
67 - </view>  
68 - </block>  
69 - <block wx:else> -->  
70 <view class='list_input'> 47 <view class='list_input'>
71 <picker class='picker' range='{{insure}}' value='{{insureindex}}' bindchange='insureSelect'> 48 <picker class='picker' range='{{insure}}' value='{{insureindex}}' bindchange='insureSelect'>
72 - <input type='text' placeholder='请选择' name='policy_holder' value='{{insure[insureindex]}}' disabled='true'></input> 49 + <input type='text' placeholder='请选择' name='policy_holder' value='{{applicant_name}}' disabled='true'></input>
73 </picker> 50 </picker>
74 - <!-- <input type='text' placeholder='请填写' name='policy_holder' value='{{nullNum}}'></input> -->  
75 </view> 51 </view>
76 - <!-- </block> -->  
77 </view> 52 </view>
78 <view class='item_list'> 53 <view class='item_list'>
79 <view class='list_title'>被保险人</view> 54 <view class='list_title'>被保险人</view>
80 - <!-- <block wx:if='{{inforid}}'>  
81 - <view class='list_input'>  
82 - <picker class='picker' range='{{recognizee}}' value='{{recognizeeindex}}' bindchange='recognizeeSelect'>  
83 - <text>{{recognizee[recognizeeindex]}}</text>  
84 - </picker>  
85 - </view>  
86 - </block>  
87 - <block wx:else> -->  
88 <view class='list_input'> 55 <view class='list_input'>
89 - <picker class='picker' range='{{recognizee}}' value='{{recognizeeindex}}' bindchange='recognizeeSelect'>  
90 - <input placeholder='请选择' value='{{recognizee[recognizeeindex]}}' disabled='true'></input>  
91 - </picker> 56 + <!-- bindchange='recognizeeSelect' -->
  57 + <view class='picker' range='{{recognizee}}' value='{{recognizeeindex}}'>
  58 + <input placeholder='请选择' value='{{recognizee_name}}' disabled='true'></input>
  59 + </view>
92 </view> 60 </view>
93 - <!-- </block> -->  
94 </view> 61 </view>
95 <view> 62 <view>
96 - <view class='item_list' wx:for='{{beneficiary_list}}' wx:key='' wx:for-index='its'> 63 + <view class='item_list benefic' wx:for='{{beneficiary_list}}' wx:key='' wx:for-index='its'>
97 <view class='list_title'>受益人</view> 64 <view class='list_title'>受益人</view>
98 <view class='list_input_box'> 65 <view class='list_input_box'>
99 <view class='list_input'> 66 <view class='list_input'>
100 - <picker class='picker' range='{{item.name}}' range-key='' value='{{beneficiaryindex}}' wx:for-index='index' bindchange='beneficiarySelect' data-mindex='{{its}}'> 67 + <picker class='picker' range='{{item.name_array}}' 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> 68 <input type='text' placeholder='请选择' name='beneficiary' value='{{item.beneficiary_name}}' disabled='true'></input>
102 </picker> 69 </picker>
103 </view> 70 </view>
104 <view class='list_input'> 71 <view class='list_input'>
105 - <input class='income_input' type='text' placeholder='受益比例%' name='beneficiary' value='{{item.unit}}' bindinput='addUnit'></input> 72 + <input class='income_input' type='text' placeholder='受益比例' name='beneficiary' value='{{item.unit}}' bindinput='addUnit'></input>
  73 + <text>%</text>
106 </view> 74 </view>
107 </view> 75 </view>
108 <view class='iconfont icon-guanbi shouyi' bindtap='deletebenefict' wx:if="{{its>0}}" data-index='{{its}}'></view> 76 <view class='iconfont icon-guanbi shouyi' bindtap='deletebenefict' wx:if="{{its>0}}" data-index='{{its}}'></view>
109 </view> 77 </view>
110 - <view class='iconfont icon-wuuiconxiangjifangda add_person' wx:if="{{beneficiary_list.length<beneficiary_list[0].name.length}}" data-mindex='{{its}}' data-sindex='{{index}}' bindtap='addPersons'> 78 + <view class='iconfont icon-wuuiconxiangjifangda add_person' wx:if="{{beneficiary_list.length<beneficiary_list[0].name_array.length}}" data-mindex='{{its}}' data-sindex='{{index}}' bindtap='addPersons'>
111 <text>添加受益人</text> 79 <text>添加受益人</text>
112 </view> 80 </view>
113 </view> 81 </view>
@@ -117,27 +85,27 @@ @@ -117,27 +85,27 @@
117 <view class='list_title'> 85 <view class='list_title'>
118 <text class='symbol_icon'>*</text> 86 <text class='symbol_icon'>*</text>
119 <text>主险名称</text> 87 <text>主险名称</text>
120 - </view>  
121 - <!-- <block wx:if='{{inforid}}'>  
122 - <view class='list_input'>  
123 - <input type='text' placeholder='请填写' name='main_risks' value='{{listdetail.main_risks}}'></input>  
124 - </view>  
125 - </block>  
126 - <block wx:else> --> 88 + </view>
127 <view class='list_input'> 89 <view class='list_input'>
128 - <input type='text' placeholder='请填写' name='main_risks' value='{{nullNum}}'></input> 90 + <input type='text' placeholder='请填写' name='main_risks' value='{{main_risks}}' bindinput='setRiskName'></input>
129 </view> 91 </view>
130 - <!-- </block> -->  
131 </view> 92 </view>
132 <view class='protec_item_box'> 93 <view class='protec_item_box'>
133 <view> 94 <view>
134 <view class='protec_item' wx:for='{{main_array}}' wx:key=''> 95 <view class='protec_item' wx:for='{{main_array}}' wx:key=''>
135 <view>{{item.name}}</view> 96 <view>{{item.name}}</view>
136 - <view class='protec_num'>{{item.num}}<block wx:for='{{item.title}}' wx:for-item='danwei' wx:key=''><text wx:if="{{danwei.label_state}}">{{danwei.name}}</text></block></view> 97 + <view class='protec_num'>{{item.num}}
  98 + <text wx:if='{{edit_state}}'>{{item.title}}</text>
  99 + <block wx:else>
  100 + <block wx:for='{{item.title}}' wx:for-item='danwei' wx:key=''>
  101 + <text wx:if="{{danwei.label_state}}">{{danwei.name}}</text>
  102 + </block>
  103 + </block>
  104 + </view>
137 </view> 105 </view>
138 </view> 106 </view>
139 <view class='protec_bottom_box'> 107 <view class='protec_bottom_box'>
140 - <view class='add_risk_btn protec_btn' bindtap='ensureProject' data-type='zhuxian' data-xulie='0'> 108 + <view class='add_risk_btn protec_btn' bindtap='ensureProject' data-type='zhuxian' data-xulie='0'>
141 <text class='iconfont icon-shezhi'></text> 109 <text class='iconfont icon-shezhi'></text>
142 <text>管理保障项目</text> 110 <text>管理保障项目</text>
143 </view> 111 </view>
@@ -152,7 +120,7 @@ @@ -152,7 +120,7 @@
152 </view> 120 </view>
153 <view class='list_input_box'> 121 <view class='list_input_box'>
154 <view class='list_input'> 122 <view class='list_input'>
155 - <input type='number' placeholder='请填写' name='year_money' value='{{year_money}}'></input> 123 + <input type='number' placeholder='请填写' name='year_money' value='{{year_money}}' bindinput='yearMoney'></input>
156 </view> 124 </view>
157 <view class='list_input'> 125 <view class='list_input'>
158 <input class='income_input' type='text' placeholder='请填写' value='元/年' disabled='true'></input> 126 <input class='income_input' type='text' placeholder='请填写' value='元/年' disabled='true'></input>
@@ -161,29 +129,18 @@ @@ -161,29 +129,18 @@
161 </view> 129 </view>
162 <view class='item_list'> 130 <view class='item_list'>
163 <view class='list_title'>合同生效日</view> 131 <view class='list_title'>合同生效日</view>
164 - <!-- <block wx:if='{{inforid}}'>  
165 - <view class='list_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>  
171 - </view>  
172 - </block>  
173 - <block wx:else> -->  
174 <view class='list_input'> 132 <view class='list_input'>
175 <picker class='picker' mode="date" bindchange='compactTime' value='{{compact_time}}'> 133 <picker class='picker' mode="date" bindchange='compactTime' value='{{compact_time}}'>
176 <input placeholder='请选择' value='{{compact_time}}' disabled='true'></input> 134 <input placeholder='请选择' value='{{compact_time}}' disabled='true'></input>
177 </picker> 135 </picker>
178 <text class='iconfont icon-riqi'></text> 136 <text class='iconfont icon-riqi'></text>
179 </view> 137 </view>
180 - <!-- </block> -->  
181 </view> 138 </view>
182 <view class='item_list'> 139 <view class='item_list'>
183 <view class='list_title'>保障期</view> 140 <view class='list_title'>保障期</view>
184 <view class='list_input_box'> 141 <view class='list_input_box'>
185 <view class='list_input'> 142 <view class='list_input'>
186 - <input type='text' placeholder='请输入' name='beneficiary' value='{{listdetail.favoree}}' bindinput='warrantyTwo'></input> 143 + <input type='text' placeholder='请输入' value='{{warranty_two.num}}' bindinput='warrantyTwo'></input>
187 </view> 144 </view>
188 <view class='list_label_box'> 145 <view class='list_label_box'>
189 <view class="list_label_item {{unit=='年'?'list_label_active':''}}" bindtap='selectUnit' data-unit='年'>年</view> 146 <view class="list_label_item {{unit=='年'?'list_label_active':''}}" bindtap='selectUnit' data-unit='年'>年</view>
@@ -196,7 +153,7 @@ @@ -196,7 +153,7 @@
196 <view class='list_title'>缴费时长</view> 153 <view class='list_title'>缴费时长</view>
197 <view class='list_input_box'> 154 <view class='list_input_box'>
198 <view class='list_input'> 155 <view class='list_input'>
199 - <input type='text' placeholder='请输入' name='beneficiary' value='{{}}' bindinput='burningTime'></input> 156 + <input type='text' placeholder='请输入' name='beneficiary' value='{{long_money.num}}' bindinput='burningTime'></input>
200 </view> 157 </view>
201 <view class='list_label_box'> 158 <view class='list_label_box'>
202 <view class="list_label_item {{unit2=='年'?'list_label_active':''}}" bindtap='selectUnit2' data-unit='年'>年</view> 159 <view class="list_label_item {{unit2=='年'?'list_label_active':''}}" bindtap='selectUnit2' data-unit='年'>年</view>
@@ -215,93 +172,53 @@ @@ -215,93 +172,53 @@
215 </view> 172 </view>
216 <view class='item_list'> 173 <view class='item_list'>
217 <view class='list_title'>续费银行</view> 174 <view class='list_title'>续费银行</view>
218 - <!-- <block wx:if='{{inforid}}'>  
219 - <view class='list_input'>  
220 - <input type='text' placeholder='请填写' name='Renew_bank' value='{{listdetail.bank}}'></input>  
221 - </view>  
222 - </block>  
223 - <block wx:else> -->  
224 <view class='list_input'> 175 <view class='list_input'>
225 - <input type='text' placeholder='请填写' name='bank' value='{{bank}}'></input> 176 + <input type='text' placeholder='请填写' name='bank' value='{{bank}}' bindinput='setBank'></input>
226 </view> 177 </view>
227 - <!-- </block> -->  
228 </view> 178 </view>
229 <view class='item_list'> 179 <view class='item_list'>
230 <view class='list_title'>续费账号</view> 180 <view class='list_title'>续费账号</view>
231 - <!-- <block wx:if='{{inforid}}'>  
232 - <view class='list_input'>  
233 - <input type='number' placeholder='输入后四位' name='renew_num' value='{{listdetail.bank_num}}'></input>  
234 - </view>  
235 - </block>  
236 - <block wx:else> -->  
237 <view class='list_input'> 181 <view class='list_input'>
238 - <input type='text' placeholder='请填写' name='bank_num' value='{{bank_num}}'></input> 182 + <input type='text' placeholder='请填写' name='bank_num' value='{{bank_num}}' bindinput='setBankNum'></input>
239 </view> 183 </view>
240 - <!-- </block> -->  
241 </view> 184 </view>
242 185
243 <view class='item_list'> 186 <view class='item_list'>
244 <view class='list_title'>缴费期满日</view> 187 <view class='list_title'>缴费期满日</view>
245 - <!-- <block wx:if='{{inforid}}'>  
246 - <view class='list_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>  
251 - </view>  
252 - </block>  
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 <view class='list_input'> 188 <view class='list_input'>
261 - <input type='text' placeholder='自动计算' name='impletion_time' value='{{impletion_time}}'></input> 189 + <input type='text' placeholder='自动计算' name='impletion_time' value='{{impletion_time}}' disabled='true'></input>
262 </view> 190 </view>
263 - <!-- </block> -->  
264 </view> 191 </view>
265 <view class='item_list'> 192 <view class='item_list'>
266 <view class='list_title'>主险保障期</view> 193 <view class='list_title'>主险保障期</view>
267 - <!-- <block wx:if='{{inforid}}'>  
268 - <view class='list_input'>  
269 - <input type='number' placeholder='请填写' name='Guarantee_period' value='{{listdetail.warranty}}'></input>  
270 - <!-- <text class='iconfont icon-riqi'></text>  
271 - </view>  
272 - </block>  
273 - <block wx:else> -->  
274 -  
275 -<view class='list_input'>  
276 - <input type='text' placeholder='自动计算' name='warranty_one' value='{{warranty_one}}'></input> 194 + <view class='list_input'>
  195 + <input type='text' placeholder='自动计算' name='warranty_one' value='{{warranty_one}}' disabled='true'></input>
277 </view> 196 </view>
278 -  
279 - <!-- <view class='list_input'>  
280 - <picker class='picker' range='{{period_time}}' value='{{period_index}}' bindchange='periodTime'>  
281 - <input placeholder='自动计算' value='{{warranty_one}}' disabled='true'></input>  
282 - </picker>  
283 - <!-- <text class='iconfont icon-riqi'></text>  
284 - </view> -->  
285 - <!-- </block> -->  
286 </view> 197 </view>
287 </view> 198 </view>
288 199
289 <view class='content_item'> 200 <view class='content_item'>
290 - <!-- wx:for='{{addlist}}' wx:key='' -->  
291 <view class='risk_box'> 201 <view class='risk_box'>
292 <view class='risk_item' wx:for='{{risk_list}}' wx:key=''> 202 <view class='risk_item' wx:for='{{risk_list}}' wx:key=''>
293 <view class='iconfont icon-guanbi symool_box' bindtap='deleteRisk' wx:if="{{index>0}}" data-index='{{index}}'></view> 203 <view class='iconfont icon-guanbi symool_box' bindtap='deleteRisk' wx:if="{{index>0}}" data-index='{{index}}'></view>
294 <view class='item_list'> 204 <view class='item_list'>
295 <view class='list_title project'>附加险名称</view> 205 <view class='list_title project'>附加险名称</view>
296 <view class='list_input'> 206 <view class='list_input'>
297 - <input type='text' placeholder='请填写' bindinput='additional_risk' value='{{item.name}}'></input> 207 + <input type='text' placeholder='请填写' bindinput='addRiskName' value='{{item.name}}' data-index='{{index}}'></input>
298 </view> 208 </view>
299 </view> 209 </view>
300 <view class='protec_item_box'> 210 <view class='protec_item_box'>
301 <view> 211 <view>
302 - <view class='protec_item' wx:for='{{item.projectlist}}' wx:for-item='project' wx:key=''> 212 + <view class='protec_item' wx:for='{{item.mo}}' wx:for-item='project' wx:key=''>
303 <view>{{project.name}}</view> 213 <view>{{project.name}}</view>
304 - <view class='protec_num'>{{project.num}}<block wx:for='{{project.title}}' wx:for-item='danwei' wx:key=''><text wx:if="{{danwei.label_state}}">{{danwei.name}}</text></block></view> 214 + <view class='protec_num'>{{project.num}}
  215 + <text wx:if='{{edit_state}}'>{{project.title}}</text>
  216 + <block wx:else>
  217 + <block wx:for='{{project.title}}' wx:for-item='danwei' wx:key=''>
  218 + <text wx:if="{{danwei.label_state}}">{{danwei.name}}</text>
  219 + </block>
  220 + </block>
  221 + </view>
305 </view> 222 </view>
306 </view> 223 </view>
307 <view class='protec_bottom_box'> 224 <view class='protec_bottom_box'>
@@ -315,12 +232,12 @@ @@ -315,12 +232,12 @@
315 <view class='list_title'>保障期</view> 232 <view class='list_title'>保障期</view>
316 <view class='list_input_box'> 233 <view class='list_input_box'>
317 <view class='list_input'> 234 <view class='list_input'>
318 - <input type='text' placeholder='请输入' name='beneficiary' value='{{listdetail.favoree}}'></input> 235 + <input type='text' placeholder='请输入' name='beneficiary' value='{{item.num}}' data-index='{{index}}' bindinput='addRiskUnit'></input>
319 </view> 236 </view>
320 <view class='list_label_box'> 237 <view class='list_label_box'>
321 - <view class="list_label_item {{item.time==10?'list_label_active':''}}" bindtap='selectUnit4' data-index="{{index}}" data-unit='10'>年</view>  
322 - <view class="list_label_item {{item.time==11?'list_label_active':''}}" bindtap='selectUnit4' data-index="{{index}}" data-unit='11'>岁 </view>  
323 - <view class="list_label_item {{item.time==12?'list_label_active':''}}" bindtap='selectUnit4' data-index="{{index}}" data-unit='12'>终身</view> 238 + <view class="list_label_item {{item.title=='年'?'list_label_active':''}}" bindtap='selectUnit4' data-index="{{index}}" data-unit='年'>年</view>
  239 + <view class="list_label_item {{item.title=='岁'?'list_label_active':''}}" bindtap='selectUnit4' data-index="{{index}}" data-unit='岁'>岁</view>
  240 + <view class="list_label_item {{item.title=='终身'?'list_label_active':''}}" bindtap='selectUnit4' data-index="{{index}}" data-unit='终身'>终身</view>
324 </view> 241 </view>
325 </view> 242 </view>
326 </view> 243 </view>
@@ -339,17 +256,6 @@ @@ -339,17 +256,6 @@
339 </view> 256 </view>
340 257
341 <view class='popup_item' wx:if='{{show}}'> 258 <view class='popup_item' wx:if='{{show}}'>
342 - <!-- <block wx:if='{{inforid}}'>  
343 - <view class='popup_list' wx:for='{{projectlist}}' wx:key='' wx:if='{{item.status}}'>  
344 - <view class='popup_content popup_content2'>  
345 - <view class=''>{{item.name}}</view>  
346 - <view class='popup_input'>  
347 - <view class='input_content'>{{item.num}}{{item.title}}</view>  
348 - </view>  
349 - </view>  
350 - </view>  
351 - </block>  
352 - <block wx:else> -->  
353 <view class='popup_list' wx:for='{{projectlist}}' wx:key='' wx:if='{{item.status}}'> 259 <view class='popup_list' wx:for='{{projectlist}}' wx:key='' wx:if='{{item.status}}'>
354 <view class='popup_content popup_content2'> 260 <view class='popup_content popup_content2'>
355 <view class=''>{{item.name}}</view> 261 <view class=''>{{item.name}}</view>
@@ -358,7 +264,6 @@ @@ -358,7 +264,6 @@
358 </view> 264 </view>
359 </view> 265 </view>
360 </view> 266 </view>
361 - <!-- </block> -->  
362 </view> 267 </view>
363 <view class='box'> 268 <view class='box'>
364 <!-- 上传图片 --> 269 <!-- 上传图片 -->
@@ -380,8 +285,7 @@ @@ -380,8 +285,7 @@
380 <!--底部按钮 --> 285 <!--底部按钮 -->
381 <view class='null_box'></view> 286 <view class='null_box'></view>
382 <view class='bottom_box'> 287 <view class='bottom_box'>
383 - <button class='bottom_btn save_btn'>暂存</button> 288 + <button class='bottom_btn save_btn' bindtap='setStorge'>暂存</button>
384 <button class='bottom_btn' data-type='complete' formType='submit'>完成</button> 289 <button class='bottom_btn' data-type='complete' formType='submit'>完成</button>
385 </view> 290 </view>
386 -</form>  
387 -<!-- </block> -->  
  291 +</form>
@@ -92,8 +92,13 @@ page { @@ -92,8 +92,13 @@ page {
92 .list_input { 92 .list_input {
93 width: 75%; 93 width: 75%;
94 position: relative; 94 position: relative;
  95 + display: flex;
  96 + align-items: center;
  97 + font-size: 29rpx;
  98 +}
  99 +.list_input text{
  100 + /* margin-left: 10rpx; */
95 } 101 }
96 -  
97 .icon-riqi { 102 .icon-riqi {
98 font-size: 48rpx; 103 font-size: 48rpx;
99 position: absolute; 104 position: absolute;
@@ -450,10 +455,10 @@ page { @@ -450,10 +455,10 @@ page {
450 justify-content: center; 455 justify-content: center;
451 } 456 }
452 457
453 -  
454 -.risk_item{  
455 - position: relative 458 +.risk_item {
  459 + position: relative;
456 } 460 }
  461 +
457 .symool_box { 462 .symool_box {
458 font-size: 25rpx; 463 font-size: 25rpx;
459 color: #999; 464 color: #999;
@@ -464,8 +469,6 @@ page { @@ -464,8 +469,6 @@ page {
464 top: 20rpx; 469 top: 20rpx;
465 } 470 }
466 471
467 -  
468 -  
469 .add_person { 472 .add_person {
470 font-size: 60rpx; 473 font-size: 60rpx;
471 color: #0286ff; 474 color: #0286ff;
@@ -481,11 +484,14 @@ page { @@ -481,11 +484,14 @@ page {
481 color: #999; 484 color: #999;
482 margin-left: 15rpx; 485 margin-left: 15rpx;
483 } 486 }
484 -.icon-guanbi.shouyi{  
485 - position: unset;  
486 - margin-left: -22rpx;  
487 - font-size: 22rpx;  
488 - align-self: flex-start;  
489 - margin-top:-10rpx;  
490 487
491 -}  
  488 +.benefic {
  489 + position: relative;
  490 +}
  491 +
  492 +.icon-guanbi.shouyi {
  493 + position: absolute;
  494 + right: -17rpx;
  495 + top: 7rpx;
  496 + font-size: 22rpx;
  497 +}
1 // pages/index/addLog/addLog.js 1 // pages/index/addLog/addLog.js
  2 +const app = getApp()
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
  9 + defid: '', //客户ID
  10 + cid: '', //顾问ID
  11 + content: "", //内容
  12 + min: 0, //最少字数
  13 + max: 100, //最多字数
  14 + },
8 15
  16 + getText(e) {
  17 + // 获取输入框的内容
  18 + var content = e.detail.value;
  19 + this.setData({
  20 + content: content
  21 + })
  22 + // 获取输入框内容的长度
  23 + var len = parseInt(content.length);
  24 +
  25 + //最少字数限制
  26 + if (len <= this.data.min)
  27 + this.setData({
  28 + texts: "加油,够5个字可以得20积分哦"
  29 + })
  30 + else if (len > this.data.min)
  31 + this.setData({
  32 + texts: " "
  33 + })
  34 +
  35 + //最多字数限制
  36 + if (len > this.data.max) return;
  37 + // 当输入框内容的长度大于最大长度限制(max)时,终止setData()的执行
  38 + this.setData({
  39 + currentWordNumber: len //当前字数
  40 + });
9 }, 41 },
  42 +
10 //返回客户信息 43 //返回客户信息
11 addLogs() { 44 addLogs() {
12 - var currentTab=1  
13 - wx.navigateTo({  
14 - url: '../remind/remind?currentTab=' + currentTab, 45 +
  46 + let url = 'counselor/logadd';
  47 + app.post(url, {
  48 + DefId: this.data.DefId,
  49 + UserId: this.data.cid,
  50 + Content: this.data.content
  51 + }).then((res) => {
  52 + if (res.data.code == 200) {
  53 +
  54 + wx.showToast({
  55 + title: '添加日志成功',
  56 + icon: 'success',
  57 + duration: 2000
  58 + })
  59 + setTimeout(function() {
  60 + wx.navigateBack({
  61 + delta: 1
  62 + })
  63 + }, 3000)
  64 + }
  65 + }).catch((errMsg) => {
  66 + console.log(errMsg)
15 }) 67 })
  68 +
  69 +
  70 +
16 }, 71 },
17 /** 72 /**
18 * 生命周期函数--监听页面加载 73 * 生命周期函数--监听页面加载
19 */ 74 */
20 onLoad: function(options) { 75 onLoad: function(options) {
21 - 76 + let that = this;
  77 + that.setData({
  78 + DefId: options.DefId,
  79 + cid: options.cid
  80 + })
22 }, 81 },
23 82
24 /** 83 /**
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <text class='iconfont icon-wenjian'></text>添加日志 4 <text class='iconfont icon-wenjian'></text>添加日志
5 </view> 5 </view>
6 <view class='content_input'> 6 <view class='content_input'>
7 - <textarea class="areas" placeholder='请输入要添加的内容' minlength="{{min}}" maxlength="{{max}}" bindinput="gettext"> 7 + <textarea class="areas" placeholder='请输入要添加的内容' minlength="{{min}}" maxlength="{{max}}" bindinput="getText">
8 <text class="currentWordNumber">{{currentWordNumber|0}}/{{max}}</text> 8 <text class="currentWordNumber">{{currentWordNumber|0}}/{{max}}</text>
9 </textarea> 9 </textarea>
10 </view> 10 </view>
@@ -45,7 +45,8 @@ page { @@ -45,7 +45,8 @@ page {
45 .currentWordNumber { 45 .currentWordNumber {
46 position: absolute; 46 position: absolute;
47 bottom: 30rpx; 47 bottom: 30rpx;
48 - right: 100rpx; 48 + right: 0;
  49 + color: #999;
49 } 50 }
50 51
51 .bottom_btn { 52 .bottom_btn {
@@ -9,6 +9,7 @@ Page({ @@ -9,6 +9,7 @@ Page({
9 list:[], 9 list:[],
10 page:0 10 page:0
11 }, 11 },
  12 +
12 //文章详情 13 //文章详情
13 listDetail(e){ 14 listDetail(e){
14 console.log(e.currentTarget.id) 15 console.log(e.currentTarget.id)
@@ -16,11 +17,11 @@ Page({ @@ -16,11 +17,11 @@ Page({
16 url: '../ArticleDetails/ArticleDetails?NewsId='+e.currentTarget.id, 17 url: '../ArticleDetails/ArticleDetails?NewsId='+e.currentTarget.id,
17 }) 18 })
18 }, 19 },
  20 +
19 getlist(){ 21 getlist(){
20 let that=this; 22 let that=this;
21 let params = { 23 let params = {
22 userId: app.globalData.UserId, 24 userId: app.globalData.UserId,
23 - // userId: 166,  
24 page: that.data.page 25 page: that.data.page
25 } 26 }
26 let url ='counselor/NewsSend'; 27 let url ='counselor/NewsSend';
@@ -36,12 +37,14 @@ Page({ @@ -36,12 +37,14 @@ Page({
36 console.log(err) 37 console.log(err)
37 }) 38 })
38 }, 39 },
  40 +
  41 +
39 /** 42 /**
40 * 生命周期函数--监听页面加载 43 * 生命周期函数--监听页面加载
41 */ 44 */
42 onLoad: function (options) { 45 onLoad: function (options) {
43 -  
44 - 46 + let that = this;
  47 + that.getlist();
45 }, 48 },
46 49
47 /** 50 /**
@@ -9,13 +9,13 @@ Page({ @@ -9,13 +9,13 @@ Page({
9 PushId:'', 9 PushId:'',
10 list:[] 10 list:[]
11 }, 11 },
  12 +
12 getlist(){ 13 getlist(){
13 let that=this; 14 let that=this;
14 let url ='counselor/PushDef'; 15 let url ='counselor/PushDef';
15 let params={ 16 let params={
16 pushId: that.data.PushId, 17 pushId: that.data.PushId,
17 userId: app.globalData.UserId, 18 userId: app.globalData.UserId,
18 -  
19 } 19 }
20 app.post(url,params).then((res)=>{ 20 app.post(url,params).then((res)=>{
21 if(res.data.code==200){ 21 if(res.data.code==200){
1 <view class="content_box"> 1 <view class="content_box">
2 <view class='content_title'> 2 <view class='content_title'>
3 - <text>交易记录</text> 3 + <text>共{{list.sum}}人浏览</text>
4 </view> 4 </view>
5 <view class='list_box'> 5 <view class='list_box'>
6 <view class="item_list" wx:for='{{list.list}}' wx:key> 6 <view class="item_list" wx:for='{{list.list}}' wx:key>
7 - <view class="list_content">{{item.user_nickname}}</view> 7 + <view class="list_content">{{item.name}}</view>
8 <view class='list_info'>浏览{{item.num}}次</view> 8 <view class='list_info'>浏览{{item.num}}次</view>
9 </view> 9 </view>
10 </view> 10 </view>
1 // pages/consultantList/consultantList.js 1 // pages/consultantList/consultantList.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 +
  12 +
  13 + // 跳转顾问认证
  14 + getList() {
  15 + console.log(app.globalData.UserId)
  16 + let url = 'member/counselorlist';
  17 + let params={
  18 + UserId : app.globalData.UserId
  19 + }
  20 + app.post(url, params).then((res) => {
  21 + console.log(res)
  22 + if (res.data.code = 200) {
  23 + this.setData({
  24 + list: res.data.data.list
  25 + })
  26 + }
  27 + }).catch((errMsg) => {
  28 + console.log(errMsg)
  29 + })
  30 + },
  31 +
8 32
  33 + //
  34 + listDetail(e){
  35 + var CounselorId=e.currentTarget.dataset.id
  36 + wx.navigateTo({
  37 + url: '/pages/index/editProfile2/editProfile2?CounselorId=' + CounselorId,
  38 + })
9 }, 39 },
10 40
  41 +
11 /** 42 /**
12 * 生命周期函数--监听页面加载 43 * 生命周期函数--监听页面加载
13 */ 44 */
14 onLoad: function (options) { 45 onLoad: function (options) {
15 - 46 + this.getList()
16 }, 47 },
17 48
18 /** 49 /**
1 <!--pages/consultantList/consultantList.wxml--> 1 <!--pages/consultantList/consultantList.wxml-->
2 -<view class='content_box'>  
3 - <view class='item_list' wx:for='{{[1,1,1,1,1]}}'> 2 +<view class='no_data' wx:if='{{list.length==0}}'>暂无数据</view>
  3 +<view class='content_box' wx:else>
  4 + <view class='item_list' wx:for='{{list}}' wx:key='' bindtap='listDetail' data-id='{{item.id}}'>
4 <view class='banner_box'> 5 <view class='banner_box'>
5 <view class='head_img'> 6 <view class='head_img'>
6 - <image src='/images/img2.png'></image> 7 + <image src='{{item.avatar}}'></image>
7 </view> 8 </view>
8 <view class='head_info_box'> 9 <view class='head_info_box'>
9 - <view class='user_name'>苏菀菁(联络人)</view> 10 + <view class='user_name'>{{item.name}}</view>
10 <view class='user_info'> 11 <view class='user_info'>
11 <text>电话</text> 12 <text>电话</text>
12 - <text>1893659824</text> 13 + <text>{{item.mobile}}</text>
13 </view> 14 </view>
14 </view> 15 </view>
15 </view> 16 </view>
1 // pages/editProfile/editProfile.js 1 // pages/editProfile/editProfile.js
  2 +const app=getApp()
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
  9 + userinfo: [],
  10 + username: '',
  11 + work: '',
  12 + workpost: '',
  13 + city: '',
  14 + honor: '',
  15 + signature: '',
  16 + worktime: '',
  17 + hasimg: '',
  18 + approve_pic:''
  19 + },
  20 +
  21 +
  22 + //获取资料详情
  23 + userInfo() {
  24 + let url = 'counselor/userdef'
  25 + let params = {
  26 + UserId: app.globalData.UserId
  27 + }
  28 + app.post(url, params).then((res) => {
  29 + console.log(res.data.data.list.work_time == '0000-00-00')
  30 + var worktime = res.data.data.list.work_time
  31 + if (res.data.data.list.work_time == '0000-00-00'){
  32 + worktime=''
  33 + }
  34 + if (res.data.code == 200) {
  35 + this.setData({
  36 + userinfo: res.data.data.list,
  37 + username: res.data.data.list.name,
  38 + work: res.data.data.list.work,
  39 + workpost: res.data.data.list.work_post,
  40 + city: res.data.data.list.city,
  41 + honor: res.data.data.list.honor,
  42 + signature: res.data.data.list.signature,
  43 + worktime: worktime,
  44 + hasimg: res.data.data.list.avatar,
  45 + approve_pic: res.data.data.list.approve_pic,
  46 + })
  47 + }
  48 + })
  49 + },
  50 +
8 51
  52 + // 选择上传的图片
  53 + chooseimg() { //这里是选取图片的方法
  54 + var that = this;
  55 + wx.chooseImage({
  56 + count: 1,
  57 + success: (res) => {
  58 + var tempFilePaths = res.tempFilePaths
  59 + let url = '/users/upload'
  60 + let strtime = +new Date()
  61 + let params = {
  62 + picurl: tempFilePaths[0],
  63 + strtime: strtime,
  64 + token: app.strTime(strtime)
  65 + }
  66 + wx.uploadFile({
  67 + url: 'https://insurance.w.broteam.cn/pubilc/upload', //仅为示例,非真实的接口地址
  68 + filePath: tempFilePaths[0],
  69 + name: 'picurl',
  70 + formData: {
  71 + 'strtime': strtime,
  72 + 'token': app.strTime(strtime)
  73 + },
  74 + success: function (res) {
  75 + var data = JSON.parse(res.data);
  76 + var picurl = data.data.picurl;
  77 + picurl = picurl.indexOf('http') != '-1' ? picurl : "http://" + picurl
  78 + that.setData({
  79 + hasimg: picurl
  80 + })
  81 +
  82 + }
  83 + })
  84 + }
  85 + })
  86 + },
  87 + // 选择上传的图片
  88 + chooseimg2() { //这里是选取图片的方法
  89 + var that = this;
  90 + wx.chooseImage({
  91 + count: 1,
  92 + success: (res) => {
  93 + var tempFilePaths = res.tempFilePaths
  94 + let url = '/users/upload'
  95 + let strtime = +new Date()
  96 + let params = {
  97 + picurl: tempFilePaths[0],
  98 + strtime: strtime,
  99 + token: app.strTime(strtime)
  100 + }
  101 + wx.uploadFile({
  102 + url: 'https://insurance.w.broteam.cn/pubilc/upload', //仅为示例,非真实的接口地址
  103 + filePath: tempFilePaths[0],
  104 + name: 'picurl',
  105 + formData: {
  106 + 'strtime': strtime,
  107 + 'token': app.strTime(strtime)
  108 + },
  109 + success: function (res) {
  110 + var data = JSON.parse(res.data);
  111 + var picurl = data.data.picurl;
  112 + picurl = picurl.indexOf('http') != '-1' ? picurl : "http://" + picurl
  113 + that.setData({
  114 + approve_pic: picurl
  115 + })
  116 +
  117 + }
  118 + })
  119 + }
  120 + })
9 }, 121 },
10 122
11 - //保存资料  
12 - saveInfo(){  
13 - wx.navigateBack({  
14 - delta:1 123 + //
  124 + userName(e) {
  125 + this.setData({
  126 + username: e.detail.value
  127 + })
  128 + },
  129 + //
  130 + work(e) {
  131 + this.setData({
  132 + work: e.detail.value
  133 + })
  134 + },
  135 + //
  136 + workPost(e) {
  137 + this.setData({
  138 + workpost: e.detail.value
  139 + })
  140 + },
  141 + //
  142 + city(e) {
  143 + this.setData({
  144 + city: e.detail.value
  145 + })
  146 + },
  147 + //
  148 + honor(e) {
  149 + this.setData({
  150 + honor: e.detail.value
  151 + })
  152 + },
  153 + //
  154 + signature(e) {
  155 + this.setData({
  156 + signature: e.detail.value
  157 + })
  158 + },
  159 + //
  160 + workTime(e) {
  161 + this.setData({
  162 + worktime: e.detail.value
15 }) 163 })
16 }, 164 },
17 165
  166 + //保存修改个人资料
  167 + saveInfo() {
  168 + let url = 'counselor/userdefdo'
  169 + let params = {
  170 + UserId: app.globalData.UserId,
  171 + Avatar: this.data.hasimg,
  172 + Name: this.data.username,
  173 + Work: this.data.work,
  174 + WorkPost: this.data.workpost,
  175 + City: this.data.city,
  176 + Honor: this.data.honor,
  177 + Signature: this.data.signature,
  178 + WorkTime: this.data.worktime,
  179 + ApprovePic:this.data.approve_pic
  180 + }
  181 + app.post(url, params).then((res) => {
  182 + this.userInfo()
  183 + if (res.data.code == 200) {
  184 + wx.showToast({
  185 + title: '保存成功',
  186 + icon: 'none',
  187 + duration: 2000,
  188 + })
  189 + wx.navigateBack({
  190 + delta: 1
  191 + })
  192 + }
  193 + })
  194 + },
18 /** 195 /**
19 * 生命周期函数--监听页面加载 196 * 生命周期函数--监听页面加载
20 */ 197 */
21 onLoad: function (options) { 198 onLoad: function (options) {
22 - 199 + this.userInfo()
23 }, 200 },
24 201
25 /** 202 /**
1 <!--pages/my/editProfile/editProfile.wxml--> 1 <!--pages/my/editProfile/editProfile.wxml-->
2 <view class='banner_box' bindtap='chooseimg'> 2 <view class='banner_box' bindtap='chooseimg'>
3 - <view class='header_opacity' wx:if='{{!hasimg}}'>  
4 - {{hasimg}} 3 + <view class='header_portrait' wx:if='{{!hasimg}}'>
5 <image src="{{userinfo.avatar}}"></image> 4 <image src="{{userinfo.avatar}}"></image>
6 - <view class='iconfont icon-zhaoxiangji1'></view> 5 + <view class='iconfont icon-bi'></view>
7 </view> 6 </view>
8 <view class='header_portrait'> 7 <view class='header_portrait'>
9 <!-- <view class='iconfont icon-zhaoxiangji1'></view> --> 8 <!-- <view class='iconfont icon-zhaoxiangji1'></view> -->
  9 + <view class='iconfont icon-bi' ></view>
10 <image src="{{hasimg}}"></image> 10 <image src="{{hasimg}}"></image>
11 </view> 11 </view>
12 12
@@ -16,25 +16,25 @@ @@ -16,25 +16,25 @@
16 <view class="item_list"> 16 <view class="item_list">
17 <view class="list_title">姓名</view> 17 <view class="list_title">姓名</view>
18 <view class="list_content"> 18 <view class="list_content">
19 - <input type="text" value='{{username}}' class="input_item" bindinput='userName'></input> 19 + <input type="text" placeholder='请输入' value="{{username?username:''}}" class="input_item" bindinput='userName'></input>
20 </view> 20 </view>
21 </view> 21 </view>
22 <view class="item_list"> 22 <view class="item_list">
23 <view class="list_title">保险公司</view> 23 <view class="list_title">保险公司</view>
24 <view class="list_content"> 24 <view class="list_content">
25 - <input type="text" value='{{work}}' class="input_item" bindinput='work'></input> 25 + <input type="text" placeholder='请输入' value="{{work}}" class="input_item" bindinput='work'></input>
26 </view> 26 </view>
27 </view> 27 </view>
28 <view class="item_list"> 28 <view class="item_list">
29 <view class="list_title">职业名称</view> 29 <view class="list_title">职业名称</view>
30 <view class="list_content"> 30 <view class="list_content">
31 - <input type="text" value='{{workpost}}' class="input_item" bindinput='workPost'></input> 31 + <input type="text" placeholder='请输入' value="{{workpost}}" class="input_item" bindinput='workPost'></input>
32 </view> 32 </view>
33 </view> 33 </view>
34 <view class="item_list"> 34 <view class="item_list">
35 <view class="list_title">所在城市</view> 35 <view class="list_title">所在城市</view>
36 <view class="list_content"> 36 <view class="list_content">
37 - <input type="text" value='{{city}}' class="input_item" bindinput='city'></input> 37 + <input type="text" placeholder='请输入' value="{{city}}" class="input_item" bindinput='city'></input>
38 </view> 38 </view>
39 </view> 39 </view>
40 </view> 40 </view>
@@ -42,36 +42,33 @@ @@ -42,36 +42,33 @@
42 <view class="item_list"> 42 <view class="item_list">
43 <view class="list_title">获得荣誉</view> 43 <view class="list_title">获得荣誉</view>
44 <view class="list_content"> 44 <view class="list_content">
45 - <input type="text" value='{{honor}}' class="input_item" bindinput='honor'></input> 45 + <input type="text" placeholder='请输入' value="{{honor}}" class="input_item" bindinput='honor'></input>
46 </view> 46 </view>
47 </view> 47 </view>
48 <view class="item_list"> 48 <view class="item_list">
49 <view class="list_title">座右铭</view> 49 <view class="list_title">座右铭</view>
50 <view class="list_content"> 50 <view class="list_content">
51 - <input type="text" value='{{signature}}' class="input_item" bindinput='signature'></input> 51 + <input type="text" placeholder='请输入' value="{{signature}}" class="input_item" bindinput='signature'></input>
52 </view> 52 </view>
53 </view> 53 </view>
54 <view class="item_list"> 54 <view class="item_list">
55 <view class="list_title">从业时间</view> 55 <view class="list_title">从业时间</view>
56 - <view class="list_content">  
57 - <!-- 默认单位年 -->  
58 - <input type="text" value='{{worktime}}' class="input_item" bindinput='workTime'></input> 56 + <view class="list_content">
  57 + <!-- 默认单位年 -->
  58 + <input type="text" placeholder='请输入' value='{{worktime}}' class="input_item" bindinput='workTime'></input>
59 </view> 59 </view>
60 </view> 60 </view>
61 <view class='box'> 61 <view class='box'>
62 <!-- 上传图片 --> 62 <!-- 上传图片 -->
63 - <view class='upload_box'>  
64 - <!-- <block wx:for='{{imgs}}' wx:key=''>  
65 - <view class='popup_img'>  
66 - <view class='iconfont icon-guanbi' catchtap='deleteImg' data-index='{{index}}'></view>  
67 - <image src='{{item}}' bindtap='viewImg' data-index='{{index}}'></image>  
68 - </view>  
69 - </block> -->  
70 - <!-- wx:if='{{imgs.length<6}}' -->  
71 - <view bindtap='uploadImage'> 63 + <view class='upload_box' bindtap='chooseimg2'>
  64 + <view wx:if="{{approve_pic==''}}">
72 <view class='iconfont icon-add'></view> 65 <view class='iconfont icon-add'></view>
73 <view>上传照片</view> 66 <view>上传照片</view>
74 </view> 67 </view>
  68 + <view class='popup_img' wx:else>
  69 + <!-- <view class='iconfont icon-guanbi' catchtap='deleteImg' data-index='{{index}}'></view> -->
  70 + <image src='{{approve_pic}}' bindtap='viewImg' data-index='{{index}}'></image>
  71 + </view>
75 </view> 72 </view>
76 <view class="save_btn" bindtap='saveInfo'>保存</view> 73 <view class="save_btn" bindtap='saveInfo'>保存</view>
77 </view> 74 </view>
@@ -27,7 +27,22 @@ page { @@ -27,7 +27,22 @@ page {
27 align-items: center; 27 align-items: center;
28 justify-content: center; 28 justify-content: center;
29 } 29 }
30 - 30 +.icon-bi {
  31 + width: 40rpx;
  32 + height: 40rpx;
  33 + font-size: 26rpx;
  34 + color: #f80;
  35 + background: #f5f5fa;
  36 + opacity: 0.8;
  37 + border-radius: 50%;
  38 + position: absolute;
  39 + right: 0rpx;
  40 + bottom: 0;
  41 + z-index: 10;
  42 + display: flex;
  43 + align-items: center;
  44 + justify-content: center;
  45 +}
31 .header_portrait image { 46 .header_portrait image {
32 width: 100%; 47 width: 100%;
33 height: 100%; 48 height: 100%;
@@ -37,7 +52,7 @@ page { @@ -37,7 +52,7 @@ page {
37 .header_opacity { 52 .header_opacity {
38 width: 200rpx; 53 width: 200rpx;
39 height: 200rpx; 54 height: 200rpx;
40 - background-color: rgba(0, 0, 0, 0.6); 55 + /* background-color: rgba(0, 0, 0, 0.6); */
41 border-radius: 50%; 56 border-radius: 50%;
42 position: absolute; 57 position: absolute;
43 top: 50%; 58 top: 50%;
@@ -47,7 +62,7 @@ page { @@ -47,7 +62,7 @@ page {
47 display: flex; 62 display: flex;
48 align-items: center; 63 align-items: center;
49 justify-content: center; 64 justify-content: center;
50 - overflow: hidden; 65 + /* overflow: hidden; */
51 } 66 }
52 67
53 .icon-zhaoxiangji1 { 68 .icon-zhaoxiangji1 {
@@ -32,6 +32,7 @@ Page({ @@ -32,6 +32,7 @@ Page({
32 getIndex() { 32 getIndex() {
33 let url = 'pubilc/index' 33 let url = 'pubilc/index'
34 app.post(url, null).then((res) => { 34 app.post(url, null).then((res) => {
  35 + console.log(res)
35 this.setData({ 36 this.setData({
36 imgUrls: res.data.data.banner, 37 imgUrls: res.data.data.banner,
37 modules: res.data.data.modules, 38 modules: res.data.data.modules,
@@ -51,7 +52,7 @@ Page({ @@ -51,7 +52,7 @@ Page({
51 52
52 // 客户管理跳转 53 // 客户管理跳转
53 goclient: function() { 54 goclient: function() {
54 - if (app.globalData.UserType == 3) { 55 + if (app.globalData.UserType == 3 || app.globalData.UserType == 4) {
55 wx.navigateTo({ 56 wx.navigateTo({
56 url: '../index/CustomerManagement/CustomerManagement', 57 url: '../index/CustomerManagement/CustomerManagement',
57 }) 58 })
@@ -65,7 +66,7 @@ Page({ @@ -65,7 +66,7 @@ Page({
65 66
66 // 保单体检 67 // 保单体检
67 gotest: function() { 68 gotest: function() {
68 - if (app.globalData.UserType == 3) { 69 + if (app.globalData.UserType == 3 || app.globalData.UserType == 4) {
69 wx.navigateTo({ 70 wx.navigateTo({
70 url: '../index/periodicReviews/periodicReviews', 71 url: '../index/periodicReviews/periodicReviews',
71 }) 72 })
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 </swiper> 11 </swiper>
12 <view class="dots"> 12 <view class="dots">
13 <block wx:for="{{imgUrls}}" wx:key=''> 13 <block wx:for="{{imgUrls}}" wx:key=''>
14 - <view class="dot{{index == currentSwiper ? ' active' : ''}}"></view> 14 + <view class="dot{{index == currentSwiper ? 'active' : ''}}"></view>
15 </block> 15 </block>
16 </view> 16 </view>
17 </view> 17 </view>
@@ -20,28 +20,12 @@ @@ -20,28 +20,12 @@
20 <view class='sub_title'>一款专注于保险售后服务的专属工具</view> 20 <view class='sub_title'>一款专注于保险售后服务的专属工具</view>
21 </view> 21 </view>
22 <view class='cell_box'> 22 <view class='cell_box'>
23 - <!-- <view class='cell' style='background-image:url({{modules[0].picurl}});' bindtap='goclient'> 23 + <view class='cell' style='background-image:url({{modules[0].picurl}});' bindtap='goclient'>
24 </view> 24 </view>
25 <view class='cell' style='background-image:url({{modules[1].picurl}});' bindtap='gotest'> 25 <view class='cell' style='background-image:url({{modules[1].picurl}});' bindtap='gotest'>
26 </view> 26 </view>
27 <view class='cell' style='background-image:url({{modules[2].picurl}});' bindtap='golearn'> 27 <view class='cell' style='background-image:url({{modules[2].picurl}});' bindtap='golearn'>
28 </view> 28 </view>
29 <view class='cell' style='background-image:url({{modules[3].picurl}});'bindtap='weikaifa'> 29 <view class='cell' style='background-image:url({{modules[3].picurl}});'bindtap='weikaifa'>
30 - </view> -->  
31 - <view class='cell' style='background-image: url(../../images/icon01.png);' bindtap='goclient'>  
32 - <view class='cell_title'>客户管理</view>  
33 - <view class='cell_subtitle'>Customer Management</view>  
34 - </view>  
35 - <view class='cell' style='background-image: url(../../images/icon02.png);' bindtap='gotest'>  
36 - <view class='cell_title'>保单体检</view>  
37 - <view class='cell_subtitle'>Health Examination</view>  
38 - </view>  
39 - <view class='cell' style='background-image: url(../../images/icon03.png);' bindtap='golearn'>  
40 - <view class='cell_title'>学习分享</view>  
41 - <view class='cell_subtitle'>Learning Sharing</view>  
42 - </view>  
43 - <view class='cell' style='background-image: url(../../images/icon04.png);' bindtap='estimationTools'>  
44 - <view class='cell_title'>计算工具</view>  
45 - <view class='cell_subtitle'>Computational tools</view>  
46 </view> 30 </view>
47 </view> 31 </view>
@@ -10,9 +10,10 @@ Page({ @@ -10,9 +10,10 @@ Page({
10 MenuId: 0, //分类id 10 MenuId: 0, //分类id
11 KeyWord: '', 11 KeyWord: '',
12 Page: 0, 12 Page: 0,
13 - news:[],  
14 - hasMoreData:false 13 + news: [],
  14 + hasMoreData: false
15 }, 15 },
  16 +
16 //设置查询的关键词 17 //设置查询的关键词
17 setKeyWord(e) { 18 setKeyWord(e) {
18 let that = this; 19 let that = this;
@@ -20,6 +21,7 @@ Page({ @@ -20,6 +21,7 @@ Page({
20 KeyWord: e.detail.value 21 KeyWord: e.detail.value
21 }) 22 })
22 }, 23 },
  24 +
23 // 选择分类 25 // 选择分类
24 chooseClassify(e) { 26 chooseClassify(e) {
25 var id = e.currentTarget.dataset.id 27 var id = e.currentTarget.dataset.id
@@ -28,6 +30,7 @@ Page({ @@ -28,6 +30,7 @@ Page({
28 }) 30 })
29 this.getdata(); 31 this.getdata();
30 }, 32 },
  33 +
31 //获取文章类别 34 //获取文章类别
32 getdata() { 35 getdata() {
33 let that = this; 36 let that = this;
@@ -41,7 +44,7 @@ Page({ @@ -41,7 +44,7 @@ Page({
41 console.log(res) 44 console.log(res)
42 if (res.data.code == 200) { 45 if (res.data.code == 200) {
43 this.setData({ 46 this.setData({
44 - classify:res.data.data.menu, 47 + classify: res.data.data.menu,
45 news: res.data.data.news, 48 news: res.data.data.news,
46 }) 49 })
47 // if (MenuId == 0) { 50 // if (MenuId == 0) {
@@ -68,11 +71,12 @@ Page({ @@ -68,11 +71,12 @@ Page({
68 71
69 //文章详情 72 //文章详情
70 listDetail(e) { 73 listDetail(e) {
71 - var NewsId=e.currentTarget.dataset.id 74 + var NewsId = e.currentTarget.dataset.id
72 wx.navigateTo({ 75 wx.navigateTo({
73 url: '../ArticleDetails/ArticleDetails?NewsId=' + NewsId, 76 url: '../ArticleDetails/ArticleDetails?NewsId=' + NewsId,
74 }) 77 })
75 }, 78 },
  79 +
76 /** 80 /**
77 * 生命周期函数--监听页面加载 81 * 生命周期函数--监听页面加载
78 */ 82 */
@@ -91,7 +95,7 @@ Page({ @@ -91,7 +95,7 @@ Page({
91 * 生命周期函数--监听页面显示 95 * 生命周期函数--监听页面显示
92 */ 96 */
93 onShow: function() { 97 onShow: function() {
94 - 98 + this.getdata();
95 }, 99 },
96 100
97 /** 101 /**
@@ -14,7 +14,7 @@ page { @@ -14,7 +14,7 @@ page {
14 height: 64rpx; 14 height: 64rpx;
15 background: #fafafa; 15 background: #fafafa;
16 border-radius: 32rpx; 16 border-radius: 32rpx;
17 - font-size: 26rpx; 17 + font-size: 30rpx;
18 display: flex; 18 display: flex;
19 align-items: center; 19 align-items: center;
20 justify-content: space-between; 20 justify-content: space-between;
@@ -134,7 +134,8 @@ page { @@ -134,7 +134,8 @@ page {
134 134
135 .list_label { 135 .list_label {
136 display: inline-block; 136 display: inline-block;
137 - width: 70rpx; 137 + /* width: 70rpx; */
  138 + padding: 5rpx 10rpx;
138 height: 30rpx; 139 height: 30rpx;
139 border-radius: 5rpx; 140 border-radius: 5rpx;
140 border: 1rpx solid #0286ff; 141 border: 1rpx solid #0286ff;
@@ -12,6 +12,7 @@ Page({ @@ -12,6 +12,7 @@ Page({
12 PayType: 1, //1为余额支付2为微信支付 12 PayType: 1, //1为余额支付2为微信支付
13 balance: '', 13 balance: '',
14 Page: 0, 14 Page: 0,
  15 + end_time:''
15 }, 16 },
16 setpaytype1() { 17 setpaytype1() {
17 this.setData({ 18 this.setData({
@@ -108,7 +109,8 @@ Page({ @@ -108,7 +109,8 @@ Page({
108 console.log(res) 109 console.log(res)
109 if (res.data.code == 200) { 110 if (res.data.code == 200) {
110 this.setData({ 111 this.setData({
111 - balance: Math.round(res.data.data.balance) 112 + balance: Math.round(res.data.data.balance),
  113 + end_time: res.data.data.end_time
112 }) 114 })
113 115
114 } 116 }
@@ -27,4 +27,5 @@ @@ -27,4 +27,5 @@
27 </view> 27 </view>
28 </view> 28 </view>
29 <view class='balance'>您的可用T币余额: <text>{{balance}}</text> </view> 29 <view class='balance'>您的可用T币余额: <text>{{balance}}</text> </view>
  30 +<view class='balance'>您的到期时间: <text>{{end_time}}</text> </view>
30 <view class='bottom_btn' bindtap='gopay'>立即支付</view> 31 <view class='bottom_btn' bindtap='gopay'>立即支付</view>
1 // pages/index/periodicReviews/periodicReviews.js 1 // pages/index/periodicReviews/periodicReviews.js
2 -const app=getApp() 2 +const app = getApp()
3 Page({ 3 Page({
4 4
5 /** 5 /**
6 * 页面的初始数据 6 * 页面的初始数据
7 */ 7 */
8 data: { 8 data: {
9 - KeyWord:'' 9 + KeyWord: '',
  10 + vip_state:false
10 }, 11 },
  12 +
11 //设置搜索关键词 13 //设置搜索关键词
12 setkeyword(e) { 14 setkeyword(e) {
13 this.setData({ 15 this.setData({
@@ -15,11 +17,20 @@ Page({ @@ -15,11 +17,20 @@ Page({
15 }) 17 })
16 }, 18 },
17 19
  20 + //
  21 + goData() {
  22 + this.getData()
  23 + },
  24 +
18 //家庭保单汇总表 25 //家庭保单汇总表
19 summaryList(e) { 26 summaryList(e) {
20 var num = e.currentTarget.dataset.num 27 var num = e.currentTarget.dataset.num
21 var index = e.currentTarget.dataset.index 28 var index = e.currentTarget.dataset.index
22 var allinfo = JSON.stringify(e.currentTarget.dataset.allinfo) 29 var allinfo = JSON.stringify(e.currentTarget.dataset.allinfo)
  30 +
  31 + this.setData({
  32 + allinfo: allinfo
  33 + })
23 var mid = e.currentTarget.dataset.mid 34 var mid = e.currentTarget.dataset.mid
24 if (mid == 1) { 35 if (mid == 1) {
25 this.setData({ 36 this.setData({
@@ -36,15 +47,12 @@ Page({ @@ -36,15 +47,12 @@ Page({
36 url: '../summaryList/summaryList?allinfo=' + allinfo, 47 url: '../summaryList/summaryList?allinfo=' + allinfo,
37 }) 48 })
38 } 49 }
39 - // wx.navigateTo({  
40 - // url: '../summaryList/summaryList',  
41 - // })  
42 }, 50 },
43 51
44 //保单列表 52 //保单列表
45 policyList(e) { 53 policyList(e) {
46 wx.navigateTo({ 54 wx.navigateTo({
47 - url: '../policyList/policyList?DefId=' + e.currentTarget.id, 55 + url: '/pages/index/personalPolicyList/personalPolicyList?DefId=' + e.currentTarget.id,
48 }) 56 })
49 }, 57 },
50 58
@@ -57,8 +65,9 @@ Page({ @@ -57,8 +65,9 @@ Page({
57 65
58 //报告列表 66 //报告列表
59 reportList(e) { 67 reportList(e) {
  68 + var allinfo = JSON.stringify(e.currentTarget.dataset.allinfo)
60 wx.navigateTo({ 69 wx.navigateTo({
61 - url: '../reportList/reportList?FamilyId=' + e.currentTarget.dataset.familyid, 70 + url: '../reportList/reportList?FamilyId=' + e.currentTarget.dataset.familyid+'&allinfo='+allinfo,
62 }) 71 })
63 }, 72 },
64 73
@@ -68,53 +77,57 @@ Page({ @@ -68,53 +77,57 @@ Page({
68 let url = 'counselor/familylist'; 77 let url = 'counselor/familylist';
69 let param = { 78 let param = {
70 UserId: app.globalData.UserId, 79 UserId: app.globalData.UserId,
71 - Status: 1, //固定传1 80 + Status: 1, //固定传1
72 KeyWord: that.data.KeyWord 81 KeyWord: that.data.KeyWord
73 } 82 }
74 app.post(url, param).then((res) => { 83 app.post(url, param).then((res) => {
75 console.log(res) 84 console.log(res)
76 if (res.data.code == 200) { 85 if (res.data.code == 200) {
77 if (res.data.data.type == '-13') { 86 if (res.data.data.type == '-13') {
78 - setTimeout(function () {  
79 - wx.showToast({  
80 - title: '会员到期,请充值',  
81 - icon: 'none',  
82 - duration: 2000,  
83 - success: function () { }  
84 - }, 2000)  
85 - wx.navigateTo({  
86 - url: '../../my/recharge/recharge',  
87 - }) 87 + wx.showToast({
  88 + title: '会员到期,请充值',
  89 + icon: 'none',
  90 + duration: 2000,
  91 + success: function() {}
  92 + }, 2000)
  93 + that.setData({
  94 + vip_state: false
88 }) 95 })
89 -  
90 } else if (res.data.data.type == '-12') { 96 } else if (res.data.data.type == '-12') {
91 wx.showToast({ 97 wx.showToast({
92 title: '您已经被禁用,请联系管理员', 98 title: '您已经被禁用,请联系管理员',
93 icon: 'none', 99 icon: 'none',
94 - success: function () {  
95 - setTimeout(function () { 100 + success: function() {
  101 + setTimeout(function() {
96 wx.navigateTo({ 102 wx.navigateTo({
97 url: '/pages/index/index', 103 url: '/pages/index/index',
98 }) 104 })
99 }, 2000) 105 }, 2000)
100 } 106 }
101 }, 2000) 107 }, 2000)
  108 + that.setData({
  109 + vip_state: false
  110 + })
102 } else if (res.data.data.type == '-11') { 111 } else if (res.data.data.type == '-11') {
103 wx.showToast({ 112 wx.showToast({
104 title: '您的权限不足', 113 title: '您的权限不足',
105 icon: 'none', 114 icon: 'none',
106 - success: function () {  
107 - setTimeout(function () { 115 + success: function() {
  116 + setTimeout(function() {
108 wx.navigateTo({ 117 wx.navigateTo({
109 url: '/pages/index/index', 118 url: '/pages/index/index',
110 }) 119 })
111 }) 120 })
112 } 121 }
113 }, 2000) 122 }, 2000)
  123 + that.setData({
  124 + vip_state: false
  125 + })
114 } else { 126 } else {
115 that.setData({ 127 that.setData({
116 list: res.data.data.list, 128 list: res.data.data.list,
117 - KeyWord: '' 129 + KeyWord: '',
  130 + vip_state: true
118 }) 131 })
119 } 132 }
120 } 133 }
@@ -142,7 +155,7 @@ Page({ @@ -142,7 +155,7 @@ Page({
142 * 生命周期函数--监听页面显示 155 * 生命周期函数--监听页面显示
143 */ 156 */
144 onShow: function() { 157 onShow: function() {
145 - 158 + this.getData()
146 }, 159 },
147 160
148 /** 161 /**
@@ -10,10 +10,9 @@ @@ -10,10 +10,9 @@
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='{{list}}' wx:key='' wx:for-index='indexs' wx:for-item='items'> 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' data-num='{{items.infor}}'  
16 - data-family_id='{{items.family_id}}' data-allinfo='{{items}}'> 15 + <view class='list_label_box' bindtap='summaryList' data-num='{{items.infor}}' data-family_id='{{items.family_id}}' data-allinfo='{{items}}'>
17 <view class='iconfont icon-jiating1'></view> 16 <view class='iconfont icon-jiating1'></view>
18 <view>生成报告</view> 17 <view>生成报告</view>
19 <text class='peoper_num'>{{items.infor}}</text> 18 <text class='peoper_num'>{{items.infor}}</text>
@@ -22,7 +21,8 @@ @@ -22,7 +21,8 @@
22 <view class='list_label_item'> 21 <view class='list_label_item'>
23 <view class='label_item' bindtap='policyList' wx:for='{{items.users}}' wx:for-item='item' wx:for-index="index" wx:key id='{{item.id}}'> 22 <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> 23 <text>{{item.name}}({{item.family_role}})</text>
25 - <text class='iconfont icon-yuan '></text> 24 + <text class='iconfont icon-yuan' wx:if='{{item.user_family==1}}'></text>
  25 +
26 </view> 26 </view>
27 <!-- <view class='label_item'> 27 <!-- <view class='label_item'>
28 <text>曹文正(爸爸)</text> 28 <text>曹文正(爸爸)</text>
@@ -30,13 +30,13 @@ @@ -30,13 +30,13 @@
30 </view> 30 </view>
31 <view class='label_item'> 31 <view class='label_item'>
32 <text>曹文正(爸爸)</text> 32 <text>曹文正(爸爸)</text>
33 - <!-- <text class='iconfont icon-yuan user_point'></text> 33 + <!-- <text class='iconfont icon-yuan user_point' wx:if='{{item.key_status==1}}'></text>
34 </view> --> 34 </view> -->
35 </view> 35 </view>
36 </view> 36 </view>
37 <view class='list_right_box'> 37 <view class='list_right_box'>
38 <view class='list_btn_box'> 38 <view class='list_btn_box'>
39 - <view class='list_btn' bindtap='PolicyManage' data-familyid='{{items.family_id}}'> 39 + <view class='list_btn' bindtap="{{vip_state?'PolicyManage':''}}" data-familyid='{{items.family_id}}'>
40 <view>保单管理</view> 40 <view>保单管理</view>
41 </view> 41 </view>
42 <view class='list_btn' bindtap='reportList' data-familyid='{{items.family_id}}' data-allinfo='{{items}}'> 42 <view class='list_btn' bindtap='reportList' data-familyid='{{items.family_id}}' data-allinfo='{{items}}'>
1 // pages/index/personInfo/personInfo.js 1 // pages/index/personInfo/personInfo.js
  2 +const app=getApp()
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
  9 + DefId: '',//客户Id
  10 + datalist: ''
  11 + },
8 12
  13 + getData() {
  14 + let that = this;
  15 + let url = 'counselor/deflist';
  16 + app.post(url,
  17 + { DefId: this.data.DefId }).then((res) => {
  18 + console.log(res)
  19 + if (res.data.code == 200) {
  20 + that.setData({
  21 + datalist: res.data.data.list
  22 + })
  23 + }
  24 + }).catch((errMsg) => {
  25 + console.log(errMsg)
  26 + })
9 }, 27 },
10 28
11 /** 29 /**
12 * 生命周期函数--监听页面加载 30 * 生命周期函数--监听页面加载
13 */ 31 */
14 onLoad: function (options) { 32 onLoad: function (options) {
15 -  
16 - }, 33 + let that = this;
  34 + console.log(options)
  35 + that.setData({
  36 + DefId: options.DefId
  37 + })
  38 + that.getData();
  39 + },
17 40
18 /** 41 /**
19 * 生命周期函数--监听页面初次渲染完成 42 * 生命周期函数--监听页面初次渲染完成
1 // pages/PolicyList/PolicyList.js 1 // pages/PolicyList/PolicyList.js
  2 +const app=getApp()
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
8 - 9 + policylist: [],
  10 + DefId: ''//客户Id
9 }, 11 },
  12 +
10 // 13 //
11 - listDetail() { 14 + listDetail(e) {
  15 + var InId = e.currentTarget.dataset.id
12 wx.navigateTo({ 16 wx.navigateTo({
13 - url: '../policyListDetail/policyListDetail', 17 + url: '../policyListDetail/policyListDetail?InId=' + InId,
  18 + })
  19 + },
  20 +
  21 + // 保单列表接口调取
  22 + policyList() {
  23 + let that = this;
  24 + let url = 'member/insurancelist'
  25 + let params = {
  26 + UserId: app.globalData.UserId
  27 + }
  28 +
  29 + app.post(url, params).then((res) => {
  30 + console.log(res)
  31 + that.setData({
  32 + policylist: res.data.data.list
  33 + })
  34 + console.log(that.data.policylist)
14 }) 35 })
15 }, 36 },
  37 +
  38 +
  39 +
16 /** 40 /**
17 * 生命周期函数--监听页面加载 41 * 生命周期函数--监听页面加载
18 */ 42 */
19 - onLoad: function(options) { 43 + onLoad: function (options) {
  44 + let that = this;
20 45
  46 + console.log(options.DefId);
  47 + that.setData({
  48 + DefId: options.DefId
  49 + })
  50 +
  51 + this.policyList()
21 }, 52 },
22 53
  54 +
23 /** 55 /**
24 * 生命周期函数--监听页面初次渲染完成 56 * 生命周期函数--监听页面初次渲染完成
25 */ 57 */
1 <!--pages/PolicyList/PolicyList.wxml--> 1 <!--pages/PolicyList/PolicyList.wxml-->
2 -<view class='content_box' wx:for='{{[1,1,1,1,1]}}' bindtap='listDetail'>  
3 - <view class='item_list'>  
4 - <view class='list_title_box'>  
5 - <view>  
6 - <text class='user_name'>某顾问</text>  
7 - <text class='phone_num'>18965842659</text> 2 +<view class='no_data' wx:if='{{policylist.length==0}}'>暂无数据</view>
  3 +<block wx:else>
  4 + <view class='content_box' wx:for='{{policylist}}' wx:key='' bindtap='listDetail' data-id='{{item.id}}'>
  5 + <view class='item_list'>
  6 + <view class='list_title_box'>
  7 + <view>
  8 + <text class='user_name'>{{item.recognizee}}</text>
  9 + <text class='phone_num'>{{item.umobile}}</text>
  10 + </view>
  11 + <view class='list_icon_box'>
  12 + <view class='iconfont icon-dianhua2'></view>
  13 + </view>
8 </view> 14 </view>
9 - <view class='list_icon_box'>  
10 - <view class='iconfont icon-dianhua2'></view>  
11 - </view>  
12 - </view>  
13 - <view class='list_content_box'>  
14 - <view>  
15 - <text class='list_info'>被保险人:某某某</text>  
16 - </view>  
17 - <view>  
18 - <text class='list_title'>主险名称</text>  
19 - <text>平安保险</text>  
20 - </view>  
21 - <view>  
22 - <text class='list_title'>主险名称</text>  
23 - <text>2018年11月30日</text>  
24 - </view>  
25 - <view>  
26 - <text class='list_title'>保额</text>  
27 - <text>8000万元</text>  
28 - </view>  
29 - <view>  
30 - <text class='list_title'>保费</text>  
31 - <text>10万元</text> 15 + <view class='list_content_box'>
  16 + <view>
  17 + <text class='list_info'>被保险人:{{item.recognizee}}</text>
  18 + </view>
  19 + <view>
  20 + <text class='list_title'>主险名称</text>
  21 + <text>平安保险</text>
  22 + </view>
  23 + <view>
  24 + <text class='list_title'>生效日</text>
  25 + <text>{{item.compact_time}}</text>
  26 + </view>
  27 + <view>
  28 + <text class='list_title'>保额</text>
  29 + <text>{{item.coverage}}万元</text>
  30 + </view>
  31 + <view>
  32 + <text class='list_title'>保费</text>
  33 + <text>10万元</text>
  34 + </view>
32 </view> 35 </view>
33 </view> 36 </view>
34 </view> 37 </view>
35 -</view> 38 +
  39 +</block>
1 -// pages/index/PolicyListDetail/PolicyListDetail.js 1 +// pages/my/listDetail/listDetail.js
  2 +const app = getApp()
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
  9 + InId: '',
  10 + listdetail: [], //保单详情列表
  11 + insurancetype: [], //保险类型
  12 + },
8 13
  14 + // 保单详情接口调取
  15 + listDetail() {
  16 + let url = 'member/insurancedef'
  17 + let params = {
  18 + InId: this.data.InId
  19 + }
  20 + app.post(url, params).then((res) => {
  21 + console.log(res)
  22 + this.setData({
  23 + listdetail: res.data.data.def,
  24 + insurancetype: res.data.data.def.more.in,
  25 + })
  26 + })
9 }, 27 },
10 28
11 /** 29 /**
12 * 生命周期函数--监听页面加载 30 * 生命周期函数--监听页面加载
13 */ 31 */
14 onLoad: function (options) { 32 onLoad: function (options) {
15 - 33 + console.log(options)
  34 + let that = this;
  35 + that.setData({
  36 + InId: options.InId
  37 + })
  38 + this.listDetail()
16 }, 39 },
17 40
18 /** 41 /**
@@ -23,9 +23,12 @@ @@ -23,9 +23,12 @@
23 <view class='list_input'>{{listdetail.recognizee}}</view> 23 <view class='list_input'>{{listdetail.recognizee}}</view>
24 </view> 24 </view>
25 25
26 - <view class='item_list'> 26 + <view class='item_list' wx:for='{{listdetail.favoree}}' wx:key>
27 <view class='list_title'>受益人</view> 27 <view class='list_title'>受益人</view>
28 - <view class='list_input'> {{listdetail.favoree}}</view> 28 + <view class='list_input'>
  29 + <text>{{item.name}} </text>
  30 + <text>{{item.unit}}% </text>
  31 + </view>
29 </view> 32 </view>
30 <view class='item_list'> 33 <view class='item_list'>
31 <view class='list_title'>年缴保费</view> 34 <view class='list_title'>年缴保费</view>
@@ -41,7 +44,7 @@ @@ -41,7 +44,7 @@
41 </view> 44 </view>
42 <view class='item_list'> 45 <view class='item_list'>
43 <view class='list_title'>保障期</view> 46 <view class='list_title'>保障期</view>
44 - <view class='list_input'>{{listdetail.warranty}}</view> 47 + <view class='list_input'>{{listdetail.long_money.num}}{{listdetail.long_money.title}}</view>
45 </view> 48 </view>
46 <view class='item_list'> 49 <view class='item_list'>
47 <view class='list_title'>续费银行</view> 50 <view class='list_title'>续费银行</view>
@@ -51,11 +54,11 @@ @@ -51,11 +54,11 @@
51 <view class='list_title'>续费账号</view> 54 <view class='list_title'>续费账号</view>
52 <view class='list_input'>{{listdetail.bank_num}}</view> 55 <view class='list_input'>{{listdetail.bank_num}}</view>
53 </view> 56 </view>
54 - <view class='item_list'> 57 + <view class='item_list'>
55 <view class='list_title'>主险名称</view> 58 <view class='list_title'>主险名称</view>
56 <view class='list_input'>{{listdetail.main_risks}}</view> 59 <view class='list_input'>{{listdetail.main_risks}}</view>
57 </view> 60 </view>
58 - <view class='item_list'> 61 + <view class='item_list'>
59 <view class='list_title'>主险保额</view> 62 <view class='list_title'>主险保额</view>
60 <view class='list_input'>{{listdetail.coverage}}</view> 63 <view class='list_input'>{{listdetail.coverage}}</view>
61 </view> 64 </view>
@@ -42,19 +42,25 @@ page { @@ -42,19 +42,25 @@ page {
42 align-items: center; 42 align-items: center;
43 border-bottom: 1rpx dashed #ebebeb; 43 border-bottom: 1rpx dashed #ebebeb;
44 padding: 23rpx 0; 44 padding: 23rpx 0;
  45 + font-size: 28rpx;
  46 + color: #000;
45 } 47 }
46 48
47 .list_title { 49 .list_title {
48 width: 160rpx; 50 width: 160rpx;
49 - font-size: 24rpx; 51 + /* font-size: 24rpx; */
50 color: #000; 52 color: #000;
51 } 53 }
52 54
53 .list_input { 55 .list_input {
54 - font-size: 24rpx; 56 + /* font-size: 24rpx; */
55 color: #000; 57 color: #000;
56 } 58 }
57 59
  60 +.list_input text {
  61 + margin-right: 40rpx;
  62 +}
  63 +
58 .bottom_box { 64 .bottom_box {
59 padding: 32rpx; 65 padding: 32rpx;
60 margin-top: 16rpx; 66 margin-top: 16rpx;
@@ -63,5 +69,3 @@ page { @@ -63,5 +69,3 @@ page {
63 align-items: center; 69 align-items: center;
64 justify-content: center; 70 justify-content: center;
65 } 71 }
66 -  
67 -  
1 // pages/policyManage/policyManage.js 1 // pages/policyManage/policyManage.js
2 -const app=getApp() 2 +const app = getApp()
3 Page({ 3 Page({
4 4
5 /** 5 /**
6 * 页面的初始数据 6 * 页面的初始数据
7 */ 7 */
8 data: { 8 data: {
9 - inforlist:[] 9 + inforlist: []
10 }, 10 },
  11 +
11 //添加保单 12 //添加保单
12 - addList() { 13 + addList(e) {
  14 + let def_id = e.currentTarget.dataset.id
  15 + let FamilyId = this.data.FamilyId
  16 + var name=e.currentTarget.dataset.name
13 wx.navigateTo({ 17 wx.navigateTo({
14 - url: '../addListDetail/addListDetail', 18 + url: '../addListDetail/addListDetail?def_id=' + e.currentTarget.id + '&FamilyId=' + FamilyId +'&name='+name
15 }) 19 })
16 }, 20 },
  21 +
17 //保单详情 22 //保单详情
18 - listDetail() { 23 + listDetail(e) {
  24 + var InId = e.currentTarget.dataset.def_id
19 wx.navigateTo({ 25 wx.navigateTo({
20 - url: '../policyListDetail/policyListDetail', 26 + url: '../policyListDetail/policyListDetail?InId=' + InId,
21 }) 27 })
22 }, 28 },
  29 +
23 //编辑保单 30 //编辑保单
24 - editPolicy() { 31 + editPolicy(e) {
  32 + let def_id = e.currentTarget.id;
  33 + let inforid = e.currentTarget.dataset.inforid; //保单id
  34 + let FamilyId = this.data.FamilyId
25 wx.navigateTo({ 35 wx.navigateTo({
26 - url: '../addListDetail/addListDetail', 36 + url: '../addListDetail/addListDetail?def_id=' + def_id + '&inforid=' + inforid + '&FamilyId=' + FamilyId,
27 }) 37 })
28 }, 38 },
  39 +
29 //删除保单 40 //删除保单
30 - delPolicy() { 41 + delPolicy(e) {
  42 + let inforid = e.currentTarget.dataset.inforid; //保单id
  43 + var that=this
31 wx.showModal({ 44 wx.showModal({
32 title: '提示', 45 title: '提示',
33 content: '确认要删除吗?', 46 content: '确认要删除吗?',
  47 + showCancel: true,
  48 + cancelText: '取消',
  49 + cancelColor: '#999',
  50 + confirmText: '确认',
  51 + confirmColor: '#0286FF',
  52 + success: function(res) {
  53 + if (res.confirm) {
  54 + let url = 'counselor/delinfor'
  55 + let params = {
  56 + InforId: inforid
  57 + }
  58 + app.post(url, params).then((res) => {
  59 + if (res.data.data.type == 1) {
  60 + wx.showToast({
  61 + title: '删除成功',
  62 + icon: 'none',
  63 + duration: 2000,
  64 + })
  65 + }
  66 + that.getData();
  67 + })
  68 + }
  69 + },
34 }) 70 })
35 }, 71 },
  72 +
36 //返回保单体检 73 //返回保单体检
37 periodicReviews() { 74 periodicReviews() {
38 wx.navigateTo({ 75 wx.navigateTo({
39 url: '../periodicReviews/periodicReviews', 76 url: '../periodicReviews/periodicReviews',
40 }) 77 })
41 }, 78 },
  79 +
42 //goRemind 80 //goRemind
43 goRemind() { 81 goRemind() {
44 wx.navigateTo({ 82 wx.navigateTo({
@@ -63,6 +101,7 @@ Page({ @@ -63,6 +101,7 @@ Page({
63 console.log(errMsg) 101 console.log(errMsg)
64 }) 102 })
65 }, 103 },
  104 +
66 /** 105 /**
67 * 生命周期函数--监听页面加载 106 * 生命周期函数--监听页面加载
68 */ 107 */
@@ -85,7 +124,8 @@ Page({ @@ -85,7 +124,8 @@ Page({
85 * 生命周期函数--监听页面显示 124 * 生命周期函数--监听页面显示
86 */ 125 */
87 onShow: function() { 126 onShow: function() {
88 - 127 + let that = this;
  128 + that.getData();
89 }, 129 },
90 130
91 /** 131 /**
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <view class='item_box' wx:for='{{inforlist}}' wx:for-index='indexs' wx:for-item="items" wx:key> 5 <view class='item_box' wx:for='{{inforlist}}' wx:for-index='indexs' wx:for-item="items" wx:key>
6 <view class='item_title_box item_top'> 6 <view class='item_title_box item_top'>
7 <view class='user_name'>{{items.name}}</view> 7 <view class='user_name'>{{items.name}}</view>
8 - <view class='item_cell' id='{{items.def_id}}' bindtap='addList'> 8 + <view class='item_cell' id='{{items.def_id}}' data-name='{{items.name}}' bindtap='addList'>
9 <view class='iconfont icon-tianjia'></view> 9 <view class='iconfont icon-tianjia'></view>
10 <view>添加保单</view> 10 <view>添加保单</view>
11 </view> 11 </view>
@@ -18,7 +18,7 @@ Page({ @@ -18,7 +18,7 @@ Page({
18 date: '请选择日期', 18 date: '请选择日期',
19 time: '获取验证码', //倒计时 19 time: '获取验证码', //倒计时
20 currentTime: 60, 20 currentTime: 60,
21 - disabled:true, 21 + disabled: true,
22 telnum: '', 22 telnum: '',
23 sharetext: '', 23 sharetext: '',
24 }, 24 },
@@ -317,10 +317,6 @@ Page({ @@ -317,10 +317,6 @@ Page({
317 image: '', 317 image: '',
318 duration: 1000, 318 duration: 1000,
319 }) 319 })
320 - } else if (res.data.data.type == 1) {  
321 - wx.navigateTo({  
322 - url: '../index/index',  
323 - })  
324 } else if (res.data.data.type == -1) { 320 } else if (res.data.data.type == -1) {
325 wx.showToast({ 321 wx.showToast({
326 title: '注册失败', 322 title: '注册失败',
@@ -328,7 +324,26 @@ Page({ @@ -328,7 +324,26 @@ Page({
328 image: '', 324 image: '',
329 duration: 1000, 325 duration: 1000,
330 }) 326 })
  327 + } else if (res.data.data.type == 1) {
  328 + console.log('tijiaochengong')
  329 + wx.showToast({
  330 + title: '注册成功',
  331 + icon: 'none',
  332 + })
  333 + // wx.switchTab({
  334 + // url: '/pages/index/index',
  335 + // })
  336 + wx.navigateTo({
  337 + url: '/pages/start/start',
  338 + })
331 } 339 }
  340 +
  341 + // else if(res.data.data.type == 1) {
  342 + // wx.navigateTo({
  343 + // url: '/pages/index/index',
  344 + // })
  345 + // }
  346 +
332 }) 347 })
333 } 348 }
334 349
@@ -21,17 +21,17 @@ @@ -21,17 +21,17 @@
21 <form bindsubmit="formSubmit"> 21 <form bindsubmit="formSubmit">
22 <view class='content_box'> 22 <view class='content_box'>
23 <view class='content_item'> 23 <view class='content_item'>
24 - <view class='item_list'> 24 + <view class='item_list'>
25 <view class='list_title'>真实姓名</view> 25 <view class='list_title'>真实姓名</view>
26 <view class='list_input'> 26 <view class='list_input'>
27 - <input type='text' placeholder='请填写您的真实姓名' name='name'></input> 27 + <input type='text' placeholder='请填写您的真实姓名' name='name' placeholder-class='pl_style'></input>
28 </view> 28 </view>
29 </view> 29 </view>
30 <view class='item_list'> 30 <view class='item_list'>
31 <view class='list_title'>所属机构</view> 31 <view class='list_title'>所属机构</view>
32 <view class='list_input'> 32 <view class='list_input'>
33 <picker class='list_picker' value='{{index}}' range='{{company_array}}' range-key="{{firm}}" bindchange="company"> 33 <picker class='list_picker' value='{{index}}' range='{{company_array}}' range-key="{{firm}}" bindchange="company">
34 - <input placeholder='请选择保险公司' value='{{company_array[company_index]}}' disabled='true'></input> 34 + <input placeholder='请选择保险公司' value='{{company_array[company_index]}}' disabled='true' placeholder-class='pl_style'></input>
35 <view class='iconfont icon-xiala'></view> 35 <view class='iconfont icon-xiala'></view>
36 </picker> 36 </picker>
37 </view> 37 </view>
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 <view class='list_title'>职业名称</view> 40 <view class='list_title'>职业名称</view>
41 <view class='list_input' bindtap='chargePicker'> 41 <view class='list_input' bindtap='chargePicker'>
42 <picker class='list_picker' value='{{titleindex}}' range='{{jobTitle_array}}' bindchange="jobTitle"> 42 <picker class='list_picker' value='{{titleindex}}' range='{{jobTitle_array}}' bindchange="jobTitle">
43 - <input placeholder='请选择当前职位' value='{{jobTitle_array[titleindex]}}' disabled='true'></input> 43 + <input placeholder='请选择当前职位' value='{{jobTitle_array[titleindex]}}' disabled='true' placeholder-class='pl_style'></input>
44 <view class='iconfont icon-xiala'></view> 44 <view class='iconfont icon-xiala'></view>
45 </picker> 45 </picker>
46 </view> 46 </view>
@@ -48,7 +48,7 @@ @@ -48,7 +48,7 @@
48 <view class='item_list'> 48 <view class='item_list'>
49 <view class='list_title'>所在城市</view> 49 <view class='list_title'>所在城市</view>
50 <view class='list_input'> 50 <view class='list_input'>
51 - <input type='text' placeholder='请填写您的所在城市' name='city'></input> 51 + <input type='text' placeholder='请填写您的所在城市' name='city' placeholder-class='pl_style'></input>
52 </view> 52 </view>
53 </view> 53 </view>
54 </view> 54 </view>
@@ -57,14 +57,14 @@ @@ -57,14 +57,14 @@
57 <view class='item_list'> 57 <view class='item_list'>
58 <view class='list_title'>手机号</view> 58 <view class='list_title'>手机号</view>
59 <view class='list_input'> 59 <view class='list_input'>
60 - <input type='text' placeholder='请填写手机号' name='tel' bindinput='telNum'></input> 60 + <input type='number' placeholder='请填写手机号' name='tel' bindinput='telNum' placeholder-class='pl_style'></input>
61 </view> 61 </view>
62 </view> 62 </view>
63 <!-- 获取验证码 --> 63 <!-- 获取验证码 -->
64 <view class='item_list'> 64 <view class='item_list'>
65 <view class='list_title'>验证码</view> 65 <view class='list_title'>验证码</view>
66 <view class='list_input '> 66 <view class='list_input '>
67 - <input type='text' placeholder='请填写验证码' class='verification_code' name='code'></input> 67 + <input type='number' placeholder='请填写验证码' class='verification_code' name='code' placeholder-class='pl_style'></input>
68 <view class='code_btn' wx:if='{{disabled}}' bindtap="getVerificationCode">{{time}}</view> 68 <view class='code_btn' wx:if='{{disabled}}' bindtap="getVerificationCode">{{time}}</view>
69 <view class='code_btn' wx:else>{{time}}</view> 69 <view class='code_btn' wx:else>{{time}}</view>
70 </view> 70 </view>
@@ -67,19 +67,25 @@ picker { @@ -67,19 +67,25 @@ picker {
67 67
68 .list_input { 68 .list_input {
69 width: 74%; 69 width: 74%;
70 - /* height: 100%; */  
71 margin-left: 36rpx; 70 margin-left: 36rpx;
72 display: flex; 71 display: flex;
73 } 72 }
74 73
75 .list_input input { 74 .list_input input {
76 - border: 1; 75 + width: 100%;
  76 + height: 100%;
  77 + border: 0;
77 outline: none; 78 outline: none;
  79 + font-size: 30rpx;
  80 +}
  81 +
  82 +.pl_style {
  83 + font-size: 30rpx;
  84 + color: #999;
78 } 85 }
79 86
80 .list_picker { 87 .list_picker {
81 width: 100%; 88 width: 100%;
82 - /* font-size: 24rpx; */  
83 position: relative; 89 position: relative;
84 } 90 }
85 91
@@ -146,10 +152,12 @@ picker { @@ -146,10 +152,12 @@ picker {
146 .agreement_hint { 152 .agreement_hint {
147 color: #0286ff; 153 color: #0286ff;
148 } 154 }
149 -.null_box{ 155 +
  156 +.null_box {
150 width: 100%; 157 width: 100%;
151 height: 180rpx; 158 height: 180rpx;
152 } 159 }
  160 +
153 .bottom_box { 161 .bottom_box {
154 width: 100%; 162 width: 100%;
155 background: #fff; 163 background: #fff;