|
@@ -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
|
|