Kaynağa Gözat

Merge branch 'master' of http://116.63.33.55/git/zfjyjgfwpt

sunjuan 3 yıl önce
ebeveyn
işleme
0fca52e445

+ 4 - 4
src/main/java/com/jd/zfjyjgfwpt/controller/FrontController.java

@@ -278,20 +278,20 @@ public class FrontController extends BaseController {
      * @param FYHYM 房源核验码
      */
     @GetMapping("houseSourceVerify")
-    public void houseSourceVerify(String FYHYM, String captcha) {
+    public void houseSourceVerify(String callback, String FYHYM, String captcha) {
         if (Blank.isEmpty(FYHYM, captcha)) {
-            sendJson(false, "房源核验码或验证码不能为空!", null);
+            sendJsonp(callback, false, "房源核验码或验证码不能为空!", null);
             return;
         }
 
         String saveCaptcha = Convert.toStr(redisTemplate.opsForValue().get(getRequest().getRequestedSessionId() + "-captcha"), "");
         if ("".equals(saveCaptcha) || !captcha.equals(saveCaptcha)) {
-            sendJson(false, "输入的验证码有误!", null);
+            sendJsonp(callback, false, "输入的验证码有误!", null);
             return;
         }
 
         final ApiResponse<?> apiResponse = service.houseSourceVerify(FYHYM);
-        sendJson(apiResponse.isSuccess(), apiResponse.getMsg(), apiResponse.getData());
+        sendJsonp(callback, apiResponse.isSuccess(), apiResponse.getMsg(), apiResponse.getData());
     }
 
     /**

+ 55 - 164
src/main/resources/static/main/listingList.html

@@ -589,173 +589,13 @@
                 page: 1,
                 limit: 5,
                 // 中心城区
-                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: [],
                 isShow: true,
                 // 区域一级选择
                 buxQu: false,
@@ -828,6 +668,9 @@
                     }
                 },
             },
+            created: function () {
+                this.allArea()
+            },
             methods: {
                 // 样式一
                 allSelect() {
@@ -879,6 +722,54 @@
                     // console.log(newPage);
                     this.page = newPage;
                 },
+                allArea() {
+                    var _this=this
+                    $.ajax({
+                        type: 'get',
+                        url: PATH + '/front/getSearchCondition',
+                        success: function (json) {
+                            var Area=json.data.area
+                            console.log(Area)
+                            var index=1
+                            for (var i = 0; i < Area.zxcq.length; i++) {
+                                _this.coreList.push({
+                                    id: index++,
+                                    title: Area.zxcq[i].areaName,
+                                    active: false,
+                                    code: 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,
+                                    code: 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,
+                                    code: 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,
+                                    code: Area.ydnq[i].code
+                                })
+                            }
+                            
+                        },
+                        error: function (err) {
+                            layer.msg('网络错误!');
+                        }
+                    })
+                }
             }
         })
     </script>