فهرست منبع

房源详情 区域

ljh 3 سال پیش
والد
کامیت
a7b366e46b
2فایلهای تغییر یافته به همراه55 افزوده شده و 194 حذف شده
  1. 2 2
      src/main/resources/static/main/css/houseSearch.css
  2. 53 192
      src/main/resources/static/main/js/houseSearch.js

+ 2 - 2
src/main/resources/static/main/css/houseSearch.css

@@ -53,9 +53,9 @@ body {
   flex: 6.7;
 } */
 
-.region .qu-list .qu-item:nth-child(2) .region-list {
+/* .region .qu-list .qu-item:nth-child(2) .region-list {
   flex: 64;
-}
+} */
 
 .qu-item .region-title>input{
 	margin-left: 10px;

+ 53 - 192
src/main/resources/static/main/js/houseSearch.js

@@ -92,173 +92,13 @@ const houSear = new Vue({
             dis: false
         }],
         // 中心城区
-        coreList: [{
-            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
-        },],
+        coreList: [],
         // 渝东北
-        northeastList: [{
-            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
-        },],
+        northeastList: [],
         // 渝东南
-        southeastList: [{
-            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
-        }],
+        southeastList: [],
         // 都市新区
-        newList: [{
-            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
-        },],
+        newList: [],
         // 面积
         buxPm: false,
         arcList: [{
@@ -347,27 +187,7 @@ const houSear = new Vue({
             title: '其他',
             active: false
         }],
-        fzzList: [{
-            id: 22,
-            title: '办公',
-            active: false
-        }, {
-            id: 32,
-            title: '商业',
-            active: false
-        }, {
-            id: 42,
-            title: '车位',
-            active: false
-        }, {
-            id: 52,
-            title: '工业/交通/仓储',
-            active: false
-        }, {
-            id: 62,
-            title: '其他',
-            active: false
-        }],
+        fzzList: [],
         // 装修
         buxZx: false,
         more3: [{
@@ -637,28 +457,69 @@ const houSear = new Vue({
 
                     // 用途
                     _this.more2 = [];
-                    for (var i = 0; i < json.data.YT.length; i++) {
+                    console.log(json.data)
+                    for (var i = 0; i < json.data.YT.zz.length; i++) {
                         _this.more2.push({
                             id: index++,
-                            title: json.data.YT[i],
+                            title: json.data.YT.zz[i],
                             active: false,
                             dis: false,
-                            value: json.data.YT[i]
+                            value: json.data.YT.zz[i]
+                        })
+                    }
+                    for (var i = 0; i < json.data.YT.fzz.length; i++) {
+                        _this.fzzList.push({
+                            id: index++,
+                            title: json.data.YT.fzz[i],
+                            active: false,
+                            dis: false,
+                            value: json.data.YT.fzz[i]
                         })
                     }
-
                     // 区域 中心城市
                     _this.coreList = [];
-                    for (var i = 0; i < json.data.area.length; i++) {
+                    var Area =json.data.area
+                    for (var i = 0; i < Area.zxcq.length; i++) {
                         _this.coreList.push({
                             id: index++,
-                            title: json.data.area[i],
+                            title:Area.zxcq[i].areaName,
+                            active: false,
+                            dis: false,
+                            value:  Area.zxcq[i].code
+                        })
+                    }
+                    //  都市新区
+                    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
+                        })
+                    }
+
+                    // 渝东北
+                    for (var i = 0; i < Area.ydbq.length; i++) {
+                        _this.northeastList.push({
+                            id: index++,
+                            title:Area.ydbq[i].areaName,
                             active: false,
                             dis: false,
-                            value: json.data.area[i]
+                            value:  Area.ydbq[i].code
                         })
                     }
 
+                    // 渝东南
+                    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
+                        })
+                    }
                     // 价格
                     _this.priceList = [];
                     for (var i = 0; i < json.data.price.length; i++) {