Your Name %!s(int64=6) %!d(string=hai) anos
pai
achega
c55a57f2a3

+ 2 - 1
app.js

@@ -52,7 +52,7 @@ App({
52 52
     //   })
53 53
     // }
54 54
 
55
-
55
+  
56 56
   },
57 57
 
58 58
   
@@ -189,6 +189,7 @@ App({
189 189
 
190 190
 
191 191
   getDistrict(latitude, longitude) {
192
+
192 193
     let _page = this;
193 194
     let keys = '3VTBZ-JEH6Q-M7D5I-GNPVS-3QWBH-QUFY3';
194 195
     wx.request({

+ 2 - 0
modules/chat-input/chat-input.wxss

@@ -20,6 +20,8 @@ input{
20 20
     width: 100%;
21 21
     align-items: center;
22 22
     height:100rpx;
23
+    padding:8rpx 0 36rpx 0;
24
+
23 25
 }
24 26
 .input-flex-column{
25 27
     width:100%;

+ 14 - 2
pages/Landpage/Land/Land.js

@@ -13,15 +13,25 @@ Page({
13 13
 
14 14
     inputValue1: null,
15 15
     inputValue2: null,
16
-
16
+    usertext:'',   //储存手机号码
17 17
   },
18 18
 
19 19
   /**
20 20
    * 生命周期函数--监听页面加载
21 21
    */
22 22
   onLoad: function (options) {
23
+    var _this =this;
23 24
     setTimeout(function () {
24 25
       wx.hideLoading()
26
+
27
+ 
28
+      // 记录登陆过的手机
29
+    if (wx.getStorageSync('user')){
30
+        _this.setData({
31
+          inputValue1: wx.getStorageSync('user'),
32
+        });
33
+      }
34
+ 
25 35
     })
26 36
 
27 37
     wx.getSetting({
@@ -33,6 +43,7 @@ Page({
33 43
           // });
34 44
           console.log('已经授权');
35 45
 
46
+
36 47
         } else {
37 48
       wx.reLaunch({
38 49
         url: '/pages/Jurisdiction/click_Jurisdiction/click_Jurisdiction'   //未授权  进入授权页
@@ -75,7 +86,7 @@ Page({
75 86
     app.postRequest(Land_url, Land_data, function (res) {
76 87
 
77 88
       if (res.code == 201) {
78
-         console.log(res.data);
89
+        console.log(res.data);
79 90
         // console.log(res.data.access_key);
80 91
         // console.log(res.data.access_token);
81 92
 
@@ -88,6 +99,7 @@ Page({
88 99
                     wx.setStorageSync('access_key', res.data.access_key)
89 100
                     wx.setStorageSync('access_token', res.data.access_token)
90 101
                     wx.setStorageSync('access_user', res.data.access_user)
102
+                    wx.setStorageSync('user', that.data.user)
91 103
                   } catch (e) {
92 104
 
93 105
                   }

+ 9 - 2
pages/Setup/Setuplist/Setuplist.js

@@ -14,10 +14,17 @@ Page({
14 14
 
15 15
 
16 16
   register:function(){
17
+    var user = wx.getStorageSync('user');
17 18
     wx.clearStorageSync();
19
+
20
+    try {
21
+      wx.setStorageSync('user', user)
22
+    } catch (e) {
23
+    }
24
+
18 25
     wx.reLaunch({
19
-      url: '/pages/Landpage/Land/Land'
26
+      url: '/pages/Landpage/Land/Land'    //传递登陆过手机号码
20 27
     });
21
-    // console.log(111);
28
+
22 29
   }
23 30
 })

+ 1 - 1
pages/chat/chat.wxml

@@ -26,7 +26,7 @@
26 26
 <template is="chat-input" data="{{inputObj,textMessage,showVoicePart:true}}"/> -->
27 27
 
28 28
  <scroll-view
29
-        style="height:{{pageHeight}}px;width: 100%;display: flex;flex-direction: column;margin-top: 54rpx;"
29
+        style="height:{{pageHeight -44}}px;width: 100%;display: flex;flex-direction: column;"
30 30
         scroll-y="true"
31 31
         scroll-top="{{scrollTopVal}}"
32 32
         bindtap="resetInputStatus"

+ 25 - 67
pages/index/index.js

@@ -50,9 +50,7 @@ Page({
50 50
 
51 51
 
52 52
     // 省市区
53
-    province: 0,     // 省 要传的数据
54 53
     city: 0,     // 市  要传的数据
55
-    area: 0,     // 区 要传的数据
56 54
     provinceName: '',     // 省 要传的数据
57 55
     cityName: '',     // 市  要传的数据
58 56
     areaName: '',     // 区 要传的数据
@@ -111,9 +109,6 @@ Page({
111 109
 
112 110
 
113 111
 
114
-
115
-
116
-
117 112
     if (app.globalData.income) {
118 113
       that.setData({
119 114
         income: _income,
@@ -123,56 +118,30 @@ Page({
123 118
         income: _income,
124 119
       })
125 120
     }
121
+    // console.log(_Selection)
126 122
 
127
-
128
-    var _province = app.globalData.province     //  省  
129 123
     var _city = app.globalData.city      //  市 
130
-    var _area = app.globalData.area     //  区  
131 124
     var _provincename = app.globalData.provinceName  //  省 名称
132 125
     var _cityname = app.globalData.cityName   //  市 名称
133 126
     var _areaname = app.globalData.areaName      //  区  名称
134 127
 
135
-    if (_province && _city && _area && _Selection == 1) {
128
+    if (_provincename && _cityname && _Selection == 1) {
136 129
       that.setData({
137
-        province: _province,
138 130
         city: _city,
139
-        area: _area,
140 131
         provinceName: _provincename,  // 省名称
141 132
         cityName: _cityname, // 市名称
142 133
         areaName: _areaname,  // 区名称
143 134
       })
144 135
 
145
-      // console.log(that.data.province)
146
-      // console.log(that.data.city)
147
-      // console.log(that.data.area)
148
-      // console.log(that.data.provinceName)
149
-      // console.log(that.data.cityName)
150
-      // console.log(that.data.areaName)
151
-    }
152
-
153
-
154
-    // if (_provincename && _cityname && _areaname) {
155
-    //   that.setData({
156
-    //     provinceName: _provincename,
157
-    //     cityName: _cityname,
158
-    //     areaName: _areaname,
159
-    //     // step: 0,
160
-    //   })
161
-
162
-    //   // console.log(_provincename);
163
-    //   // console.log(_cityname);
164
-    //   // console.log(_areaname);  
165
-    // } else if (_cityname == 0 && _Selection == 1) {     //判断筛选页面  是否清空数据   同时 是否选中,而不是返回
166
-    //   that.setData({
167
-    //     provinceName: _provincename,
168
-    //     cityName: _cityname,
169
-    //     areaName: _areaname,
170
-    //     // step: 0,
171
-    //   })
172
-    // }
173
-
174
-
136
+    } else if (_provincename == '' && _cityname == '' &&  _Selection == 1){
137
+      that.setData({
138
+        city: _city,
139
+        provinceName: _provincename,  // 省名称
140
+        cityName: _cityname, // 市名称
141
+        areaName: _areaname,  // 区名称
142
+      })
175 143
 
144
+    }
176 145
 
177 146
 
178 147
 
@@ -554,7 +523,6 @@ Page({
554 523
     var that = this;
555 524
     // console.log(that.data.age);
556 525
 
557
-    // '&province=' + that.data.province + '&city=' + that.data.city + '&area=' + that.data.area +  
558 526
 
559 527
 
560 528
     // console.log(that.data.provinceName);
@@ -563,7 +531,7 @@ Page({
563 531
 
564 532
 
565 533
     wx.navigateTo({
566
-      url: '/pages/index_screen/index_screen?age=' + that.data.age + '&height=' + that.data.height + '&marry=' + that.data.marry + '&idmarry=' + that.data.idmarry + '&education=' + that.data.education + '&income=' + that.data.income + '&educationid=' + that.data.educationid + '&province=' + that.data.province + '&city=' + that.data.city + '&area=' + that.data.area + '&provinceName=' + that.data.provinceName + '&cityName=' + that.data.cityName + '&areaName=' + that.data.areaName +  ''
534
+      url: '/pages/index_screen/index_screen?age=' + that.data.age + '&height=' + that.data.height + '&marry=' + that.data.marry + '&idmarry=' + that.data.idmarry + '&education=' + that.data.education + '&income=' + that.data.income + '&educationid=' + that.data.educationid +'&city=' + that.data.city +  '&provinceName=' + that.data.provinceName + '&cityName=' + that.data.cityName + '&areaName=' + that.data.areaName +  ''
567 535
     })
568 536
 
569 537
 
@@ -609,9 +577,7 @@ Page({
609 577
         marry: that.data.marry,    //   婚史 
610 578
         education: that.data.education,    //  学历  
611 579
         income: _income,  //收入
612
-        province: that.data.province ,     // 省
613 580
         city: that.data.city,                    // 市
614
-        area: that.data.area,                    // 区
615 581
       };
616 582
 
617 583
       console.log('选择');
@@ -702,9 +668,7 @@ Page({
702 668
         marry: that.data.marry,    //   婚史 
703 669
         education: that.data.education,    //  学历  
704 670
         income: _income,  //收入
705
-        province: that.data.province ,     // 省
706 671
         city: that.data.city,                    // 市
707
-        area: that.data.area,                    // 区
708 672
       };
709 673
 
710 674
       // console.log('选择');
@@ -878,15 +842,19 @@ Page({
878 842
     var _style = e.currentTarget.dataset.style;
879 843
     // console.log(_style);
880 844
 
845
+
846
+    var regionid = e.currentTarget.dataset.id;     //传递地区ID
847
+    // console.log(regionid);
848
+
849
+
881 850
     switch (_style) {
851
+
882 852
       case 'provinceLx':
883 853
         // console.log('省');
884 854
         that.setData({
885
-          province: that.data.provinceid,   // 省数据
855
+          city: regionid,
886 856
           provinceName: that.data.provincetext, // 省名字
887
-          city: 0,   // 市数据清空
888 857
           cityName: '',   // 市名字清空
889
-          area: 0,   // 区数据清空
890 858
           areaName: "",  //  区名字
891 859
         })
892 860
         break;
@@ -894,39 +862,31 @@ Page({
894 862
       case 'cityLx':
895 863
         // console.log('市');
896 864
         that.setData({
897
-          province: that.data.provinceid,   // 省数据
865
+          city: regionid,
898 866
           provinceName: that.data.provincetext, // 省名字
899
-          city: that.data.cityidx,   // 市数据
900 867
           cityName: that.data.citytext, // 省名字
901
-          area: 0,   // 区数据清空
902 868
           areaName: "",  //  区名字
903 869
         })
904 870
         break;
905 871
 
906 872
       case 'areaLx':
907 873
         // console.log('区');
908
-        var areaid = e.currentTarget.dataset.id;     //区ID
909 874
         var areatext = e.currentTarget.dataset.text;     //区名字
910
-
911 875
         that.setData({
912
-          province: that.data.provinceid,   // 省数据
876
+          city: regionid,
913 877
           provinceName: that.data.provincetext, // 省名字
914
-          city: that.data.cityidx,   // 市数据
915 878
           cityName: that.data.citytext, // 省名字
916
-          area: areaid,   // 区数据
917 879
           areaName: areatext,   //  区名字
918 880
 
919 881
         })
920 882
         break;
921 883
 
922 884
     }
923
-
924
-    // console.log(that.data.province)
925
-    // console.log(that.data.city)
926
-    // console.log(that.data.area)
927
-    // console.log(that.data.provinceName)
928
-    // console.log(that.data.cityName)
929
-    // console.log(that.data.areaName)
885
+    
886
+    console.log(that.data.city)
887
+    console.log(that.data.provinceName)
888
+    console.log(that.data.cityName)
889
+    console.log(that.data.areaName)
930 890
 
931 891
     that.list(); //调用筛选
932 892
 
@@ -952,11 +912,9 @@ Page({
952 912
       cityidx: 0,
953 913
       citytext: '',
954 914
 
955
-      province:0,   // 省数据
956 915
       provinceName:'', // 省名字
957 916
       city: 0,   // 市数据清空
958 917
       cityName: '',   // 市名字清空
959
-      area: 0,   // 区数据清空
960 918
       areaName: "",  //  区名字
961 919
     })
962 920
 

+ 12 - 32
pages/index_screen/index_screen.js

@@ -41,9 +41,7 @@ Page({
41 41
 
42 42
 
43 43
     // 省市区
44
-    province: 0,     // 省 要传的数据
45 44
     city: 0,     // 市  要传的数据
46
-    area: 0,     // 区 要传的数据
47 45
     provinceName: '',     // 省 要传的数据
48 46
     cityName: '',     // 市  要传的数据
49 47
     areaName: '',     // 区 要传的数据
@@ -79,9 +77,8 @@ Page({
79 77
     app.globalData.income = 0;     //  收入 
80 78
 
81 79
     
82
-    var _province = option.province      //  省  
80
+
83 81
     var _city = option.city      //  市  
84
-    var _area = option.area      //  区  
85 82
 
86 83
     var _provincename = option.provinceName      //  省  
87 84
     var _cityname = option.cityName      //  市  
@@ -94,9 +91,7 @@ Page({
94 91
 
95 92
 
96 93
     that.setData({
97
-      province: _province,
98 94
       city: _city,
99
-      area: _area,
100 95
       provinceName: _provincename,  // 省
101 96
       cityName: _cityname, // 市
102 97
       areaName: _areaname,  // 区
@@ -106,9 +101,8 @@ Page({
106 101
 
107 102
     })
108 103
 
109
-    // console.log(that.data.province)
104
+
110 105
     // console.log(that.data.city)
111
-    // console.log(that.data.area)
112 106
     // console.log(that.data.provinceName)
113 107
     // console.log(that.data.cityName)
114 108
     // console.log(that.data.areaName)
@@ -584,9 +578,7 @@ Page({
584 578
     app.globalData.Selection = String(1);    //  是否选中   1 选中   0没选中
585 579
 
586 580
 
587
-    app.globalData.province = String(_this.data.province);    //  省 
588 581
     app.globalData.city = String(_this.data.city);    //  市 
589
-    app.globalData.area = String(_this.data.area);    //  区 
590 582
 
591 583
     app.globalData.provinceName = String(_this.data.provinceName);    //  省 
592 584
     app.globalData.cityName = String(_this.data.cityName);    //  市 
@@ -635,9 +627,7 @@ Page({
635 627
 
636 628
       inputValue: '', //ID
637 629
 
638
-      province: 0,  // 市
639 630
       city: 0,  // 市
640
-      area: 0,   // 区
641 631
       provinceName: '',  // 省
642 632
       cityName: '', // 市
643 633
       areaName: '',  // 区
@@ -655,9 +645,7 @@ Page({
655 645
     app.globalData.income = String(_this.data.income);     //  收入 
656 646
     app.globalData.Selection = String(1);    //  是否选中   1 选中   0没选中
657 647
 
658
-    app.globalData.province = String(_this.data.province);    //  省 
659 648
     app.globalData.city = String(_this.data.city);    //  市 
660
-    app.globalData.area = String(_this.data.area);    //  区 
661 649
 
662 650
     app.globalData.provinceName = String(_this.data.provinceName);    //  省 
663 651
     app.globalData.cityName = String(_this.data.cityName);    //  市 
@@ -721,7 +709,7 @@ Page({
721 709
           cityidx: '',   // idx  选中清空
722 710
         })
723 711
 
724
-        console.log(res.data)
712
+        // console.log(res.data)
725 713
 
726 714
       }
727 715
     })
@@ -765,7 +753,7 @@ Page({
765 753
           // console.log('执行')
766 754
           //   console.log(_index * 42);
767 755
         }
768
-        console.log(res.data)
756
+        // console.log(res.data)
769 757
       }
770 758
 
771 759
     })
@@ -780,15 +768,17 @@ Page({
780 768
     var _style = e.currentTarget.dataset.style;
781 769
     // console.log(_style);
782 770
 
771
+    var regionid = e.currentTarget.dataset.id;     //传递地区ID
772
+    // console.log(regionid);
773
+
783 774
     switch (_style) {
775
+
784 776
       case 'provinceLx':
785 777
         // console.log('省');
786 778
         that.setData({
787
-          province: that.data.provinceid,   // 省数据
779
+          city: regionid,
788 780
           provinceName: that.data.provincetext, // 省名字
789
-          city: 0,   // 市数据清空
790 781
           cityName: '',   // 市名字清空
791
-          area: 0,   // 区数据清空
792 782
           areaName: "",  //  区名字
793 783
         })
794 784
         break;
@@ -796,26 +786,20 @@ Page({
796 786
       case 'cityLx':
797 787
         // console.log('市');
798 788
         that.setData({
799
-          province: that.data.provinceid,   // 省数据
789
+          city: regionid,
800 790
           provinceName: that.data.provincetext, // 省名字
801
-          city: that.data.cityidx,   // 市数据
802 791
           cityName: that.data.citytext, // 省名字
803
-          area: 0,   // 区数据清空
804 792
           areaName: "",  //  区名字
805 793
         })
806 794
         break;
807 795
 
808 796
       case 'areaLx':
809 797
         // console.log('区');
810
-        var areaid = e.currentTarget.dataset.id;     //区ID
811 798
         var areatext = e.currentTarget.dataset.text;     //区名字
812
-
813 799
         that.setData({
814
-          province: that.data.provinceid,   // 省数据
800
+          city: regionid,
815 801
           provinceName: that.data.provincetext, // 省名字
816
-          city: that.data.cityidx,   // 市数据
817 802
           cityName: that.data.citytext, // 省名字
818
-          area: areaid,   // 区数据
819 803
           areaName: areatext,   //  区名字
820 804
 
821 805
         })
@@ -823,9 +807,7 @@ Page({
823 807
 
824 808
     }
825 809
 
826
-    // console.log(that.data.province)
827 810
     // console.log(that.data.city)
828
-    // console.log(that.data.area)
829 811
     // console.log(that.data.provinceName)
830 812
     // console.log(that.data.cityName)
831 813
     // console.log(that.data.areaName)
@@ -854,11 +836,9 @@ Page({
854 836
       cityidx: 0,
855 837
       citytext: '',
856 838
 
857
-      province: 0,   // 省数据
858
-      provinceName: '', // 省名字
859 839
       city: 0,   // 市数据清空
840
+      provinceName: '', // 省名字
860 841
       cityName: '',   // 市名字清空
861
-      area: 0,   // 区数据清空
862 842
       areaName: "",  //  区名字
863 843
     })
864 844