Your Name 5 years ago
parent
commit
d3900c116b

+ 20 - 17
app.js

@@ -11,23 +11,24 @@ App({
11 11
     try {
12 12
       console.log(wx.getStorageSync('access_token'), '注册');
13 13
       console.log(wx.getStorageSync('wx_id'), '授权');
14
-      if (wx.getStorageSync('access_token')) {   //是否注册过
15
-        console.log('列表页');
16
-        wx.reLaunch({
17
-          url: '/pages/index/index'        //注册过 进入首页
18
-        })
19
-
20
-      } else if (wx.getStorageSync('wx_id')) {  //是否授权
21
-        console.log('登陆页');
22
-        wx.reLaunch({
23
-          url: '/pages/Landpage/Land/Land'    //授权过 进入登陆页
24
-        })
25
-      } else {
26
-        console.log('授权页');
27
-        wx.reLaunch({
28
-          url: '/pages/Jurisdiction/click_Jurisdiction/click_Jurisdiction'   //未授权  进入授权页
29
-        })
30
-      }
14
+      
15
+        // if (wx.getStorageSync('access_token')) {   //是否注册过
16
+        //   console.log('列表页');
17
+        //   wx.reLaunch({
18
+        //     url: '/pages/index/index'        //注册过 进入首页
19
+        //   })
20
+
21
+        // } else if (wx.getStorageSync('wx_id')) {  //是否授权
22
+        //   console.log('登陆页');
23
+        //   wx.reLaunch({
24
+        //     url: '/pages/Landpage/Land/Land'    //授权过 进入登陆页
25
+        //   })
26
+        // } else {
27
+        //   console.log('授权页');
28
+        //   wx.reLaunch({
29
+        //     url: '/pages/Jurisdiction/click_Jurisdiction/click_Jurisdiction'   //未授权  进入授权页
30
+        //   })
31
+        // }
31 32
 
32 33
     
33 34
     } catch (e) {
@@ -55,6 +56,8 @@ App({
55 56
  
56 57
   },
57 58
 
59
+
60
+
58 61
   // 提示框
59 62
   Tips(text) {
60 63
 

+ 3 - 3
app.json

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "pages": [
3
-        "pages/personal_core/requirements/requirements",
3
+  "pages/personal_core/personaldata/personaldata",
4 4
   "pages/index/waitfor/waitfor",
5 5
   "pages/index/index",
6 6
   "pages/Jurisdiction/click_Jurisdiction/click_Jurisdiction",
@@ -11,7 +11,7 @@
11 11
   "pages/Landpage/Land/Land",
12 12
   "pages/zheo_More/zheo_More",
13 13
   "pages/details_More/details_More",
14
-   "pages/personal_core/personaldata/personaldata",
14
+
15 15
   "pages/Setup/Opinion/Opinion",
16 16
   "pages/Setup/Publicaddress/Publicaddress",
17 17
   "pages/Setup/Contactus/Contactus",
@@ -20,7 +20,7 @@
20 20
    "pages/Setup/Setuplist/Setuplist",
21 21
    "pages/payment/Member/Member",
22 22
     "pages/personal_core/Album/Album",
23
-
23
+        "pages/personal_core/requirements/requirements",
24 24
     "pages/personal_core/personaldataModifythe/personaldataModifythe",
25 25
     "pages/personal_core/QRcode/QRcode",
26 26
     "pages/personal_core/home/home",

+ 2 - 6
pages/index/index.js

@@ -4,8 +4,6 @@ const webSocket = require('../../utils/websocket.js');
4 4
 Page({
5 5
 
6 6
   data: {
7
-
8
-
9 7
     heightid: 0,
10 8
     heightArray: [], // 身高-数据
11 9
     heightindex: [0, 0],  // 身高-下标
@@ -80,10 +78,8 @@ Page({
80 78
     } 
81 79
     app.globalData.trigger = false;
82 80
 
83
-    wx.setTabBarBadge({
84
-      index: 0,
85
-      text: '1'
86
-    })  
81
+    
82
+    
87 83
   },
88 84
  
89 85
  

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

@@ -102,6 +102,7 @@
102 102
                         <text>编辑</text>
103 103
                         <image src='/image/personal5.png' mode="widthFix"></image>
104 104
                 </navigator>
105
+                
105 106
       </view>
106 107
 
107 108
       <view class='data_list c' wx:if='{{optioninfocode.code == 201}}'>

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

@@ -36,7 +36,7 @@
36 36
 .data_title_r image{width:10rpx;position:relative;top:-2rpx;margin-left:16rpx;height:0;}
37 37
 
38 38
 /* .data_list{margin-top:30rpx;} */
39
-.data_list text{border:1px solid #E5E5E5;display:block;float:left;padding:20rpx 30rpx;border-radius:100rpx;font-size:28rpx;color:#292828;margin-right:30rpx;margin-top:30rpx}
39
+.data_list text{border:1px solid #E5E5E5;display:block;float:left;padding:10rpx 30rpx;border-radius:100rpx;font-size:28rpx;color:#292828;margin-right:30rpx;margin-top:30rpx}
40 40
 .data_list_text{font-size:28rpx;color:#333;text-align:center;margin-top:60rpx;}
41 41
 
42 42
 /* 认证信息 */

+ 63 - 34
pages/personal_core/requirements/requirements.js

@@ -3,7 +3,7 @@ const app = getApp();
3 3
 Page({
4 4
 
5 5
   data: {
6
-
6
+    // viewhiddenName:true,
7 7
     // selectArray: [], // 性别-数据
8 8
     // index: '',  // 性别-下标、
9 9
     heightid:0,
@@ -212,23 +212,45 @@ Page({
212 212
       };
213 213
 
214 214
       let _education = res.data.education;
215
+      console.log(_education)
215 216
       app.postRequest(Education_url, Education_data, function (res) {      //  学历 ajax
216 217
         if (res.code == 201) {
217 218
           
218
-                for (let i = 0; i < res.data.length; i++) {   //已选中的数据处理
219
+          var obj = { id: 0, name: '不限' };
220
+          var datares = res.data;
221
+          datares.unshift(obj)
219 222
 
220
-                  if (res.data[i].id == _education) {
221 223
 
222
-                    // console.log(res.data[i].id)
223
-                    that.setData({
224
-                      Educationindex: i
225
-                    })
226
-                  }
227
-                }
224
+          for (let i = 0; i < datares.length; i++) {    //已选中的数据处理
225
+            if (datares[i].id == _education) {
226
+              that.setData({
227
+                Educationindex: i,
228
+              })
229
+            }
230
+          }
228 231
 
229
-                that.setData({
230
-                  EducationArray: res.data
231
-                })
232
+
233
+          that.setData({
234
+            EducationArray: datares,
235
+        
236
+          })
237
+
238
+
239
+
240
+                // for (let i = 0; i < res.data.length; i++) {   //已选中的数据处理
241
+
242
+                //   if (res.data[i].id == _education) {
243
+
244
+                //     // console.log(res.data[i].id)
245
+                //     that.setData({
246
+                //       Educationindex: i
247
+                //     })
248
+                //   }
249
+                // }
250
+
251
+                // that.setData({
252
+                //   EducationArray: res.data
253
+                // })
232 254
         }
233 255
       })
234 256
 
@@ -262,8 +284,8 @@ Page({
262 284
       let _income_max = res.data.income_max == 0 ? '以上' : res.data.income_max;
263 285
 
264 286
 
265
-      console.log(_income_min);
266
-      console.log(_income_max);
287
+      // console.log(_income_min);
288
+      // console.log(_income_max);
267 289
       app.postRequest(income_url, income_data, function (res) {      //  收入 ajax
268 290
         if (res.code == 201) {
269 291
     
@@ -277,8 +299,8 @@ Page({
277 299
 
278 300
           var min = data_processing(res_data, _income_min);      //已选中的数据处理  min
279 301
           var max = data_processing(res_data1, _income_max);   //已选中的数据处理  max
280
-          console.log(min);
281
-          console.log(max);
302
+          // console.log(min);
303
+          // console.log(max);
282 304
 
283 305
             that.setData({
284 306
               incomeindex: [min, max]
@@ -306,21 +328,27 @@ Page({
306 328
             // console.log(res);
307 329
 
308 330
 
309
-                    for (let i = 0; i < res.data.length; i++) {      //已选中的数据处理
310 331
 
311
-                      if (res.data[i].id == _occupation) {
332
+            var obj = { id: 0, name: '不限' };
333
+            var datares = res.data;
334
+            datares.unshift(obj)
335
+
336
+
337
+            for (let i = 0; i < datares.length; i++) {    //已选中的数据处理
338
+              if (datares[i].id == _occupation) {
339
+                that.setData({
340
+                  Occupationindex: i,
341
+                })
342
+              }
343
+            }
344
+
345
+            that.setData({
346
+              OccupationArray: datares,
347
+
348
+            })
312 349
 
313
-                        // console.log(res.data[i].id)
314
-                        that.setData({
315
-                          Occupationindex: i
316
-                        })
317
-                      }
318
-                    }
319 350
 
320 351
 
321
-                    that.setData({
322
-                      OccupationArray: res.data
323
-                    })
324 352
           }
325 353
       })
326 354
 
@@ -762,7 +790,7 @@ Page({
762 790
         var income = this.data.income             //  收入 
763 791
         var occupation = this.data.occupation  //  职业
764 792
 
765
-    if (_age || height || province || city || area || education || marry || income || occupation){
793
+
766 794
                     //  修改择偶信息
767 795
                     let editinfoform_url = 'my/personaloption/editoptionform';
768 796
                     let editinfoform_data = {
@@ -796,15 +824,16 @@ Page({
796 824
                       getApp().Tips(fail)
797 825
 
798 826
                     })
799
-        }else{
800
-            var _occupation = '您没有选择'
801
-            getApp().Tips(_occupation)
802
-        }
803 827
 
804
-        
828
+  },
805 829
 
806 830
 
807
-  },
831
+  // onReady: function () {
832
+  //   this.setData({
833
+  //     viewhiddenName:false
834
+  //   })
835
+  // },
836
+
808 837
 
809 838
 })
810 839
 

+ 29 - 28
pages/personal_core/requirements/requirements.wxml

@@ -1,4 +1,4 @@
1
-
1
+<!-- <view  hidden="{{viewhiddenName}}"> -->
2 2
 
3 3
 <!-- 填写资料 -->
4 4
 <view class='data_box'>
@@ -38,24 +38,24 @@
38 38
 
39 39
 
40 40
 
41
-    <view class="Choice_dx_box">  
41
+    <view class="Choice_dx_box" data-da="{{personacodel.data.age_max}}">  
42 42
             <picker mode="multiSelector" bindchange="AgeEvent"  value="{{AgeIndex}}" range="{{AgeArray}}">           
43 43
                           <view class='Choice_dx c'>
44 44
                                 <view class="Choice_dx_title">年龄要求</view>
45 45
 
46 46
                                 <view class="Choice_dx_text picker" wx:if='{{Ageid == 0}}'>
47 47
 
48
-                                     <block wx:if='{{personacodel.code == 201 && personacodel.data.age_max}}'>
49
-                                       {{AgeArray[0][AgeIndex[0]]}}-{{AgeArray[1][AgeIndex[1]]}}
48
+                                     <block wx:if='{{personacodel.code == 201}}'>
49
+                                       {{AgeArray[0][AgeIndex[0]]  +'-' + AgeArray[1][AgeIndex[1]]  == '不限-以上' ? '无需求'  :  AgeArray[0][AgeIndex[0]]  +'-' + AgeArray[1][AgeIndex[1]]}}
50 50
                                      </block>
51 51
 
52
-                                      <block wx:else>请选择</block>
52
+                                      <block wx:else>无需求</block>
53 53
                                 </view> 
54 54
 
55 55
                                 <view class="Choice_dx_text picker" wx:if='{{Ageid == 1}}'>
56
-                                      {{AgeArray[0][AgeIndex[0]]}}-{{AgeArray[1][AgeIndex[1]]}}
57
-
56
+                                      {{AgeArray[0][AgeIndex[0]] +'-' + AgeArray[1][AgeIndex[1]]  == '不限-以上' ? '无需求'  : AgeArray[0][AgeIndex[0]] +'-' + AgeArray[1][AgeIndex[1]]}}
58 57
                                 </view> 
58
+
59 59
                           </view>
60 60
               </picker>
61 61
     </view>
@@ -73,11 +73,11 @@
73 73
                                           <view class='right' wx:if="{{multiArray[2][multiIndex[2]] && step == 0}}">
74 74
                                                   <text wx:if='{{personacodel.code == 201 && personacodel.data.city}}'>{{personal.city}}</text>
75 75
 
76
-                                                  <text wx:else>请选择</text>
76
+                                                  <text wx:else>无需求</text>
77 77
                                           </view>
78 78
 
79 79
                                           <view class="picker c" wx:if="{{multiArray[0][multiIndex[0]] && step == 1}}">
80
-                                                {{multiArray[0][multiIndex[0]]  }}-{{multiArray[1][multiIndex[1]]  }}-{{multiArray[2][multiIndex[2]]}} 
80
+                                                {{multiArray[0][multiIndex[0]]}}-{{multiArray[1][multiIndex[1]]}}-{{multiArray[2][multiIndex[2]]}} 
81 81
                                           </view>
82 82
                                   
83 83
                               </view>
@@ -90,22 +90,22 @@
90 90
 
91 91
 
92 92
    <!--  身高 双选-->
93
-    <view class="Choice_dx_box" data-da="{{personacodel.data.height_max}}">  
93
+    <view class="Choice_dx_box">  
94 94
             <picker mode="multiSelector" bindchange="heightEvent"  value="{{heightindex}}" range="{{heightArray}}">           
95 95
                           <view class='Choice_dx c'>
96 96
                                 <view class="Choice_dx_title">身高</view>
97 97
 
98 98
                                 <view class="Choice_dx_text picker" wx:if='{{heightid == 0}}'>
99 99
 
100
-                                     <block wx:if='{{personacodel.code == 201  && personacodel.data.height_max}}'>
101
-                                        {{heightArray[0][heightindex[0]]}}-{{heightArray[1][heightindex[1]]}}
100
+                                     <block wx:if='{{personacodel.code == 201}}'>
101
+                                        {{heightArray[0][heightindex[0]] +'-' + heightArray[1][heightindex[1]] == '不限-以上' ? '无需求' : heightArray[0][heightindex[0]] +'-' + heightArray[1][heightindex[1]]}}
102 102
                                      </block>
103 103
                                      
104
-                                      <block wx:else>请选择</block>
104
+                                      <block wx:else>无需求</block>
105 105
                                 </view> 
106 106
 
107 107
                                 <view class="Choice_dx_text picker" wx:else>
108
-                                      {{heightArray[0][heightindex[0]]}}-{{heightArray[1][heightindex[1]]}}
108
+                                      {{heightArray[0][heightindex[0]] +'-' + heightArray[1][heightindex[1]] == '不限-以上' ? '无需求' : heightArray[0][heightindex[0]] +'-' + heightArray[1][heightindex[1]]}}
109 109
                                 </view>
110 110
 
111 111
                           </view>
@@ -124,13 +124,13 @@
124 124
 
125 125
                             <view class='Choice_dx_text' wx:if='{{personacodel.code == 201  && personacodel.data.marry}}'>
126 126
                               
127
-                                  {{MarriageArray[Marriageindex]}}
127
+                                  {{MarriageArray[Marriageindex] == '不限' ?  '无需求' : MarriageArray[Marriageindex]}}
128 128
                                 
129 129
                             </view>
130 130
 
131 131
                             <view class='Choice_dx_text' wx:else>
132 132
                               
133
-                                  {{MarriageArray[Marriageindex] ? MarriageArray[Marriageindex]  : "请选择"}}
133
+                                  {{MarriageArray[Marriageindex] ? MarriageArray[Marriageindex]  : "无需求"}}
134 134
                                 
135 135
                             </view>
136 136
                                 
@@ -146,15 +146,15 @@
146 146
                                 <view class="Choice_dx_title">收入要求</view>
147 147
 
148 148
                                 <view class="Choice_dx_text picker"  wx:if='{{incomeid == 0}}'>
149
-                                    <block wx:if='{{personacodel.code == 201 && personacodel.data.income_max}}'>
150
-                                       {{incomeArray[0][incomeindex[0]]}}-{{incomeArray[1][incomeindex[1]]}}1
149
+                                    <block wx:if='{{personacodel.code == 201}}'>
150
+                                       {{incomeArray[0][incomeindex[0]] +'-' + incomeArray[1][incomeindex[1]]  == '不限-以上' ? '无需求' : incomeArray[0][incomeindex[0]] +'-' + incomeArray[1][incomeindex[1]]}}
151 151
                                      </block>
152 152
                                     
153
-                                      <block wx:else>请选择</block>
153
+                                      <block wx:else>无需求</block>
154 154
                                 </view>   
155 155
 
156 156
                                 <view class="Choice_dx_text picker"  wx:else>
157
-                                      {{incomeArray[0][incomeindex[0]]}}-{{incomeArray[1][incomeindex[1]]}}2
157
+                                      {{incomeArray[0][incomeindex[0]] +'-' + incomeArray[1][incomeindex[1]] == '不限-以上' ? '无需求' : incomeArray[0][incomeindex[0]] +'-' + incomeArray[1][incomeindex[1]]}}
158 158
 
159 159
                                 </view> 
160 160
 
@@ -164,21 +164,21 @@
164 164
 
165 165
 
166 166
 
167
-<view class="Choice_dx_box">     <!--  学历 单项选择器-->
167
+<view class="Choice_dx_box" data-id="{{EducationArray[Educationindex].name}}">     <!--  学历 单项选择器-->
168 168
             <picker  bindchange="EducationEvent" value="{{Educationindex}}" range="{{EducationArray}}"  range-key="name">
169 169
                     
170 170
                       <view class='Choice_dx c'>
171 171
                             <view class="Choice_dx_title">学历</view>
172 172
 
173
-                            <view class='Choice_dx_text'  wx:if='{{personacodel.code == 201 && personacodel.data.education}}'>
173
+                            <view class='Choice_dx_text'  wx:if='{{personacodel.code == 201}}'>
174 174
                               
175
-                                  {{EducationArray[Educationindex].name}}
175
+                                  {{EducationArray[Educationindex].name  == '不限' ?  '无需求' : EducationArray[Educationindex].name}}
176 176
                                 
177 177
                             </view>
178 178
 
179 179
                             <view class='Choice_dx_text'  wx:else>
180 180
                               
181
-                                  {{EducationArray[Educationindex].name ? EducationArray[Educationindex].name  :  "请选择"}}
181
+                                  {{EducationArray[Educationindex].name ? EducationArray[Educationindex].name  :  "无需求"}}
182 182
                                 
183 183
                             </view>
184 184
                                 
@@ -188,21 +188,21 @@
188 188
 
189 189
 
190 190
 
191
-<view class="Choice_dx_box">     <!--  职业 单项选择器-->
191
+<view class="Choice_dx_box" data-asd="{{personacodel.data.occupation}}">     <!--  职业 单项选择器-->
192 192
             <picker  bindchange="OccupationEvent" value="{{Occupationindex}}" range="{{OccupationArray}}"  range-key="name">
193 193
                     
194 194
                       <view class='Choice_dx c'>
195 195
                             <view class="Choice_dx_title">职业要求</view>
196 196
 
197
-                            <view class='Choice_dx_text' wx:if='{{personacodel.code == 201  && personacodel.data.occupation}}'>
197
+                            <view class='Choice_dx_text' wx:if='{{personacodel.code == 201}}'>
198 198
                               
199
-                                 {{OccupationArray[Occupationindex].name}}
199
+                                 {{OccupationArray[Occupationindex].name   == '不限' ?  '无需求' : OccupationArray[Occupationindex].name}}
200 200
                                 
201 201
                             </view>
202 202
 
203 203
                             <view class='Choice_dx_text'   wx:else>
204 204
                               
205
-                                 {{OccupationArray[Occupationindex].name ? OccupationArray[Occupationindex].name  :  "请选择"}}
205
+                                 {{OccupationArray[Occupationindex].name ? OccupationArray[Occupationindex].name  :  "无需求"}}
206 206
                                 
207 207
                             </view>
208 208
                                 
@@ -257,3 +257,4 @@
257 257
 
258 258
 </view>
259 259
 
260
+<!-- </view> -->