Your Name 5 years ago
parent
commit
7fb67d0791

+ 15 - 21
app.js

@@ -44,13 +44,11 @@ App({
44 44
       wx.reLaunch({
45 45
         url: '/pages/Landpage/Land/Land'    //授权过 进入登陆页
46 46
       })  
47
-    } 
48
-    
49
-    // else {
50
-    //   wx.reLaunch({
51
-    //     url: '/pages/Jurisdiction/click_Jurisdiction/click_Jurisdiction'   //未授权  进入授权页
52
-    //   })
53
-    // }
47
+    }else {
48
+      wx.reLaunch({
49
+        url: '/pages/Jurisdiction/click_Jurisdiction/click_Jurisdiction'   //未授权  进入授权页
50
+      })
51
+    }
54 52
 
55 53
   
56 54
   },
@@ -63,14 +61,7 @@ App({
63 61
     // 查看是否授权
64 62
  
65 63
 
66
-    wx.getLocation({
67
-
68
-      success: function (res) {
69
-        _this.getDistrict(res.latitude, res.longitude)
70 64
 
71
-      },
72
-
73
-    })
74 65
   },
75 66
 
76 67
   // 提示框
@@ -200,13 +191,16 @@ App({
200 191
       success: function (res) {
201 192
         console.log(res);
202 193
         if (res.data.status == 0) {
203
-          // 省
204
-          let province = res.data.result.address_component.province;
205
-          // 市
206
-          let city = res.data.result.address_component.city;
207
-          // 区
208
-          let district = res.data.result.address_component.district;
209
-          console.log(province);
194
+          console.log(res.data.result.address_component);
195
+          _page.postRequest('trajectory/location/position', res.data.result.address_component)
196
+          // // 省
197
+          // let province = res.data.result.address_component.province;
198
+          // // 市
199
+          // let city = res.data.result.address_component.city;
200
+          // // 区
201
+          // let district = res.data.result.address_component.district;
202
+          // console.log(province);
203
+
210 204
         }
211 205
 
212 206
       }

+ 13 - 15
app.json

@@ -1,23 +1,22 @@
1 1
 {
2 2
   "pages": [
3
-      "pages/Setup/Opinion/Opinion",
4
-  "pages/Setup/Publicaddress/Publicaddress",
5
-  "pages/Setup/Contactus/Contactus",
6
-  "pages/Setup/Aboutus/Aboutus",
7
-
3
+ "pages/personal_core/remind/remind",
4
+  "pages/Jurisdiction/click_Jurisdiction/click_Jurisdiction",
8 5
   "pages/Setup/modify/modify",
9 6
   "pages/Landpage/Land/Land",
10 7
   "pages/zheo_More/zheo_More",
11 8
   "pages/details_More/details_More",
12 9
    "pages/personal_core/personaldata/personaldata",
13
- 
10
+  "pages/Setup/Opinion/Opinion",
11
+  "pages/Setup/Publicaddress/Publicaddress",
12
+  "pages/Setup/Contactus/Contactus",
13
+  "pages/Setup/Aboutus/Aboutus",
14 14
    "pages/Setup/security/security",
15 15
    "pages/Setup/Setuplist/Setuplist",
16 16
     "pages/information/chat/chat",
17 17
     "pages/payment/Member/Member",
18
-    "pages/Jurisdiction/click_Jurisdiction/click_Jurisdiction",
19 18
     "pages/personal_core/Album/Album",
20
-    "pages/personal_core/requirements/requirements",
19
+     "pages/personal_core/requirements/requirements",
21 20
     "pages/personal_core/personaldataModifythe/personaldataModifythe",
22 21
     "pages/personal_core/QRcode/QRcode",
23 22
     "pages/personal_core/home/home",
@@ -29,7 +28,6 @@
29 28
     "pages/index_details/index_details",
30 29
     "pages/index/index",
31 30
     "pages/index_screen/index_screen",
32
-
33 31
     "pages/Landpage/Retrievepassword/Retrievepassword",
34 32
     "pages/register/fillTel/fillTel",
35 33
     "pages/register/OwnData/OwnData",
@@ -65,18 +63,18 @@
65 63
     "backgroundColor": "#FFF",
66 64
     "list": [
67 65
       {
68
-        "selectedIconPath": "image/nav01.png",
69
-        "iconPath": "image/nav1.png",
70
-        "pagePath": "pages/index/index",
71
-        "text": "首页"
72
-      },
73
-      {
74 66
         "selectedIconPath": "image/nav03.png",
75 67
         "iconPath": "image/nav3.png",
76 68
         "pagePath": "pages/chat-list/chat-list",
77 69
         "text": "消息"
78 70
       },
79 71
       {
72
+        "selectedIconPath": "image/nav01.png",
73
+        "iconPath": "image/nav1.png",
74
+        "pagePath": "pages/index/index",
75
+        "text": "首页"
76
+      },
77
+      {
80 78
         "selectedIconPath": "image/nav04.png",
81 79
         "iconPath": "image/nav4.png",
82 80
         "pagePath": "pages/personal_core/home/home",

+ 1 - 0
pages/Landpage/Land/Land.js

@@ -29,6 +29,7 @@ Page({
29 29
     if (wx.getStorageSync('user')){
30 30
         _this.setData({
31 31
           inputValue1: wx.getStorageSync('user'),
32
+          user: wx.getStorageSync('user'),
32 33
         });
33 34
       }
34 35
  

+ 100 - 50
pages/index/index.js

@@ -44,7 +44,7 @@ Page({
44 44
     // tabTxt: ['性别', '年龄', '婚史', '特色'],//tab文案
45 45
     page: 1,//当前页码
46 46
     limit: 10,//获取条数
47
-    morehide: false,   //暂无更多信息显示隐藏
47
+    morehide: true,   //暂无更多信息显示隐藏
48 48
     moreTxt: '',
49 49
 
50 50
 
@@ -68,21 +68,34 @@ Page({
68 68
 
69 69
   },
70 70
 
71
-  onLoad: function (options) {
71
+
72
+  onShow: function (options) {
73
+    var that = this;
74
+    // webSocket.connectSocket();
75
+    var _trigger = app.globalData.trigger      //    搜索或清空
76
+    // console.log(_trigger);
77
+    if (_trigger == true){
78
+      that.onLoad();
79
+    } 
80
+    app.globalData.trigger = false;
81
+  },
82
+ 
83
+ 
84
+//  触发聊天
85
+  onReady: function (options){
72 86
     webSocket.connectSocket();
73 87
   },
74 88
 
75
-
76
-  onShow: function (options) {
89
+  onLoad: function (options) {
77 90
     var that = this;
78 91
 
79
-    that.setData({
80
-      page: 1,//当前页码
81
-    })
82 92
 
83 93
 
84
-    getApp().showLoading();   //提示加载中
94
+    that.Getlocation();   //获取地理位置
85 95
 
96
+    that.setData({
97
+      page: 1,//当前页码
98
+    })
86 99
 
87 100
 
88 101
     var _Selection = app.globalData.Selection      //  是否选中     1选中 0没选中
@@ -125,14 +138,15 @@ Page({
125 138
     var _cityname = app.globalData.cityName   //  市 名称
126 139
     var _areaname = app.globalData.areaName      //  区  名称
127 140
 
128
-    if (_provincename && _cityname && _Selection == 1) {
141
+    if (_provincename ||  _cityname && _Selection == 1) {
129 142
       that.setData({
130 143
         city: _city,
131 144
         provinceName: _provincename,  // 省名称
132 145
         cityName: _cityname, // 市名称
133 146
         areaName: _areaname,  // 区名称
134 147
       })
135
-
148
+      // console.log(_provincename)
149
+      // console.log(_cityname)
136 150
     } else if (_provincename == '' && _cityname == '' &&  _Selection == 1){
137 151
       that.setData({
138 152
         city: _city,
@@ -542,7 +556,6 @@ Page({
542 556
   //  上拉加载更多
543 557
   onReachBottom() {
544 558
     var that = this;
545
-    var text = ""
546 559
 
547 560
     let _age = transformation(that.data.age)      //不限以上 转换成0
548 561
     let _height = transformation(that.data.height)      //不限以上 转换成0
@@ -563,8 +576,7 @@ Page({
563 576
         number: that.data.inputValue,   //  性别  
564 577
       };
565 578
 
566
-      text = '您搜索的会员编码不存在'
567
-      console.log('用户ID');
579
+      // console.log('用户ID');
568 580
 
569 581
 
570 582
     } else {     //否则 传常规选择
@@ -580,8 +592,7 @@ Page({
580 592
         city: that.data.city,                    // 市
581 593
       };
582 594
 
583
-      console.log('选择');
584
-      text = '暂无更多数据。'
595
+      // console.log('选择');
585 596
 
586 597
     }
587 598
 
@@ -594,11 +605,11 @@ Page({
594 605
 
595 606
         var moreTxt = '';
596 607
         if (0 < (res.data.length < 10)) {
597
-          moreTxt = text;
598
-          console.log('无')
608
+          moreTxt = res.msg;
609
+          // console.log('无')
599 610
         } else {
600 611
           moreTxt = ''
601
-          console.log('有')
612
+          // console.log('有')
602 613
         }
603 614
 
604 615
         // 设置数据
@@ -608,8 +619,8 @@ Page({
608 619
 
609 620
         that.setData({
610 621
           home: home,
611
-          morehide: true,
612
-          moreTxt: moreTxt,
622
+          morehide: false,
623
+          moreTxt: res.msg,
613 624
         })
614 625
 
615 626
         that.cancelLoading();   //数据加载完关闭
@@ -621,8 +632,8 @@ Page({
621 632
 
622 633
       that.setData({
623 634
         home_code: res.code,
624
-        morehide: true,
625
-        moreTxt: text,
635
+        morehide: false,
636
+        moreTxt: res.msg,
626 637
       })
627 638
 
628 639
 
@@ -636,7 +647,6 @@ Page({
636 647
 
637 648
   list: function () {
638 649
     var that = this;
639
-    var text = ""
640 650
 
641 651
     let _age = transformation(that.data.age)       //不限以上 转换成0
642 652
     let _height = transformation(that.data.height)       //不限以上 转换成0
@@ -654,10 +664,6 @@ Page({
654 664
         number: that.data.inputValue,   //  性别  
655 665
       };
656 666
 
657
-      text = '您搜索的会员编码不存在'
658
-      console.log('用户ID');
659
-
660
-
661 667
     } else {     //否则 传常规选择
662 668
 
663 669
       var home_data = {
@@ -671,9 +677,6 @@ Page({
671 677
         city: that.data.city,                    // 市
672 678
       };
673 679
 
674
-      // console.log('选择');
675
-      text = '暂无更多数据。'
676
-
677 680
     }
678 681
 
679 682
 
@@ -686,7 +689,7 @@ Page({
686 689
 
687 690
         var moreTxt = '';
688 691
         if (res.data.length < 10) {
689
-          moreTxt = text
692
+          moreTxt = res.msg
690 693
         } else {
691 694
           moreTxt = ''
692 695
         }
@@ -694,7 +697,7 @@ Page({
694 697
         // console.log(res.data);
695 698
         that.setData({
696 699
           home: res.data,
697
-          moreTxt: moreTxt,
700
+          moreTxt: res.msg,
698 701
           home_code: res.code,
699 702
         })
700 703
 
@@ -705,12 +708,19 @@ Page({
705 708
 
706 709
       that.cancelLoading();   //数据加载完关闭
707 710
 
711
+
712
+
708 713
       that.setData({
709 714
         home: res.data,
710
-        morehide: true,
711
-        moreTxt: text
715
+        morehide: false,
716
+        moreTxt: res.msg,
712 717
       })
713 718
 
719
+
720
+
721
+  
722
+
723
+
714 724
     })
715 725
 
716 726
   },
@@ -718,7 +728,7 @@ Page({
718 728
   // 加载
719 729
   showLoading: function () {
720 730
 
721
-    wx.showToast({
731
+    wx.showLoading({
722 732
 
723 733
       title: '加载中',
724 734
 
@@ -729,7 +739,7 @@ Page({
729 739
   },
730 740
   // 关闭加载
731 741
   cancelLoading: function () {
732
-    wx.hideToast();
742
+    wx.hideLoading();
733 743
   },
734 744
 
735 745
 
@@ -783,7 +793,7 @@ Page({
783 793
           cityidx: '',   // idx  选中清空
784 794
         })
785 795
 
786
-        console.log(res.data)
796
+        // console.log(res.data)
787 797
 
788 798
       }
789 799
     })
@@ -827,7 +837,7 @@ Page({
827 837
           // console.log('执行')
828 838
           //   console.log(_index * 42);
829 839
         }
830
-        console.log(res.data)
840
+        // console.log(res.data)
831 841
       }
832 842
 
833 843
     })
@@ -883,10 +893,10 @@ Page({
883 893
 
884 894
     }
885 895
     
886
-    console.log(that.data.city)
887
-    console.log(that.data.provinceName)
888
-    console.log(that.data.cityName)
889
-    console.log(that.data.areaName)
896
+    // console.log(that.data.city)
897
+    // console.log(that.data.provinceName)
898
+    // console.log(that.data.cityName)
899
+    // console.log(that.data.areaName)
890 900
 
891 901
     that.list(); //调用筛选
892 902
 
@@ -936,15 +946,55 @@ Page({
936 946
   },
937 947
 
938 948
 
939
-  //   heightPosition: function (event){
940
-  //     var that=this;
941
-  //     var _heightP = event.detail.scrollTop;
942
-  //     console.log(_heightP);
943
-  //     that.setData({
944
-  //       heightP: _heightP,   // 区数据
945
-  //     })
946
-  // },
947 949
 
950
+  Getlocation: function () {
951
+
952
+    wx.getSetting({
953
+      success: (res) => {
954
+        // console.log(JSON.stringify(res))
955
+        // console.log(res)
956
+        // console.log(res.authSetting['scope.userLocation'])
957
+        // res.authSetting['scope.userLocation'] == undefined    表示 初始化进入该页面
958
+        // res.authSetting['scope.userLocation'] == false    表示 非初始化进入该页面,且未授权
959
+        // res.authSetting['scope.userLocation'] == true    表示 地理位置授权
960
+        if (!res.authSetting['scope.userLocation']) {
961
+          wx.showModal({
962
+            title: '请求授权当前位置',
963
+            content: '需要获取您的地理位置,请前往授权',
964
+            success: function (res) {
965
+              if (res.cancel) {
966
+                wx.showToast({
967
+                  title: '拒绝授权',
968
+                  icon: 'none',
969
+                  duration: 1000
970
+                })
971
+              } else if (res.confirm) {
972
+
973
+                wx.getLocation({
974
+
975
+                  success: function (res) {
976
+                    // console.log(res.latitude)
977
+                    // console.log(res.longitude)
978
+                    getApp().getDistrict(res.latitude, res.longitude);
979
+
980
+                  },
981
+
982
+                })
983
+
984
+
985
+              }
986
+            }
987
+          })
988
+        } else if (res.authSetting['scope.userLocation'] == undefined) {
989
+          //调用wx.getLocation的API
990
+        }
991
+        else {
992
+          //调用wx.getLocation的API
993
+        }
994
+      }
995
+    })
996
+
997
+  },
948 998
 
949 999
 
950 1000
 })

+ 1 - 1
pages/index/index.wxml

@@ -234,7 +234,7 @@
234 234
         </block>
235 235
 
236 236
 
237
-        <view class='nexgengduo' style='display:{{morehide}};'>{{moreTxt}}</view>
237
+        <view class='nexgengduo' hidden="{{morehide}}">{{moreTxt}}</view>
238 238
 
239 239
         
240 240
         <!-- 省市区弹窗 -->

+ 7 - 2
pages/index_details/index_details.js

@@ -23,9 +23,13 @@ Page({
23 23
     albumimgurl: '',// 相册url
24 24
   },
25 25
 
26
+
27
+
26 28
   onLoad: function (options) {
27 29
     var that = this;
28 30
 
31
+ 
32
+
29 33
     app.postRequest('my/images/headurl', {}, function (res) {
30 34
       if (res.code == 201) {
31 35
         that.myheadurl = res.data.img
@@ -37,7 +41,6 @@ Page({
37 41
       }
38 42
     })
39 43
 
40
-    getApp().showLoading();   //提示加载中
41 44
     that.to_id = options.uid;
42 45
     that.setData({
43 46
       options_img: options.img  //头像
@@ -187,6 +190,7 @@ Page({
187 190
 
188 191
   },
189 192
 
193
+
190 194
 // 相册点击放大
191 195
   enlarge: function (e) {
192 196
     var that = this;
@@ -252,7 +256,8 @@ console.log(that.data.uploadImages)
252 256
     wx.navigateTo({
253 257
       url: '../chat/chat?to_id=' + that.to_id + '&myheadurl=' + that.myheadurl + '&headUrl=' + that.data.options_img
254 258
     });
255
-  }
259
+  },
260
+
256 261
 
257 262
 
258 263
 })

+ 2 - 2
pages/index_details/index_details.wxml

@@ -87,8 +87,8 @@
87 87
       <view class='data_title c'>
88 88
                 <view class='data_title_l'> <image src='/image/xtb3.png'  mode="widthFix" style='position:relative;top:6rpx;width: 32rpx;'></image> 择偶意向</view>
89 89
 
90
-                <navigator class='data_title_r' hover-class="none" url="/pages/zheo_More/zheo_More?uid='{{optionsuid}}'">
91
-                        <text>更多</text>
90
+                <navigator class='data_title_r' hover-class="none" url="/pages/zheo_More/zheo_More?uid='{{optionsuid}}'" wx:if='{{optioninfocode.code == 201}}'>
91
+                        <text >更多</text>
92 92
                         <image src='/image/personal5.png' mode="widthFix"></image>
93 93
                 </navigator>
94 94
       </view>

+ 9 - 6
pages/index_screen/index_screen.js

@@ -64,9 +64,7 @@ Page({
64 64
   onLoad: function (option) {
65 65
     var that = this
66 66
 
67
-    console.log(option)
68
-
69
-    getApp().showLoading();   //提示加载中
67
+    // console.log(option)
70 68
 
71 69
     //先清空要传的数据
72 70
     app.globalData.Selection = 0;    //  是否选中  
@@ -314,7 +312,7 @@ Page({
314 312
 
315 313
 
316 314
     //  收入 ajax
317
-    let income_url = 'public/paramsgather?type=shouru';
315
+    let income_url = 'public/paramsgather?type=shouru1';
318 316
     let income_data = {
319 317
       // pid: '0'
320 318
     };
@@ -552,7 +550,7 @@ Page({
552 550
   // 会员编码 
553 551
   getPhone: function (e) {
554 552
     var _inputValue = e.detail.value;
555
-    console.log(_inputValue);
553
+    // console.log(_inputValue);
556 554
     this.setData({
557 555
       inputValue: _inputValue
558 556
     });
@@ -577,7 +575,6 @@ Page({
577 575
     app.globalData.income = String(_this.data.income);     //  收入 
578 576
     app.globalData.Selection = String(1);    //  是否选中   1 选中   0没选中
579 577
 
580
-
581 578
     app.globalData.city = String(_this.data.city);    //  市 
582 579
 
583 580
     app.globalData.provinceName = String(_this.data.provinceName);    //  省 
@@ -585,6 +582,10 @@ Page({
585 582
     app.globalData.areaName = String(_this.data.areaName);    //  区 
586 583
 
587 584
 
585
+    app.globalData.trigger = true;    // 搜索或清空
586
+
587
+
588
+
588 589
 
589 590
 
590 591
 
@@ -651,6 +652,8 @@ Page({
651 652
     app.globalData.cityName = String(_this.data.cityName);    //  市 
652 653
     app.globalData.areaName = String(_this.data.areaName);    //  区 
653 654
 
655
+    app.globalData.trigger = true;    // 搜索或清空
656
+
654 657
 
655 658
 
656 659
 

+ 2 - 3
pages/personal_core/Album/Album.js

@@ -25,9 +25,7 @@ Page({
25 25
   },
26 26
 
27 27
 
28
-
29 28
   onShow: function (options) {
30
-    getApp().showLoading();   //提示加载中
31 29
 
32 30
     var that = this;
33 31
     
@@ -350,7 +348,8 @@ Page({
350 348
 
351 349
   demo:function(){
352 350
     this.onShow();
353
-  }
351
+  },
352
+
354 353
 
355 354
 
356 355
 // 取消事件

+ 48 - 14
pages/personal_core/home/home.js

@@ -8,10 +8,8 @@ Page({
8 8
     datum: [],  //头部信息
9 9
     headurl: [],    //个人头像
10 10
     authenticationnum: [],    //认证信息
11
-    wxauthentication: [],     //我的微信
12 11
     memberstatus:'', //会员状态
13 12
 
14
-  
15 13
 
16 14
   },
17 15
 
@@ -21,7 +19,7 @@ Page({
21 19
   onShow: function (options) {
22 20
 
23 21
     var that =this;
24
-    // getApp().showLoading();   //提示加载中
22
+
25 23
 
26 24
               //  头部信息
27 25
     let datum_url = 'my/personaldata/datum';
@@ -64,17 +62,6 @@ Page({
64 62
     })
65 63
 
66 64
 
67
-    //  我的微信
68
-    let wxauthentication_url = 'my/wxqrcode/wxauthentication';
69
-    let wxauthentication_data = {
70
-    };
71
-    app.postRequest(wxauthentication_url, wxauthentication_data, function (res) {
72
-        // console.log(res.data);
73
-        that.setData({
74
-          wxauthentication: res.data
75
-        })
76
-   
77
-    })
78 65
 
79 66
 
80 67
     //  会员状态
@@ -94,5 +81,52 @@ Page({
94 81
   },
95 82
 
96 83
 
84
+  // 分享
85
+
86
+  onShareAppMessage: function (res) {
87
+
88
+    var that = this;
89
+    var code = '';
90
+    // getApp().showLoading();   //提示加载中
91
+
92
+    //  头部信息
93
+    let datum_url = 'my/other/share';
94
+    let datum_data = {
95
+    };
96
+    app.postRequest(datum_url, datum_data, function (res) {
97
+      if (res.code == 201) {
98
+        console.log(res.data.code);
99
+        that.setData({
100
+          code: res.data.code,
101
+        })
102
+      }
103
+    })
104
+
105
+
106
+    if (res.from === 'button') {
107
+      console.log("来自页面内转发按钮");
108
+      console.log(res.target);
109
+
110
+    }
111
+    else {
112
+      console.log("来自右上角转发菜单")
113
+    }
114
+    return {
115
+      title: '妹子图片',
116
+      // path: '/pages/share/share?code=' + _that.data.code + '',
117
+      success: (res) => {
118
+        console.log("转发成功", res);
119
+      },
120
+      fail: (res) => {
121
+        console.log("转发失败", res);
122
+      }
123
+    }
124
+
125
+  }
126
+
127
+
128
+
129
+
130
+
97 131
 
98 132
 })

+ 15 - 4
pages/personal_core/home/home.wxml

@@ -58,14 +58,25 @@
58 58
               <view class='data_list_r'>{{memberstatus}}</view>
59 59
         </navigator>
60 60
 
61
-        <navigator class='data_list c' hover-class="none" url="/pages/personal_core/QRcode/QRcode">
61
+       <button  open-type="share"  plain="true" >
62
+              <view class='data_list c'>
63
+                    <view class='data_list_l'>
64
+                            <image src='/image/m_core4.png' mode="widthFix"></image>
65
+                            <text>分享给朋友</text>
66
+                    </view>
67
+                    <!-- <view class='data_list_r'>{{memberstatus}}</view> -->
68
+              </view>
69
+        </button>
70
+
71
+        <navigator class='data_list c' hover-class="none" url='/pages/personal_core/remind/remind'>
62 72
               <view class='data_list_l'>
63
-                      <image src='/image/m_core5.png' mode="widthFix"></image>
64
-                      <text>我的微信</text>
73
+                      <image src='/image/m_core4.png' mode="widthFix"></image>
74
+                      <text>安全征婚提示</text>
65 75
               </view>
66
-              <view class='data_list_r'>{{wxauthentication.messages}}</view>
76
+              <!-- <view class='data_list_r'>{{memberstatus}}</view> -->
67 77
         </navigator>
68 78
 
79
+
69 80
         <navigator class='data_list c' hover-class="none" url="/pages/Setup/Setuplist/Setuplist">
70 81
               <view class='data_list_l'>
71 82
                       <image src='/image/m_core2.png' mode="widthFix"></image>

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

@@ -33,3 +33,4 @@
33 33
 .data_list_r{float:right;font-size:26rpx;color: #A7A6A6;position:relative;top:11rpx;}
34 34
 .data_list_r text{color:#FF79B8;}
35 35
 
36
+button[plain]{ border:0;padding: 0;margin: 0;  line-height: 1;}

+ 17 - 2
pages/personal_core/home_list/home_list.js

@@ -4,14 +4,16 @@ Page({
4 4
  
5 5
   data: {
6 6
     optioninfo:'',
7
+
8
+    wxauthentication: [],     //我的微信
7 9
   },
8 10
 
9 11
 
10 12
   onLoad: function (options) {
11 13
 
12 14
         var that = this;
13
-        // console.log(options.uid)
14
-
15
+    
16
+    // getApp().showLoading();   //提示加载中
15 17
         //  认证信息
16 18
     let optioninfo_url = 'my/authentication/adopticonone';
17 19
         let optioninfo_data = {
@@ -28,6 +30,19 @@ Page({
28 30
           }
29 31
         })
30 32
 
33
+        //  我的微信
34
+        let wxauthentication_url = 'my/wxqrcode/wxauthentication';
35
+        let wxauthentication_data = {
36
+        };
37
+        app.postRequest(wxauthentication_url, wxauthentication_data, function (res) {
38
+          // console.log(res.data);
39
+          that.setData({
40
+            wxauthentication: res.data
41
+          })
42
+
43
+        })
44
+
45
+
31 46
   },
32 47
 
33 48
 })

+ 7 - 0
pages/personal_core/home_list/home_list.wxml

@@ -31,6 +31,13 @@
31 31
 
32 32
                 <view class='yzlist_text'>{{optioninfo.fangchan.status}}</view>
33 33
         </navigator>
34
+
35
+        <navigator class='yzlist'  hover-class="none"  url="/pages/personal_core/QRcode/QRcode">
36
+                <image src='/image/yz5.png' mode="widthFix"></image>
37
+                <text>我的微信</text>
38
+
39
+                <view class='yzlist_text'>{{wxauthentication.messages}}</view>
40
+        </navigator>
34 41
 </view>
35 42
 
36 43
 <view class='yztext'>

+ 5 - 8
pages/personal_core/personaldata/personaldata.js

@@ -27,18 +27,13 @@ Page({
27 27
     
28 28
 
29 29
   },
30
-  // onShow() { //返回显示页面状态函数
31 30
 
32
-  //   this.onLoad()//再次加载,实现返回上一页页面刷新
33 31
 
34
-  //   //只执行获取地址的方法,来进行局部刷新
35
-  // },
32
+
36 33
 
37 34
   onShow: function (options) {
38 35
     var that = this;
39
-    getApp().showLoading();   //提示加载中
40 36
 
41
-  
42 37
   //  个人信息
43 38
     let information_url = 'my/personaldata/personal';
44 39
     let information_data = {
@@ -133,12 +128,13 @@ Page({
133 128
           headurl: res.data
134 129
         })
135 130
       }
131
+ 
136 132
     })
137 133
 
138
-
134
+  
139 135
 
140 136
   },
141
-  
137
+
142 138
   // enlarge:function(e){
143 139
   //   var that = this;
144 140
   
@@ -208,5 +204,6 @@ Page({
208 204
 
209 205
   },
210 206
 
207
+
211 208
   
212 209
 })

+ 0 - 3
pages/personal_core/personaldataModifythe/personaldataModifythe.js

@@ -53,12 +53,9 @@ Page({
53 53
 
54 54
 
55 55
 
56
-
57 56
   onLoad: function () {
58 57
     var that = this
59 58
 
60
-    getApp().showLoading();   //提示加载中
61
-
62 59
     //  获取个人信息
63 60
     let personal_url = 'my/personaldata/personal';
64 61
     let personal_data = {

+ 19 - 0
pages/personal_core/remind/remind.js

@@ -0,0 +1,19 @@
1
+// pages/personal_core/remind/remind.js
2
+Page({
3
+
4
+  /**
5
+   * 页面的初始数据
6
+   */
7
+  data: {
8
+
9
+  },
10
+
11
+  /**
12
+   * 生命周期函数--监听页面加载
13
+   */
14
+  onLoad: function (options) {
15
+
16
+  },
17
+
18
+  
19
+})

+ 3 - 0
pages/personal_core/remind/remind.json

@@ -0,0 +1,3 @@
1
+{
2
+  "navigationBarTitleText": "约会绑"
3
+}

+ 14 - 0
pages/personal_core/remind/remind.wxml

@@ -0,0 +1,14 @@
1
+
2
+<view class="remind_box">
3
+     <view class='remind'>
4
+                <text class='title'>安全征婚提示</text>
5
+
6
+                <text class='text' style='margin-top:30rpx;'>1 .仔细核对对方资料,选择公共约会场所;</text>
7
+                <text class='text'>2. 不要为面子支付不必要的账单,提高警觉意识;</text>
8
+                <text class='text'>3. 遵循循序渐进的交往原则;</text>
9
+                <text class='text'>4. 不要相信天上会掉馅饼,不要付出财物,也不要贪图对方的财物;</text>
10
+                <text class='text'>5. 充分思考,保持清晰的头脑,异地展现事业成就,不可轻信;</text>
11
+                <text class='text'>6. 在与异性联系的过程中,不要轻言轻信,或过于注重对方的外表与财力,稳固幸福的婚姻建立于相似的价值观念、相容的个性、相协调的生活态度,理性对待对方的高收入或出众外形等条件;</text>
12
+
13
+     </view>
14
+</view>

+ 9 - 0
pages/personal_core/remind/remind.wxss

@@ -0,0 +1,9 @@
1
+
2
+
3
+.remind_box{border:1px solid #EEE;width:90%;margin:auto;margin-top:20rpx;border-radius:10rpx;box-shadow :1px 3px 20px 0px #eee; }
4
+.remind{padding:30rpx;}
5
+
6
+.remind .title{font-size:34rpx;color:#333;display:block;text-align:center;font-weight:600;}
7
+
8
+.remind .text{font-size:27rpx;color:#666;display:block;line-height:44rpx;margin-bottom:25rpx;}
9
+.remind .text:last-child{margin-bottom:0;}

+ 97 - 59
pages/personal_core/requirements/requirements.js

@@ -58,8 +58,7 @@ Page({
58 58
 
59 59
   onLoad: function () {
60 60
     var that = this
61
-    getApp().showLoading();   //提示加载中
62
-
61
+ 
63 62
     //  获取择偶信息
64 63
     let personal_url = 'my/personaloption/optioninfo';
65 64
     let personal_data = {
@@ -98,27 +97,23 @@ Page({
98 97
       // console.log(_age_max);
99 98
       app.postRequest(Age_url, Age_data, function (res) {   //  年龄 ajax
100 99
               if (res.code == 201) {
101
-                      for (let i = 0; i < res.data.length; i++) {    //已选中的数据处理
102
-
103
-                        if (res.data[i] == _age_min) { var _min = i; }
104 100
 
105
-                        if (res.data[i] == _age_max) { var _max = i; }
106
-
107
-                        that.setData({
108
-                          AgeIndex: [_min, _max]
109
-                        })
110
-                      }
101
+                let min = data_processing(res.data, _age_min);      //已选中的数据处理  min
102
+                let max = data_processing(res.data, _age_max);   //已选中的数据处理  max
111 103
 
104
+                that.setData({
105
+                  AgeIndex: [min, max]
106
+                })
112 107
 
113
-                      let dictObject = res.data;    //对象不能直接使用  以下转成数组
114
-                        // 对象转成数组
115
-                        var createArr = []
116
-                        for (let i in dictObject) {
117
-                          createArr.push(dictObject[i] + "岁");
118
-                        }
119
-                        that.setData({
120
-                          AgeArray: [createArr, createArr],
121
-                        })
108
+                let dictObject = res.data;    //对象不能直接使用  以下转成数组
109
+                  // 对象转成数组
110
+                  var createArr = []
111
+                  for (let i in dictObject) {
112
+                    createArr.push(dictObject[i] + "岁");
113
+                  }
114
+                  that.setData({
115
+                    AgeArray: [createArr, createArr],
116
+                  })
122 117
 
123 118
                             // console.log(createArr);           
124 119
                 }
@@ -140,16 +135,13 @@ Page({
140 135
       app.postRequest(height_url, height_data, function (res) {      //  身高 ajax
141 136
                 if (res.code == 201) {
142 137
 
143
-                      for (let i = 0; i < res.data.length; i++) {    //已选中的数据处理
144
-                        // console.log(res.data[i])
145
-                        if (res.data[i] == _height_min) { var _min = i; }
138
+                  let min = data_processing(res.data, _height_min);      //已选中的数据处理  min
139
+                  let max = data_processing(res.data, _height_max);   //已选中的数据处理  max
146 140
 
147
-                        if (res.data[i] == _height_max) { var _max = i; }
148
-
149
-                        that.setData({
150
-                          heightindex: [_min, _max]
151
-                        })
152
-                      }
141
+                  that.setData({
142
+                    heightindex: [min, max]
143
+                  })
144
+   
153 145
 
154 146
                         let dictObject = res.data;        //对象不能直接使用  以下转成数组
155 147
                         // 对象转成数组
@@ -221,7 +213,7 @@ Page({
221 213
       })
222 214
 
223 215
       //  收入 ajax
224
-      let income_url = 'public/paramsgather?type=shouru';
216
+      let income_url = 'public/paramsgather?type=shouru1';
225 217
       let income_data = {
226 218
         // pid: '0'
227 219
       };
@@ -231,28 +223,19 @@ Page({
231 223
       // console.log(_income_max);
232 224
       app.postRequest(income_url, income_data, function (res) {      //  收入 ajax
233 225
         if (res.code == 201) {
234
-                  for (let i = 0; i < res.data.length; i++) {    //已选中的数据处理
235
-                    // console.log(res.data[i])
236
-                    if (res.data[i].min == _income_min) { var _min = i; }
226
+    
237 227
 
238
-                    if (res.data[i].max == _income_max) { var _max = i; }
228
+          var min = data_processing(res.data, _income_min);      //已选中的数据处理  min
229
+          var max = data_processing(res.data, _income_max);   //已选中的数据处理  max
239 230
 
240
-                    that.setData({
241
-                      incomeindex: [_min, _max]
242
-                    })
243
-                  }
231
+            that.setData({
232
+              incomeindex: [min, max]
233
+            })
234
+          
244 235
 
245
-                  let dictObject = res.data;      //对象不能直接使用  以下转成数组
246
-                  // 对象转成数组
247
-                  var createArr = []
248
-                  var createArr1 = []
249
-                  for (let i in dictObject) {
250
-                    createArr.push(dictObject[i].min);
251
-                    createArr1.push(dictObject[i].max);
252
-                  }
253
-                  that.setData({
254
-                    incomeArray: [createArr, createArr1],
255
-                  })
236
+            that.setData({
237
+              incomeArray: [res.data, res.data],
238
+            })
256 239
         }
257 240
 
258 241
       })
@@ -374,16 +357,29 @@ Page({
374 357
 
375 358
   // 年龄双选
376 359
   AgeEvent: function (e) {
360
+    var that =this;
377 361
     console.log('picker发送选择改变,携带值为', e.detail.value)
378
-
362
+    var _value = e.detail.value;  //发送选择改变,携带值为
379 363
     var Small = this.data.AgeArray[0][e.detail.value[0]].substring(0, 2);
380 364
     var large = this.data.AgeArray[1][e.detail.value[1]].substring(0, 2);
381
-    var Agedata = Small + '-' + large;
365
+
366
+
367
+    if (Small > large && Small != '不限' && large != '以上') {     //判断  最小值  大于  最大值  数据互换
368
+      //  console.log('调换')
369
+      var Agedata = large + '-' + Small;
370
+      that.Exchange(_value);    // 调用数组调换
371
+
372
+    } else {
373
+
374
+      var Agedata = Small + '-' + large;    //否则正常选中
375
+
376
+    }
377
+
382 378
 
383 379
     console.log(Agedata);
384 380
 
385 381
     this.setData({
386
-      AgeIndex: e.detail.value,
382
+      AgeIndex: _value,
387 383
       age: Agedata,
388 384
       Ageid: 1,
389 385
     })
@@ -391,19 +387,31 @@ Page({
391 387
 
392 388
 
393 389
   heightEvent: function (e) {   //  身高    单项选择器
390
+    var that = this;
394 391
     // console.log(this);
395 392
     // console.log(e);
396 393
     // console.log(this.data.heightArray[e.detail.value]);
397 394
     // console.log('picker发送选择改变,携带值为', e.detail.value)
398
-
395
+    var _value = e.detail.value;  //发送选择改变,携带值为
399 396
     var heightSmall = this.data. heightArray[0][e.detail.value[0]].substring(0, 3);
400 397
     var heightlarge = this.data. heightArray[1][e.detail.value[1]].substring(0, 3);
401
-    var heightdata = heightSmall + '-' + heightlarge;
398
+ 
399
+
400
+    // console.log(heightdata)
401
+    if (heightSmall > heightlarge && heightSmall != '不限' && heightlarge != '以上') {     //判断  最小值  大于  最大值  数据互换
402
+      //  console.log('调换')
403
+      var heightdata = heightlarge + '-' + heightSmall;
404
+      that.Exchange(_value);    // 调用数组调换
405
+
406
+    } else {
407
+
408
+      var heightdata = heightSmall + '-' + heightlarge;
409
+
410
+    }
402 411
 
403
-    // console.log(heightdata);
404 412
 
405 413
     this.setData({
406
-      heightindex: e.detail.value,
414
+      heightindex: _value,
407 415
       height: heightdata,
408 416
       heightid: 1,
409 417
     })
@@ -432,17 +440,29 @@ Page({
432 440
   },
433 441
 
434 442
   incomeEvent: function (e) {   //  收入    单项选择器
435
-
443
+    var that = this;
436 444
     // console.log(this);
437 445
     // console.log(e);
438 446
     // console.log(this.data.incomeArray[e.detail.value].id);
439 447
     // console.log('picker发送选择改变,携带值为', e.detail.value)
448
+    var _value = e.detail.value;  //发送选择改变,携带值为
440 449
     var srSmall = this.data.incomeArray[0][e.detail.value[0]];
441 450
     var srlarge = this.data.incomeArray[1][e.detail.value[1]];
442
-    var srdata = srSmall + '-' + srlarge;
451
+
452
+    if (srSmall > srlarge && srSmall != '不限' && srlarge != '以上') {     //判断  最小值  大于  最大值  数据互换
453
+      //  console.log('调换')
454
+      var srdata = srlarge + '-' + srSmall;
455
+      that.Exchange(_value);    // 调用数组调换
456
+
457
+    } else {
458
+
459
+      var srdata = srSmall + '-' + srlarge;  //否则正常选中
460
+
461
+    }
462
+
443 463
     // console.log(srdata);
444 464
     this.setData({
445
-      incomeindex: e.detail.value,
465
+      incomeindex: _value,
446 466
       income: srdata,
447 467
       incomeid:1,
448 468
     })
@@ -459,6 +479,17 @@ Page({
459 479
     })
460 480
   },
461 481
 
482
+  // 数组数据调换
483
+  Exchange: function (data) {
484
+    for (var i = 0; i < data.length / 2; i++) {
485
+      var data_i = data[i];
486
+      data[i] = data[data.length - 1 - i];
487
+      data[data.length - 1 - i] = data_i;
488
+    }
489
+    return;
490
+  },
491
+
492
+
462 493
   // contactEvent: function (e) {   //  允许有意者联系我    单项选择器
463 494
   //   // console.log(this.data.selectArray[e.detail.value].area_name)
464 495
   //   // console.log('picker发送选择改变,携带值为', e.detail.value)
@@ -720,3 +751,10 @@ Page({
720 751
 
721 752
 })
722 753
 
754
+var data_processing = function (data, min_max, ) {
755
+  for (let i = 0; i < data.length; i++) {    //已选中的数据处理
756
+    if (data[i] == min_max) {
757
+      return i;
758
+    }
759
+  }
760
+}

+ 3 - 1
pages/register/OwnData/OwnData.js

@@ -177,6 +177,8 @@ Page({
177 177
     app.postRequest(Marriage_url, Marriage_data, function (res) {      //  婚史 ajax
178 178
       if (res.code == 201) {
179 179
         // console.log(res.data);
180
+
181
+    
180 182
         that.setData({
181 183
           MarriageArray: res.data
182 184
         })
@@ -192,7 +194,7 @@ Page({
192 194
     };
193 195
     app.postRequest(income_url, income_data, function (res) {      //  收入 ajax
194 196
       if (res.code == 201) {
195
-        // console.log(res.data);
197
+        console.log(res.data);
196 198
         that.setData({
197 199
           incomeArray: res.data
198 200
         })

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

@@ -126,6 +126,8 @@
126 126
           </picker>
127 127
 </view>
128 128
 
129
+
130
+
129 131
 <view class="Choice_dx_box">     <!--  收入 单项选择器-->
130 132
             <picker  bindchange="incomeEvent" value="{incomeindex}}" range="{{incomeArray}}"  range-key="name">
131 133