From 76fa590342d828d8df67a6dbefbd30170c3a9f17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E5=81=A5?= Date: Wed, 25 Aug 2021 15:35:42 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=BF=91=E4=B8=80=E5=B9=B4=E7=A7=9F?= =?UTF-8?q?=E9=87=91=E8=B5=B0=E5=8A=BF=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fangjia/open/controllers/PropertyController.java | 4 ++-- .../open/controllers/weixin/CcbRentController.java | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java index e75123689..1ba157ee5 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java @@ -5295,8 +5295,8 @@ public class PropertyController { //½üһÄ껧ÐÍ×â½ð×ßÊÆ - Map trendsMap = districtRoomSqmetreRentService.getRentTrends(district.getCity(), district.getRegion(), district.getName(), room, -12); -// Map trendsMap = districtStatRentService.getRentTrend(district.getCity(), district.getRegion(), district.getDistrictName(), -12); + // Map trendsMap = districtRoomSqmetreRentService.getRentTrends(district.getCity(), district.getRegion(), district.getName(), room, -12); + Map trendsMap = districtStatRentService.getRentTrend(district.getCity(), district.getRegion(), district.getDistrictName(), -12); if (MapUtils.isNotEmpty(trendsMap)) { Map distMap = (Map) trendsMap.get("distMap"); Map trendMap = (Map) distMap.get(String.valueOf(trendsMap.get("room"))); diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/CcbRentController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/CcbRentController.java index 6f3646ad6..2dd5ab077 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/CcbRentController.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/CcbRentController.java @@ -22,6 +22,7 @@ import com.fangjia.service.datastore.DistrictService; import com.fangjia.service.datastore.EvaluationService; import com.fangjia.service.datastore.HouseService; import com.fangjia.service.district.DistrictRoomSqmetreRentService; +import com.fangjia.service.district.DistrictStatRentService; import com.fangjia.service.district.RentDealPriceService; import com.fangjia.service.mongo.fangjia.FileService; import com.fangjia.service.mongo.fangjia.SeawaterService; @@ -67,6 +68,7 @@ public class CcbRentController { private DistrictService districtService; private SeawaterService seawaterService; + private DistrictStatRentService districtStatRentService; private DistrictRoomSqmetreRentService districtRoomSqmetreRentService; private EvaluationService evaluationService; private HouseService houseService; @@ -286,7 +288,8 @@ public class CcbRentController { } //½üһÄ껧ÐÍ×â½ð×ßÊÆ - Map trendsMap = districtRoomSqmetreRentService.getRentTrends(district.getCity(), district.getRegion(), district.getName(), room, -12); + //Map trendsMap = districtRoomSqmetreRentService.getRentTrends(district.getCity(), district.getRegion(), district.getName(), room, -12); + Map trendsMap = districtStatRentService.getRentTrend(district.getCity(), district.getRegion(), district.getDistrictName(), -12); if (MapUtils.isNotEmpty(trendsMap)) { Map distMap = (Map) trendsMap.get("distMap"); Map trendMap = (Map) distMap.get(String.valueOf(trendsMap.get("room"))); @@ -653,4 +656,8 @@ public class CcbRentController { public void setFileService(FileService fileService) { this.fileService = fileService; } + + public void setDistrictStatRentService(DistrictStatRentService districtStatRentService) { + this.districtStatRentService = districtStatRentService; + } } From 4246f72ed8f13036e78b111566daf8a8725ef959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E5=81=A5?= Date: Wed, 25 Aug 2021 18:12:03 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=AE=A4=E5=8F=B7=E8=BE=93=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controllers/weixin/CcbRentController.java | 23 +++++ .../src/main/webapp/ccbRent/detail.ftl | 10 +- .../src/main/webapp/ccbRent/downloadPage.ftl | 2 +- .../src/main/webapp/ccbRent/index.ftl | 92 +++++++++++-------- .../main/webapp/static/js/autoCompletion.js | 4 +- 5 files changed, 86 insertions(+), 45 deletions(-) diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/CcbRentController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/CcbRentController.java index 2dd5ab077..5961db2d8 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/CcbRentController.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/CcbRentController.java @@ -13,6 +13,7 @@ import com.fangjia.open.APIConstant; import com.fangjia.open.compatible.model.JsonModel; import com.fangjia.open.dto.DistrictHouseDtao; import com.fangjia.open.interceptors.AuthenticationBean; +import com.fangjia.open.model.AddesssMatchModel; import com.fangjia.open.model.BaseModel; import com.fangjia.open.model.weixin.EvaluationModel; import com.fangjia.open.model.weixin.PropertyEvaluationModel; @@ -91,6 +92,27 @@ public class CcbRentController { return result; } + public Object matchAction(AddesssMatchModel model) { + String result = null; + HttpRequest httpRequest = new HttpRequest(); + try { + Map headers = new HashMap(); + // &__refresh_cache=1 ˢлº´æ + String url = "http://open.fangjia.com/address/match?token=" + APIConstant.SUPER_USER_TOKEN; + Map params = org.apache.commons.beanutils.BeanUtils.describe(model); + result = httpRequest.post(url, params, headers,"UTF-8"); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + } catch (HttpRequestException e) { + e.printStackTrace(); + } catch (InvocationTargetException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + return result; + } + public Object evaluateRentAction(com.fangjia.open.model.PropertyEvaluationModel model, HttpServletRequest request)throws NumberFormatException, IllegalAccessException { String result = null; HttpRequest httpRequest = new HttpRequest(); @@ -191,6 +213,7 @@ public class CcbRentController { districtPriceMap.put("fitment", evaluation.getFitment()); districtPriceMap.put("buildYear",district.getFinishBuildingDate()); districtPriceMap.put("hasLift",hasLift); + districtPriceMap.put("room", room); Integer startPrice = (int)(evaluation.getTotalPrice() - evaluation.getTotalPrice()*0.2); Integer endPrice = (int)(evaluation.getTotalPrice() + evaluation.getTotalPrice()*0.2); diff --git a/projects/fangjia-open/src/main/webapp/ccbRent/detail.ftl b/projects/fangjia-open/src/main/webapp/ccbRent/detail.ftl index a3d233ead..a122c9506 100644 --- a/projects/fangjia-open/src/main/webapp/ccbRent/detail.ftl +++ b/projects/fangjia-open/src/main/webapp/ccbRent/detail.ftl @@ -99,7 +99,7 @@
详细地址:
楼盘名称:
- 室号:
+ 室号:
朝向:
建筑面积:平米
所在楼层: 层(共层)
@@ -205,7 +205,7 @@ $("#download").css('color', 'blue') let chartImgUrl = $('#chartImgUrl').val(); window.location.href = "download?city="+params.city+"&district="+params.district+"&name="+params.name+"&address="+params.address+"&size="+params.size+"&floor="+params.floor - +"&height="+params.height+"&room="+params.room+"&hall="+params.hall+"&toilet="+params.toilet+"&direction="+params.direction+"&fitment="+params.fitment+"&chartImgUrl=" + chartImgUrl + "&hasLift=" + (params.hasLift == 'true' ? '有' : '无'); + +"&height="+params.height+"&room="+params.roomNumber+"&hall="+params.hall+"&toilet="+params.toilet+"&direction="+params.direction+"&fitment="+params.fitment+"&chartImgUrl=" + chartImgUrl + "&hasLift=" + (params.hasLift == 'true' ? '有' : '无'); }); // 后台传参过来用 @@ -222,11 +222,13 @@ 'toilet': sessionStorage.toilet, 'direction': sessionStorage.direction, 'fitment': sessionStorage.fitment, - 'hasLift': sessionStorage.hasLift + 'hasLift': sessionStorage.hasLift, + 'roomNumber': sessionStorage.roomNumber }; function init() { $('span[name="hasLift"]').text(params.hasLift == 'true' ? '有' : '无') + $('span[name="roomNumber"]').text(params.roomNumber != '' ? params.roomNumber + '室' : '') $.ajax({ // 注意需要加.. @@ -246,7 +248,7 @@ $('span[name="totalPriceUpper"]').text(result.totalPriceUpper) // 房产状况 - $('span[name="room"]').text(result.room) + //$('span[name="room"]').text(result.room) $('span[name="floor"]').text(result.floor) $('span[name="buildYear"]').text(result.buildYear) $('span[name="direction"]').text(result.direction) diff --git a/projects/fangjia-open/src/main/webapp/ccbRent/downloadPage.ftl b/projects/fangjia-open/src/main/webapp/ccbRent/downloadPage.ftl index 9bf596886..6303c82f4 100644 --- a/projects/fangjia-open/src/main/webapp/ccbRent/downloadPage.ftl +++ b/projects/fangjia-open/src/main/webapp/ccbRent/downloadPage.ftl @@ -54,7 +54,7 @@ 室号 - <#if result.room??>${result.room} + <#if result.room??>${result.room + '室'} 朝向 <#if result.direction??>${result.direction} diff --git a/projects/fangjia-open/src/main/webapp/ccbRent/index.ftl b/projects/fangjia-open/src/main/webapp/ccbRent/index.ftl index 4c8927943..5f4a59fce 100644 --- a/projects/fangjia-open/src/main/webapp/ccbRent/index.ftl +++ b/projects/fangjia-open/src/main/webapp/ccbRent/index.ftl @@ -40,8 +40,9 @@
地址:
- - + + +
@@ -166,6 +167,7 @@ sessionStorage.district = $('input[name="district"]').val() sessionStorage.address = $('input[name="address"]').val() sessionStorage.size = $('input[name="size"]').val() + sessionStorage.roomNumber = $('input[name="roomNumber"]').val() sessionStorage.room = $('input[name="room"]').val() sessionStorage.hall = $('input[name="hall"]').val() sessionStorage.toilet = $('input[name="toilet"]').val() @@ -222,11 +224,11 @@ var fieldVal = $.trim(input.val()) if (input.attr("required") && fieldVal == "") { if (input.attr("name").indexOf("district") != -1) { - $.toast("请选择输入地址时提示的小区") + } else { $.toast(fieldName + "不能为空"); + return } - return } if (input.attr("type") == 'number' && fieldVal != "") { if (input.attr("name").indexOf("size") != -1) { @@ -253,7 +255,6 @@ $.toast("楼层不能大于楼高"); return } - storeSession() if($("#houseHight").val() && parseFloat($("#houseHight").val())>=60){ $.toast("请输入合理的楼层数"); @@ -262,42 +263,31 @@ $("#evaluateBtn").prop("disabled", true) // 用户输入可能为地址,需要匹配,在估价 - // let city = $('input[name="city"]').val() - // let address = $('input[name="address"]').val() - // - // $.ajax({ - // // 注意需要加.. - // url: '../address/match', - // data: {'city': city, 'address': address}, - // dataType: "json", - // type: "post", - // success: function (data) { - // debugger - // if (data.code == 200) { - // - // } - // } - // }) + let city = $('input[name="city"]').val() + let address = $('input[name="address"]').val() - $.ajax({ - // 注意需要加.. - url: '../ccbRent/evaluateRent', - data:$("#evaluateForm").serialize(), - dataType:"json", - type:"post", - success:function(data){ - if(data.code == 200){ - window.location.href = "report?address=" + data.result.address + "&totalPrice=" + data.result.totalPrice - }else{ - $.toast("估价失败,请重新评估"); - $("#evaluateBtn").prop("disabled", false) + if ($('input[name="district"]').val() == '') { + $.ajax({ + // 注意需要加.. + url: '../ccbRent/match', + data: {'city': city, 'address': address}, + dataType: "json", + type: "post", + success: function (data) { + if (data.code == 200) { + let result = data.result + $('input[name="name"]').val(result.name) + $('input[name="district"]').val(result.district) + $('input[name="roomNumber"]').val(result.searchAddress.orgRoomNumber) + evaluateRent() + } else { + $.toast("估价失败,暂不支持该小区估价"); + } } - }, - error: function () { - //$.toast("服务器异常,请重新评估"); - $("#evaluateBtn").prop("disabled", false) - } - }) + }) + } else { + evaluateRent() + } }) // 选择操作-房型-室 $(document).on('click', '.create-actions01-now', function () { @@ -326,6 +316,30 @@ $.actions(groups); }); + let evaluateRent = function() { + $.ajax({ + // 注意需要加.. + url: '../ccbRent/evaluateRent', + data:$("#evaluateForm").serialize(), + dataType:"json", + type:"post", + success:function(data){ + if(data.code == 200){ + let name = $('input[name="name"]').val() + let roomNumber = $('input[name="roomNumber"]').val() + window.location.href = "report?address=" + data.result.address + "&totalPrice=" + data.result.totalPrice + storeSession() + }else{ + $.toast("估价失败,请重新评估"); + $("#evaluateBtn").prop("disabled", false) + } + }, + error: function () { + //$.toast("服务器异常,请重新评估"); + $("#evaluateBtn").prop("disabled", false) + } + }) + } // 选择操作-装修情况 $(document).on('click', '.create-actions05-now', function () { diff --git a/projects/fangjia-open/src/main/webapp/static/js/autoCompletion.js b/projects/fangjia-open/src/main/webapp/static/js/autoCompletion.js index fb00849df..28f9d9968 100644 --- a/projects/fangjia-open/src/main/webapp/static/js/autoCompletion.js +++ b/projects/fangjia-open/src/main/webapp/static/js/autoCompletion.js @@ -28,6 +28,8 @@ $(function () { success: function (data) { if(data && data.length == 0){ if ($("#t").val() == "c") { + $('input[name="name"]').val('') + $('input[name="district"]').val('') $("#searchSpan ul").empty() return ; } else { @@ -56,7 +58,7 @@ $(function () { location.href = "districtDetail?id=" + id+"&city="+city } else if ($("#t").val() == "c") { $('#districtSearch').val(name) - $('input[name="address"]').val(addr) + $('input[name="name"]').val(name) $('input[name="district"]').val(region) $("#searchSpan ul").empty() } else { From 7b5261d533386c4ac1fb02228248cc2024fe05fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E5=81=A5?= Date: Thu, 26 Aug 2021 10:26:42 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AF=A6=E7=BB=86?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../open/controllers/weixin/CcbRentController.java | 7 ++++--- projects/fangjia-open/src/main/webapp/ccbRent/detail.ftl | 8 +++++--- .../fangjia-open/src/main/webapp/ccbRent/downloadPage.ftl | 2 +- projects/fangjia-open/src/main/webapp/ccbRent/index.ftl | 1 + 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/CcbRentController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/CcbRentController.java index 5961db2d8..ae7b0e7ec 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/CcbRentController.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/CcbRentController.java @@ -133,7 +133,7 @@ public class CcbRentController { } public Object downloadPageAction(PropertyEvaluationModel result, HttpServletRequest request, @Param(name = "city") String city, @Param(name = "district") String districtStr, - @Param(name = "name") String name, @Param(name = "address") String address, + @Param(name = "name") String name, @Param(name = "address") String address, @Param(name = "addressDetail") String addressDetail, @Param(name = "size") Double size, @Param(name = "floor") Integer floor, @Param(name = "height") Integer height, @Param(name = "room") Integer room, @Param(name = "hall") Integer hall, @Param(name = "toilet") Integer toilet, @Param(name = "direction") String direction, @Param(name = "fitment") String fitment, @Param(name = "hasLift") String hasLift, @Param(name = "chartImgUrl") String chartImgUrl) { com.fangjia.open.model.PropertyEvaluationModel model = new com.fangjia.open.model.PropertyEvaluationModel(); @@ -214,6 +214,7 @@ public class CcbRentController { districtPriceMap.put("buildYear",district.getFinishBuildingDate()); districtPriceMap.put("hasLift",hasLift); districtPriceMap.put("room", room); + districtPriceMap.put("addressDetail", addressDetail); Integer startPrice = (int)(evaluation.getTotalPrice() - evaluation.getTotalPrice()*0.2); Integer endPrice = (int)(evaluation.getTotalPrice() + evaluation.getTotalPrice()*0.2); @@ -525,7 +526,7 @@ public class CcbRentController { } public void downloadAction(HttpServletResponse response, HttpServletRequest request, @Param(name = "city") String city, @Param(name = "district") String district, - @Param(name = "name") String name, @Param(name = "address") String address, + @Param(name = "name") String name, @Param(name = "address") String address, @Param(name = "addressDetail") String addressDetail, @Param(name = "size") Double size, @Param(name = "floor") Integer floor, @Param(name = "height") Integer height, @Param(name = "room") Integer room, @Param(name = "hall") Integer hall, @Param(name = "toilet") Integer toilet, @Param(name = "direction") String direction, @Param(name = "fitment") String fitment, @Param(name = "hasLift") String hasLift, @Param(name = "chartImgUrl") String chartImgUrl) throws IOException { response.setHeader("Content-disposition", "attachment; filename=" + URLEncoder.encode("×â½ð¹Àֵ±¨¸æ", "UTF-8") + ".pdf"); @@ -540,7 +541,7 @@ public class CcbRentController { fontResolver.addFont(fontUrl, BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED); final String path = "http://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath(); String url = path + "/ccbRent/downloadPage?city=" + DataUtil.urlEncode(city) + "&district="+DataUtil.urlEncode(district)+"&name="+DataUtil.urlEncode(name); - url += "&address=" + DataUtil.urlEncode(address) +"&size="+size+"&floor="+floor+"&height="+height+"&room="+room+"&hall="+hall+"&toilet="+toilet+"&direction="+direction+"&fitment="+fitment+"&chartImgUrl="+chartImgUrl + "&hasLift=" + DataUtil.urlEncode(hasLift); + url += "&address=" + DataUtil.urlEncode(address) + "&addressDetail=" + DataUtil.urlEncode(addressDetail) +"&size="+size+"&floor="+floor+"&height="+height+"&room="+room+"&hall="+hall+"&toilet="+toilet+"&direction="+direction+"&fitment="+fitment+"&chartImgUrl="+chartImgUrl + "&hasLift=" + DataUtil.urlEncode(hasLift); renderer.setDocument(url); renderer.layout(); renderer.createPDF(os, true); diff --git a/projects/fangjia-open/src/main/webapp/ccbRent/detail.ftl b/projects/fangjia-open/src/main/webapp/ccbRent/detail.ftl index a122c9506..1f13a034f 100644 --- a/projects/fangjia-open/src/main/webapp/ccbRent/detail.ftl +++ b/projects/fangjia-open/src/main/webapp/ccbRent/detail.ftl @@ -97,7 +97,7 @@
4 房产状况
- 详细地址:
+ 详细地址:
楼盘名称:
室号:
朝向:
@@ -204,7 +204,7 @@ $.toast("报告下载中,请耐心等待"); $("#download").css('color', 'blue') let chartImgUrl = $('#chartImgUrl').val(); - window.location.href = "download?city="+params.city+"&district="+params.district+"&name="+params.name+"&address="+params.address+"&size="+params.size+"&floor="+params.floor + window.location.href = "download?city="+params.city+"&district="+params.district+"&name="+params.name+"&address="+params.address+"&addressDetail="+params.addressDetail+"&size="+params.size+"&floor="+params.floor +"&height="+params.height+"&room="+params.roomNumber+"&hall="+params.hall+"&toilet="+params.toilet+"&direction="+params.direction+"&fitment="+params.fitment+"&chartImgUrl=" + chartImgUrl + "&hasLift=" + (params.hasLift == 'true' ? '有' : '无'); }); @@ -223,7 +223,8 @@ 'direction': sessionStorage.direction, 'fitment': sessionStorage.fitment, 'hasLift': sessionStorage.hasLift, - 'roomNumber': sessionStorage.roomNumber + 'roomNumber': sessionStorage.roomNumber, + 'addressDetail': sessionStorage.addressDetail }; function init() { @@ -244,6 +245,7 @@ $('span[name="cal_date"]').text(result.cal_date) $('span[name="name"]').text(result.name); $('span[name="address"]').text(result.address); + $('span[name="addressDetail"]').text(params.addressDetail); $('span[name="totalPrice"]').text(result.totalPrice) $('span[name="totalPriceUpper"]').text(result.totalPriceUpper) diff --git a/projects/fangjia-open/src/main/webapp/ccbRent/downloadPage.ftl b/projects/fangjia-open/src/main/webapp/ccbRent/downloadPage.ftl index 6303c82f4..6584823f1 100644 --- a/projects/fangjia-open/src/main/webapp/ccbRent/downloadPage.ftl +++ b/projects/fangjia-open/src/main/webapp/ccbRent/downloadPage.ftl @@ -50,7 +50,7 @@ 楼盘名称 <#if result.name??>${result.name} 地址 - <#if result.address??>${result.address} + <#if result.addressDetail??>${result.addressDetail} 室号 diff --git a/projects/fangjia-open/src/main/webapp/ccbRent/index.ftl b/projects/fangjia-open/src/main/webapp/ccbRent/index.ftl index 5f4a59fce..7255e20f4 100644 --- a/projects/fangjia-open/src/main/webapp/ccbRent/index.ftl +++ b/projects/fangjia-open/src/main/webapp/ccbRent/index.ftl @@ -166,6 +166,7 @@ sessionStorage.name = $('input[name="name"]').val() sessionStorage.district = $('input[name="district"]').val() sessionStorage.address = $('input[name="address"]').val() + sessionStorage.addressDetail = $('input[name="address"]').val() sessionStorage.size = $('input[name="size"]').val() sessionStorage.roomNumber = $('input[name="roomNumber"]').val() sessionStorage.room = $('input[name="room"]').val() From 3b1bed076d215d444c72e6c211b2cea1f1955173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E5=81=A5?= Date: Thu, 26 Aug 2021 10:48:12 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=95=88?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E9=97=B4=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/webapp/ccbRent/detail.ftl | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/projects/fangjia-open/src/main/webapp/ccbRent/detail.ftl b/projects/fangjia-open/src/main/webapp/ccbRent/detail.ftl index 1f13a034f..247c71fc3 100644 --- a/projects/fangjia-open/src/main/webapp/ccbRent/detail.ftl +++ b/projects/fangjia-open/src/main/webapp/ccbRent/detail.ftl @@ -228,6 +228,15 @@ }; function init() { + // let charts = {} + // charts.xData = ["2020-08", "2020-09", "2020-10", "2020-11", "2020-12", "2021-01", "2021-02", "2021-03", "2021-04", "2021-05", "2021-06", "2021-07"] + // charts.series = [{ + // name: '1居室', + // data: [3800, 3900, 4000, 4100, 4200, 4200, 4200, 4200] + // }]; + // createChartNow('districtRentTrendsChart', charts, true); + // return false; + $('span[name="hasLift"]').text(params.hasLift == 'true' ? '有' : '无') $('span[name="roomNumber"]').text(params.roomNumber != '' ? params.roomNumber + '室' : '') @@ -277,10 +286,6 @@ let result = data.result; //历史租金 var charts = {} - // charts.series = [{ - // name: '1居室', - // data: [3800, 3900, 4000, 4100, 4200, 4200, 4200, 4200] - // }]; if (result.trends.distMap[params.room] == undefined) { console.log("返回历史租金,不存在" + params.room + "居室数据") $('#districtRentTrendsChart').empty(); @@ -464,11 +469,7 @@ series: data.series, tooltip: { formatter: function() { - if(this.series.name.indexOf('成交量') > -1) { - return Highcharts.dateFormat('%Y年%m月', this.x) +" 成交: "+ this.y +'套'; - }else { - return Highcharts.dateFormat('%Y-%m-%d', this.x) +'
'+ this.series.name+ ": "+ this.y +'元/平米'; - } + return this.x +'
'+ this.series.name+ ": "+ this.y +'元/平米'; } } });