فهرست منبع

区域筛选对接口

sunjuan 3 سال پیش
والد
کامیت
89b589fb76
1فایلهای تغییر یافته به همراه104 افزوده شده و 40 حذف شده
  1. 104 40
      src/main/resources/static/main/tradingranking.html

+ 104 - 40
src/main/resources/static/main/tradingranking.html

@@ -268,43 +268,43 @@
 						id: 'yz',
 						title: '渝中',
 						active: false
-					}, {
+						}, {
 						id: 'jb',
 						title: '江北',
 						active: false
-					}, {
+						}, {
 						id: 'yb',
 						title: '渝北',
 						active: false
-					}, {
+						}, {
 						id: 'na',
 						title: '南岸',
 						active: false
-					}, {
+						}, {
 						id: 'bb',
 						title: '北碚',
 						active: false
-					}, {
+						}, {
 						id: 'bn',
 						title: '巴南',
 						active: false
-					}, {
+						}, {
 						id: 'ddk',
 						title: '大渡口',
 						active: false
-					}, {
+						}, {
 						id: 'spb',
 						title: '沙坪坝',
 						active: false
-					}, {
+						}, {
 						id: 'jlp',
 						title: '九龙坡',
 						active: false
-					}, {
+						}, {
 						id: 'ljxq',
 						title: '两江新区',
 						active: false
-					}, {
+						}, {
 						id: 'gxq',
 						title: '高新区',
 						active: false
@@ -314,43 +314,43 @@
 						id: 'fd',
 						title: '丰都',
 						active: false
-					}, {
+						}, {
 						id: 'dj',
 						title: '垫江',
 						active: false
-					}, {
+						}, {
 						id: 'wz',
 						title: '万州',
 						active: false
-					}, {
+						}, {
 						id: 'ws',
 						title: '巫山',
 						active: false
-					}, {
+						}, {
 						id: 'wx',
 						title: '巫溪',
 						active: false
-					}, {
+						}, {
 						id: 'yy',
 						title: '云阳',
 						active: false
-					}, {
+						}, {
 						id: 'fj',
 						title: '奉节',
 						active: false
-					}, {
+						}, {
 						id: 'ck',
 						title: '城口',
 						active: false
-					}, {
+						}, {
 						id: 'kz',
 						title: '开州',
 						active: false
-					}, {
+						}, {
 						id: 'zx',
 						title: '忠县',
 						active: false
-					}, {
+						}, {
 						id: 'lp',
 						title: '梁平',
 						active: false
@@ -360,23 +360,23 @@
 						id: 'qj',
 						title: '黔江',
 						active: false
-					}, {
+						}, {
 						id: 'wl',
 						title: '武隆',
 						active: false
-					}, {
+						}, {
 						id: 'xs',
 						title: '秀山',
 						active: false
-					}, {
+						}, {
 						id: 'sz',
 						title: '石柱',
 						active: false
-					}, {
+						}, {
 						id: 'qy',
 						title: '酉阳',
 						active: false
-					}, {
+						}, {
 						id: 'ps',
 						title: '彭水',
 						active: false
@@ -386,47 +386,47 @@
 						id: 'jj',
 						title: '江津',
 						active: false
-					}, {
+						}, {
 						id: 'hc',
 						title: '合川',
 						active: false
-					}, {
+						}, {
 						id: 'yc',
 						title: '永川',
 						active: false
-					}, {
+						}, {
 						id: 'dz',
 						title: '大足',
 						active: false
-					}, {
+						}, {
 						id: 'bs',
 						title: '璧山',
 						active: false
-					}, {
+						}, {
 						id: 'tl',
 						title: '铜梁',
 						active: false
-					}, {
+						}, {
 						id: 'tn',
 						title: '潼南',
 						active: false
-					}, {
+						}, {
 						id: 'rc',
 						title: '荣昌',
 						active: false
-					}, {
+						}, {
 						id: 'nc',
 						title: '南川',
 						active: false
-					}, {
+						}, {
 						id: 'cqj',
 						title: '綦江',
 						active: false
-					}, {
+						}, {
 						id: 'pl',
 						title: '涪陵',
 						active: false
-					}, {
+						}, {
 						id: 'cs',
 						title: '长寿',
 						active: false
@@ -440,19 +440,19 @@
 						active: false,
 						dis: false,
 						bkAc: false
-					}, {
+						}, {
 						id: 'dsxq',
 						title: '都市新区',
 						active: false,
 						dis: false,
 						bkAc: false
-					}, {
+						}, {
 						id: 'ydb',
 						title: '渝东北',
 						active: false,
 						dis: false,
 						bkAc: false
-					}, {
+						}, {
 						id: 'ydn',
 						title: '渝东南',
 						active: false,
@@ -549,10 +549,74 @@
 					// console.log(newPage);
 					this.page = newPage;
 				},
+				getSearchCondition() {
+					var _this = this;
+					$.ajax({
+						type: 'GET',
+						url: PATH + '/front/getSearchCondition',
+						success: function (json) {
+							console.log(json)
+							var index = 1;
+							var Area=json.data.area;
+							
+							// 区域 中心城区
+							_this.coreList = [];
+							for (var i = 0; i < Area.zxcq.length; i++) {
+							    _this.coreList.push({
+							        id: index++,
+							        title: Area.zxcq[i].areaName,
+							        active: false,
+							        dis: false,
+							        value: Area.zxcq[i].code
+							    })
+							}
+							
+							// 区域 都市新区
+							_this.newList = [];
+							for (var i = 0; i < Area.dsxq.length; i++) {
+							    _this.newList.push({
+							        id: index++,
+							        title: Area.dsxq[i].areaName,
+							        active: false,
+							        dis: false,
+							        value: Area.dsxq[i].code
+							    })
+							}
+							
+							// 区域 渝东北
+							_this.northeastList = [];
+							for (var i = 0; i < Area.ydbq.length; i++) {
+							    _this.northeastList.push({
+							        id: index++,
+							        title: Area.ydbq[i].areaName,
+							        active: false,
+							        dis: false,
+							        value: Area.ydbq[i].code
+							    })
+							}
+							
+							// 区域 渝东南
+							_this.southeastList = [];
+							for (var i = 0; i < Area.ydnq.length; i++) {
+							    _this.southeastList.push({
+							        id: index++,
+							        title: Area.ydnq[i].areaName,
+							        active: false,
+							        dis: false,
+							        value: Area.ydnq[i].code
+							    })
+							}
+						},
+						error: function (err) {
+							layer.msg('网络错误!');
+						}
+					})
+				}
 			},
 			created: function () {
 				this.loading = true;
-				getAjaxValue()
+				getAjaxValue();
+				this.getSearchCondition();
 			}
 		})