Your Name 5 anni fa
parent
commit
634c13cd19

+ 2 - 1
app.json

@@ -1,5 +1,6 @@
1 1
 {
2 2
   "pages": [
3
+        "pages/personal_core/vehicle/vehicle",
3 4
  "pages/personal_core/remind/remind",
4 5
   "pages/Jurisdiction/click_Jurisdiction/click_Jurisdiction",
5 6
   "pages/Setup/modify/modify",
@@ -23,7 +24,7 @@
23 24
     "pages/personal_core/Realestate/Realestate",
24 25
     "pages/personal_core/Adegreein/Adegreein",
25 26
     "pages/personal_core/Realname/Realname",
26
-    "pages/personal_core/vehicle/vehicle",
27
+
27 28
     "pages/personal_core/home_list/home_list",
28 29
     "pages/index_details/index_details",
29 30
     "pages/index/index",

+ 1 - 1
pages/personal_core/Album/Album.json

@@ -1,3 +1,3 @@
1 1
 {
2
-  "navigationBarTitleText": "上传照片"
2
+  "navigationBarTitleText": "个人相册"
3 3
 }

+ 69 - 29
pages/personal_core/personaldata/personaldata.js

@@ -104,7 +104,7 @@ Page({
104 104
     let adopticon_data = {
105 105
     };
106 106
     app.postRequest(adopticon_url, adopticon_data, function (res) {
107
-      // console.log(res.data);
107
+      console.log(res.data);
108 108
       // console.log(res);
109 109
       if (res.code == 201) {
110 110
 
@@ -156,48 +156,88 @@ Page({
156 156
       sourceType: ['album', 'camera'],
157 157
       success(res) {
158 158
 
159
-        // console.log(res.tempFilePaths[0]);
160
-        // tempFilePath可以作为img标签的src属性显示图片
161
-        _this.setData({
162
-          uploadImages: res.tempFilePaths,
163
-          isMaxImagesNum: true,
164
-          uploadimg: false,
165
-          photo: res.tempFilePaths[0],
166
-        });
167 159
 
168
-        //上传图片
169
-        wx.uploadFile({
170
-          url: app.globalData.url + 'my/images/headimg',
171
-          filePath: res.tempFilePaths[0],
172
-          name: 'photo',
173
-          formData: {
174
-            key: wx.getStorageSync('access_key'),
175
-            token: wx.getStorageSync('access_token')
176
-          },
177
-          success: function (res) {
160
+        let tempFilesSize = res.tempFiles[0].size;
178 161
 
179
-            var data = JSON.parse(res.data);
162
+        if (tempFilesSize > 1024 * 1024 * 3) {
180 163
 
181
-            if (data.code == 201) {
164
+          wx.showModal({
165
+            title: '提示',
166
+            content: '图片不得超过3MB',
167
+            showCancel: false,
168
+          })
182 169
 
183
-              var _qrcode = '上传成功'
184
-              getApp().Tips(_qrcode);
170
+          return;
171
+        }
185 172
 
173
+        var Headportrait = res.tempFilePaths[0];
174
+        console.log(res.tempFilePaths[0]);
186 175
 
187
-              _this.onShow();
188 176
 
189
-              return;
177
+        wx.showModal({
178
+          title: '形象照',
179
+          content: '您确认上传此图片为形象照吗?',
180
+          success(res) {
181
+            if (res.confirm) {
182
+                        // console.log('用户点击确定')
183
+     
184
+                        // tempFilePath可以作为img标签的src属性显示图片
185
+                        _this.setData({
186
+                          uploadImages: Headportrait,
187
+                          isMaxImagesNum: true,
188
+                          uploadimg: false,
189
+                          photo: Headportrait,
190
+                        });
190 191
 
191
-            }
192
+                        //上传图片
193
+                        wx.uploadFile({
194
+                          url: app.globalData.url + 'my/images/headimg',
195
+                          filePath: Headportrait,
196
+                          name: 'photo',
197
+                          formData: {
198
+                            key: wx.getStorageSync('access_key'),
199
+                            token: wx.getStorageSync('access_token')
200
+                          },
201
+                          success: function (res) {
202
+
203
+                            var data = JSON.parse(res.data);
204
+                            console.log(data);
205
+                            if (data.code == 201) {
206
+
207
+                              var _qrcode = '上传成功'
208
+                              getApp().Tips(_qrcode);
209
+
210
+
211
+                              _this.onShow();
212
+
213
+                              return;
214
+
215
+                            }
216
+                          
217
+                            var _qrcode2 = data.msg;
218
+                            getApp().Tips(_qrcode2);
219
+                  
220
+
221
+                          }, fail: function (d) {
192 222
 
193
-            var _qrcode2 = '上传失败'
194
-            getApp().Tips(_qrcode2);
223
+                          }
224
+                        })
195 225
 
196
-          }, fail: function (d) {
226
+           
227
+            } else if (res.cancel) {
228
+
229
+              console.log('用户点击取消')
230
+            }
197 231
 
198 232
           }
199 233
         })
200 234
 
235
+
236
+
237
+
238
+
239
+
240
+
201 241
       }
202 242
     })
203 243
 

+ 26 - 8
pages/personal_core/personaldata/personaldata.wxml

@@ -22,7 +22,7 @@
22 22
                 </view>
23 23
 
24 24
                 <view class='Not_pass_img' hidden='{{uploadimg}}'>
25
-                        <image src='{{uploadImages}}'></image>
25
+                        <image mode="aspectFill" src='{{uploadImages}}'></image>
26 26
                 </view>
27 27
 
28 28
       </view>
@@ -131,13 +131,31 @@
131 131
       </view>
132 132
 
133 133
       <view class='data_rz_box c' wx:if='{{adopticoncode.code == 201}}'>
134
-              <block wx:for="{{adopticon}}" wx:key="item">
135
-                  <view class='data_rz'>
136
-                          <image src='{{item.icon}}' mode="aspectFill"></image>
137
-                          <text class='data_smrz'>{{item.name}}</text>
138
-                          <text class='data_yrz'>{{item.status}}</text>
139
-                  </view>
140
-              </block>
134
+
135
+                <view class='data_rz' wx:if='{{adopticon.shenfenzheng}}'>
136
+                          <image src='{{adopticon.shenfenzheng.icon}}' mode="aspectFill"></image>
137
+                          <text class='data_smrz'>{{adopticon.shenfenzheng.name}}</text>
138
+                          <text class='data_yrz'>{{adopticon.shenfenzheng.status}}</text>
139
+                </view>
140
+
141
+                <view class='data_rz' wx:if='{{adopticon.xueli}}'>
142
+                          <image src='{{adopticon.xueli.icon}}' mode="aspectFill"></image>
143
+                          <text class='data_smrz'>{{adopticon.xueli.name}}</text>
144
+                          <text class='data_yrz'>{{adopticon.xueli.status}}</text>
145
+                </view>
146
+
147
+               <view class='data_rz' wx:if='{{adopticon.chenliang}}'>
148
+                          <image src='{{adopticon.chenliang.icon}}' mode="aspectFill"></image>
149
+                          <text class='data_smrz'>{{adopticon.chenliang.name}}</text>
150
+                          <text class='data_yrz'>{{adopticon.chenliang.status}}</text>
151
+                </view>
152
+
153
+               <view class='data_rz' wx:if='{{adopticon.fangchangzheng}}'>
154
+                          <image src='{{adopticon.fangchangzheng.icon}}' mode="aspectFill"></image>
155
+                          <text class='data_smrz'>{{adopticon.fangchangzheng.name}}</text>
156
+                          <text class='data_yrz'>{{adopticon.fangchangzheng.status}}</text>
157
+                </view>
158
+
141 159
       </view>
142 160
 
143 161
       <view class='data_rz_box c'  wx:else>

+ 1 - 0
pages/personal_core/personaldata/personaldata.wxss

@@ -10,6 +10,7 @@
10 10
 .Headportrait_text text{font-size:25rpx;color:#FFF;margin-left:10rpx;}
11 11
 .Not_pass_img{width:100%;height:100%;}
12 12
 
13
+
13 14
 .personal_img_text{border:1px solid;position:absolute;bottom:0;left:0;}
14 15
 .personal_increase{position:absolute;bottom:20rpx;right:30rpx;width:56rpx;}
15 16
 .personal_increase image{width:100%;height:0;}

+ 29 - 94
pages/personal_core/personaldataModifythe/personaldataModifythe.js

@@ -208,7 +208,7 @@ Page({
208 208
             if (res.data[i].id == _income) {
209 209
 
210 210
                 that.setData({
211
-                  incomeindex: i,
211
+                   incomeindex: i,
212 212
                 })
213 213
             }
214 214
           }
@@ -222,12 +222,26 @@ Page({
222 222
 
223 223
 
224 224
       //  婚史 ajax
225
-      let Marriage_url = 'public/paramsgather?type=marriage';
225
+      let Marriage_url = 'public/paramsgather?type=marriage&marriage=1';
226 226
       let Marriage_data = {
227 227
         pid: '0'
228 228
       };
229
+
230
+      let _marry = res.data.marry;
231
+
229 232
       app.postRequest(Marriage_url, Marriage_data, function (res) {      //  婚史 ajax
230 233
         if (res.code == 201) {
234
+
235
+
236
+          for (let i = 0; i < res.data.length; i++) {    //已选中的数据处理
237
+            if (res.data[i].id == _marry) {
238
+
239
+              that.setData({
240
+                Marriageindex: i,
241
+              })
242
+            }
243
+          }
244
+
231 245
           // console.log(res.data);
232 246
           that.setData({
233 247
             MarriageArray: res.data
@@ -267,57 +281,8 @@ Page({
267 281
     })
268 282
 
269 283
 
270
-    // 获取区域ID
271
-    // var _openid = 0;
272
-    // try {
273
-    //   var value = wx.getStorageSync('openid');
274
-    //   if (value) {
275
-    //     _openid = value
276
-
277
-    //     that.setData({
278
-    //       openid: _openid
279
-    //     })
280
-
281
-
282
-    //   }
283
-    //   console.log(_openid);
284
-    // } catch (e) {
285
-    //   // Do something when catch error
286
-    // }
287 284
 
288 285
 
289
-
290
-    //  性别 ajax
291
-    // let p_url = 'public/paramsgather?type=sex';
292
-    // let p_data = {
293
-    //   // pid: '0'
294
-    // };
295
-    // app.postRequest(p_url, p_data, function (res) {      //  性别 ajax
296
-    //   if (res.code == 201) {
297
-    //     // console.log(res.data);
298
-    //     that.setData({
299
-    //       selectArray: res.data
300
-    //     })
301
-
302
-    //   }
303
-
304
-
305
-    // })
306
-
307
-
308
-    //  允许有意者联系我 ajax
309
-
310
-    // let contact_url = 'public/citypid';
311
-    // let contact_data = {
312
-    //   pid: '0'
313
-    // };
314
-    // app.postRequest(contact_url, contact_data, function (res) {      //  允许有意者联系我 ajax
315
-    //   // console.log(res);
316
-    //   that.setData({
317
-    //     contactArray: res.data
318
-    //   })
319
-    // })
320
-
321 286
   },
322 287
 
323 288
 
@@ -374,11 +339,12 @@ Page({
374 339
   MarriageEvent: function (e) {   //  婚史    单项选择器
375 340
     // console.log(this);
376 341
     // console.log(e);
342
+    console.log(this.data.MarriageArray[e.detail.value].id);
377 343
     // console.log(this.data.MarriageArray[e.detail.value]);
378 344
     // console.log('picker发送选择改变,携带值为', e.detail.value)
379 345
     this.setData({
380 346
       Marriageindex: e.detail.value,
381
-      marry: e.detail.value
347
+      marry: this.data.MarriageArray[e.detail.value].id
382 348
     })
383 349
   },
384 350
 
@@ -404,19 +370,6 @@ Page({
404 370
     })
405 371
   },
406 372
 
407
-  // contactEvent: function (e) {   //  允许有意者联系我    单项选择器
408
-  //   // console.log(this.data.selectArray[e.detail.value].area_name)
409
-  //   // console.log('picker发送选择改变,携带值为', e.detail.value)
410
-  //   console.log(this);
411
-  //   console.log(e);
412
-  //   console.log(this.data.contactArray[e.detail.value]);
413
-  //   console.log('picker发送选择改变,携带值为', e.detail.value)
414
-  //   this.setData({
415
-  //     contactindex: e.detail.value
416
-  //   })
417
-  // },
418
-
419
-
420 373
 
421 374
   getProvince() {    //  多项选择器
422 375
 
@@ -577,36 +530,18 @@ Page({
577 530
   //下一步事件
578 531
   register: function (e) {
579 532
 
580
-    console.log(this.data.nickname);       //  名字  
581
-    // console.log(this.data.sex);                 //  性别  
582
-    console.log(this.data.age);              //  年龄 
583
-    console.log(this.data.height);           //  身高 
584
-    console.log(this.data.education);      //  学历  
585
-    console.log(this.data.marry);          //   婚史 
586
-    console.log(this.data.income);        //  收入 
587
-    console.log(this.data.province);       //  省 
588
-    console.log(this.data.city);              //  市 
589
-    console.log(this.data.area);              //  区 
590
-
591
-
592
-
593
-    var nickname = this.data.nickname  //姓名
594
-    // var sex = this.data.sex                     //  性别  
595
-    var age = this.data.age                     //  年龄  
596
-    var height = this.data.height             //  身高  
597
-    var province = this.data.province      // 市
598
-    var city = this.data.city                       // 市
599
-    var area = this.data.area                     // 区
600
-    var education = this.data.education  //  学历  
601
-    var marry = this.data.marry                 //   婚史 
602
-    var income = this.data.income             //  收入 
603
-    var occupation = this.data.occupation  //  收入 occupation
604
-
605
-    // wx.navigateTo({
606
-    //   url: '/pages/register/fillTel/fillTel?nickname=' + nickname +  '&sex=' + sex + '&age=' + age + '&height=' + height + '&education=' + education + '&marry=' + marry + '&income=' + income + '&city=' + city + '&area=' + area + '&occupation=' + occupation + '&province=' + province + ''
607
-    // })
533
+    // console.log(this.data.nickname);       //  名字  
534
+     // console.log(this.data.sex);                 //  性别  
535
+    // console.log(this.data.age);              //  年龄 
536
+    // console.log(this.data.height);           //  身高 
537
+    // console.log(this.data.education);      //  学历  
538
+    // console.log(this.data.marry);          //   婚史 
539
+    // console.log(this.data.income);        //  收入 
540
+    // console.log(this.data.province);       //  省 
541
+    // console.log(this.data.city);              //  市 
542
+    // console.log(this.data.area);              //  区 
543
+
608 544
 
609
-  
610 545
 
611 546
     //  修改个人信息
612 547
     let editinfoform_url = 'my/personaldata/editinfoform';

+ 3 - 21
pages/personal_core/personaldataModifythe/personaldataModifythe.wxml

@@ -121,19 +121,19 @@
121 121
 
122 122
 
123 123
 <view class="Choice_dx_box">     <!--  婚史 单项选择器-->
124
-            <picker  bindchange="MarriageEvent" value="{{Marriageindex}}" range="{{MarriageArray}}">
124
+            <picker  bindchange="MarriageEvent" value="{{Marriageindex}}" range="{{MarriageArray}}"   range-key="name">
125 125
                     
126 126
                       <view class='Choice_dx c'>
127 127
                             <view class="Choice_dx_title">婚史</view>
128 128
 
129 129
                             <view class='Choice_dx_text' wx:if='{{personacodel.code == 201}}'>
130 130
                               
131
-                                  {{MarriageArray[Marriageindex]}}
131
+                                  {{MarriageArray[Marriageindex].name}}
132 132
                                 
133 133
                             </view>
134 134
                             <view class='Choice_dx_text' wx:else>
135 135
                               
136
-                                  {{MarriageArray[Marriageindex] ? MarriageArray[Marriageindex]  : "请选择"}}
136
+                                  {{MarriageArray[Marriageindex].name ? MarriageArray[Marriageindex].name  : "请选择"}}
137 137
                                 
138 138
                             </view>
139 139
                                 
@@ -184,24 +184,6 @@
184 184
 </view>
185 185
 
186 186
 
187
-<!--  允许有意者联系我  单项选择器-->
188
-<!-- <view class="Choice_dx_box">     
189
-            <picker  bindchange="contactEvent" value="{{contactindex}}" range="{{contactArray}}"  range-key="area_name">
190
-                    
191
-                      <view class='Choice_dx c'>
192
-                            <view class="Choice_dx_title">允许有意者联系我</view>
193
-
194
-                            <view class='Choice_dx_text' >
195
-                              
196
-                                  {{contactArray[contactindex].area_name ? contactArray[contactindex].area_name  : "请选择"}}
197
-                                
198
-                            </view>
199
-                                
200
-                      </view>
201
-          </picker>
202
-</view>
203
-       -->
204
-  
205 187
 
206 188
 
207 189
 

+ 29 - 12
pages/personal_core/vehicle/vehicle.js

@@ -84,8 +84,12 @@ Page({
84 84
           return;
85 85
         }
86 86
 
87
-        _this.setData({
88
-          loadingHidden: false
87
+        // _this.setData({
88
+        //   loadingHidden: false
89
+        // });
90
+        wx.showToast({
91
+          title: '上传中...',
92
+          icon: 'loading'
89 93
         });
90 94
 
91 95
       
@@ -95,7 +99,7 @@ Page({
95 99
         app.Multigraph(dt_url, dt_filePath, function (res) {
96 100
 
97 101
           if (res.code == 201) {
98
-             console.log(res.data.img_name);
102
+            //  console.log(res.data.img_name);
99 103
 
100 104
 
101 105
             _this.setData({
@@ -103,11 +107,17 @@ Page({
103 107
               xszzyImagesNum: true,
104 108
               // scsfzimg: false,
105 109
               positive: res.data.img_name,     //手持身份证
106
-              loadingHidden: true         //加载中
107 110
             });
108 111
 
109
-          }
112
+            wx.showToast({
113
+              title: '上传成功',
114
+              icon: 'none',  // 不显示图标
115
+              duration: 2000
116
+            })
110 117
 
118
+            return;     
119
+          }
120
+          app.Tips(res.msg);
111 121
         });
112 122
 
113 123
       }
@@ -138,8 +148,9 @@ Page({
138 148
           return;
139 149
         }
140 150
 
141
-        _this.setData({
142
-          loadingHidden: false
151
+        wx.showToast({
152
+          title: '上传中...',
153
+          icon: 'loading'
143 154
         });
144 155
 
145 156
 
@@ -149,8 +160,7 @@ Page({
149 160
         app.Multigraph(dt_url, dt_filePath, function (res) {
150 161
 
151 162
                 if (res.code == 201) {
152
-                  console.log(res.data.img_name);
153
-
163
+                  // console.log(res.data.img_name);
154 164
 
155 165
                   _this.setData({
156 166
                     xszfyImages: dt_filePath,
@@ -158,11 +168,18 @@ Page({
158 168
                     // scsfzimg: false,
159 169
                     opposite: res.data.img_name,     //手持身份证
160 170
                     loadingHidden: true         //加载中
161
-                    
171
+                                        
162 172
                   });
163
-                    
164
-                }
165 173
 
174
+                  wx.showToast({
175
+                    title: '上传成功',
176
+                    icon: 'none',  // 不显示图标
177
+                    duration: 2000
178
+                  })
179
+
180
+                  return;     
181
+                }
182
+                 app.Tips(res.msg);
166 183
 
167 184
 
168 185
         });

+ 5 - 4
pages/register/OwnData/OwnData.js

@@ -170,13 +170,13 @@ Page({
170 170
 
171 171
 
172 172
     //  婚史 ajax
173
-    let Marriage_url = 'public/paramsgather?type=marriage';
173
+    let Marriage_url = 'public/paramsgather?type=marriage&marriage=1';
174 174
     let Marriage_data = {
175 175
       pid: '0'
176 176
     };
177 177
     app.postRequest(Marriage_url, Marriage_data, function (res) {      //  婚史 ajax
178 178
       if (res.code == 201) {
179
-        // console.log(res.data);
179
+        console.log(res.data);
180 180
 
181 181
     
182 182
         that.setData({
@@ -194,7 +194,7 @@ Page({
194 194
     };
195 195
     app.postRequest(income_url, income_data, function (res) {      //  收入 ajax
196 196
       if (res.code == 201) {
197
-        console.log(res.data);
197
+        // console.log(res.data);
198 198
         that.setData({
199 199
           incomeArray: res.data
200 200
         })
@@ -285,9 +285,10 @@ Page({
285 285
     // console.log(e);
286 286
     // console.log(this.data.MarriageArray[e.detail.value]);
287 287
     // console.log('picker发送选择改变,携带值为', e.detail.value)
288
+    // console.log(this.data.MarriageArray[e.detail.value].id);
288 289
     this.setData({
289 290
       Marriageindex: e.detail.value,
290
-      marry: e.detail.value
291
+      marry: this.data.MarriageArray[e.detail.value].id
291 292
     })
292 293
   },
293 294
 

+ 3 - 2
pages/register/OwnData/OwnData.wxml

@@ -111,14 +111,15 @@
111 111
 
112 112
 
113 113
 <view class="Choice_dx_box">     <!--  婚史 单项选择器-->
114
-            <picker  bindchange="MarriageEvent" value="{{Marriageindex}}" range="{{MarriageArray}}">
114
+            <picker  bindchange="MarriageEvent" value="{{Marriageindex}}" range="{{MarriageArray}}" range-key="name">
115 115
                     
116 116
                       <view class='Choice_dx c'>
117 117
                             <view class="Choice_dx_title">婚史</view>
118 118
 
119 119
                             <view class='Choice_dx_text' >
120 120
                               
121
-                                  {{MarriageArray[Marriageindex] ? MarriageArray[Marriageindex]  : "请选择"}}
121
+                                  {{MarriageArray[Marriageindex].name ? MarriageArray[Marriageindex].name  : "请选择"}}
122
+                                     
122 123
                                 
123 124
                             </view>
124 125