手机端新增底部按钮,咨询页样式修改,爬虫抓取小区列表页修改

This commit is contained in:
2023-05-05 15:50:58 +08:00
parent fbf389695d
commit 9041a29f8a
12 changed files with 189 additions and 70 deletions
@@ -1,5 +1,6 @@
package com.fangjia.coresite.controllers;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
@@ -18,6 +19,8 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import com.fangjia.core.util.*;
import com.fangjia.dal.QueryParam;
import com.fangjia.service.datastore.*;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
@@ -69,12 +72,6 @@ import com.fangjia.service.bo.HouseBo;
import com.fangjia.service.bo.NewsBo;
import com.fangjia.service.bo.RentHouseBo;
import com.fangjia.service.common.CookieName;
import com.fangjia.service.datastore.DistrictService;
import com.fangjia.service.datastore.HouseService;
import com.fangjia.service.datastore.MicroBlogService;
import com.fangjia.service.datastore.PicService;
import com.fangjia.service.datastore.RegionStatService;
import com.fangjia.service.datastore.RentHouseService;
import com.fangjia.service.datastore.bean.DistrictQueryBean;
import com.fangjia.service.datastore.bean.HousePriceQueryBean;
import com.fangjia.service.datastore.bean.HouseQueryBean;
@@ -405,6 +402,19 @@ public class DistrictController {
feedFooter(model);
return model;*/
}
public Object hidelistAction(HttpServletRequest request,DistrictModel model) throws Exception {
if(StringUtils.isNotBlank(model.getCityName())){
List<QueryParam> params = new ArrayList<QueryParam>();
params.add(new QueryParam("visible", 0));
params.add(new QueryParam("city", model.getCityName()));
params.add(new QueryParam("category", "district"));
List<District> districts = districtService.findAllByParams(params, 0, 0,new String[]{"city", "region", "name"});
model.setDistricts(districts);
CacheUtils.putValue(CacheUtils.CachePolicyEnum.NEXT_MONTH, this.getClass(), "district-hide-list-crawl-"+model.getCityName(), (Serializable) districts);
}
return model;
}
/**
* 底部热门推荐
@@ -138,6 +138,7 @@ public class DistrictModel extends BaseModel {
private int picOrder;
private String bigPicUrl;
private int allPicCount;
private List<District> districts;
public boolean isHousePriceInfo() {
return housePriceInfo;
@@ -779,4 +780,11 @@ public class DistrictModel extends BaseModel {
this.districtStatBo = districtStatBo;
}
public List<District> getDistricts() {
return districts;
}
public void setDistricts(List<District> districts) {
this.districts = districts;
}
}
@@ -28,6 +28,7 @@
@media(max-device-width:414px){
.main{padding-top:0;}
}
</style>
</head>
@@ -133,7 +134,7 @@
<p class="office01 current"><i></i><a>上海</a></p>
<p>电 话: 4001883787(周一至周五 09:00-18:00)<br>
邮 箱: gujia@fangjia.com<br>
地 址: 上海市黄浦区江宁路212号凯迪克大厦1709<br>
地 址: 上海市静安区江宁路212号凯迪克大厦1709<br>
邮 编: 200003</p>
</div>
<div>
@@ -200,6 +201,8 @@
</div>
</div>
<#include "/header/v5/_footer.ftl"/>
<script src="${staticUrl}/js/fangjia/v5/main.js?v=${version}"></script>
@@ -238,7 +241,7 @@ $(document).ready(function(){
map.enableScrollWheelZoom();
var content = '<div>' +
'地址:上海市黄浦区江宁路212号凯迪克大厦1709' +
'地址:上海市静安区江宁路212号凯迪克大厦1709' +
'</div>';
//创建检索信息窗口对象
@@ -271,7 +274,7 @@ $(document).ready(function(){
map.enableScrollWheelZoom();
var content = '<div>' +
'地址:上海市黄浦区江宁路212号凯迪克大厦1709' +
'地址:上海市静安区江宁路212号凯迪克大厦1709' +
'</div>';
//创建检索信息窗口对象
@@ -0,0 +1,21 @@
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
<#compress>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<#include "../jsconstants.ftl" />
<link rel="stylesheet" type="text/css" href="${staticUrl}/style/fangjia/fj_district_list.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="${staticUrl}/style/fangjia/base.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="${staticUrl}/style/fangjia/fj_friend_link.css?v=${version}" />
</head>
<body>
<div>
<#list districts! as dist>
<a href="${cityUrl}/zoushi?cityName=${dist.city}&districtName=${dist.name!''}&region=${dist.region!''}">${dist.name!}</a>
</#list>
</div><!--end mainwrap-->
<#include "/analytics.ftl" />
</body>
</html>
</#compress>
@@ -99,6 +99,21 @@
</div>
</div>
<div class="newblank mobile02">&nbsp;</div>
<div class="newfooter mobile02">
<div class="newfooter-li" >
<a data_id="1036" cat="businessAsk" title="业务咨询" target="_blank" class="fu-btn">
业务咨询
</a>
</div>
<div class="newfooter-li">
<a href="tel:15021384995" class="fu-btn">
电话咨询
</a>
</div>
</div>
<#include "contact.ftl"/>
<div class="mask dn"></div>
@@ -18,8 +18,11 @@
.inputInfoBox01 .inputInfo label.label01a{margin-top:10px;}
</style>
<script>
var model = "mobile01"
if((navigator.userAgent.match(/(iPad|iPhone|iPod|Android|ios)/i))){
model = "mobile02"
document.write("<link href='${staticUrl}/style/fangjia/v5/sm.css?v=${version}' rel='stylesheet'>");
document.write("<link href='${staticUrl}/style/fangjia/v5/main-m.css?v=${version}' rel='stylesheet'>");
document.write("<link href='${staticUrl}/style/fangjia/v5/city-m.css?v=${version}' rel='stylesheet'>");
@@ -29,47 +32,48 @@
</script>
<style>
@media(max-device-width:768px){
.main{padding-top:0;}
.main_left{display:none;}
.main_right{float:none;width:100%;}
.user{width:100%;margin-top:6rem;}
.user02{margin-left:0;}
.title{text-align:center;position:static;}
.title p{margin:1rem;}
.content{padding:0 1rem;padding-top:2rem;}
.content03 .inputInfoBox{overflow:visible;}
.inputInfoBox01{float:none;}
.inputInfoBox01 .inputInfo{width:100%;height:40px;margin-bottom:20px;clear:both;}
.inputInfoBox01 .inputInfo label{float:left;line-height:40px;}
.inputInfoBox01 .inputInfo label.label01{float:left;line-height:20px;width:66px;}
.inputInfoBox01 .inputInfo label.label01a{clear:both;margin-bottom:17px;margin-top:17px;}
.inputInfoBox01 .inputInfo label i{margin-left:5px;}
.inputInfoBox01a{margin-right:0;}
.inpu,.sel{height:40px;line-height:40px;}
.inpu,.sel,.demand{width:89.5%;float:right;}
.dialogBox .inpu{float:left;}
.inpu01{width:70%;}
.inpu02a{margin-top:17px;}
#selectedCity{width:auto;}
.error01{top:-17px;left:78px;}
.user_btn,.line{width:100%;}
.footerM{display:none;}
}
@media(max-device-width:414px){
.inpu,.sel,.demand{width:79.5%;}
.inpu01{width:45%;}
}
@media(max-device-width:375px){
.inpu,.sel,.demand{width:77%;}
.inpu01{width:40%;}
}
@media(max-device-width:320px){
.inpu,.sel,.demand{width:73%;}
.inpu01{width:30%;}
.demand p span{width:80%;}
}
.codeImg1{float: right;width: 72;height: 40; margin-left: 19px;}
/*@media(max-device-width:768px){*/
/* .main{padding-top:0;}*/
/* .main_left{display:none;}*/
/* .main_right{float:none;width:100%;}*/
/* .user{width:100%;margin-top:6rem;}*/
/* .user02{margin-left:0;}*/
/* .title{text-align:center;position:static;}*/
/* .title p{margin:1rem;}*/
/* .content{padding:0 1rem;padding-top:2rem;}*/
/* .content03 .inputInfoBox{overflow:visible;}*/
/* .inputInfoBox01{float:none;}*/
/* .inputInfoBox01 .inputInfo{width:100%;height:40px;margin-bottom:20px;clear:both;}*/
/* .inputInfoBox01 .inputInfo label{float:left;line-height:40px;}*/
/* .inputInfoBox01 .inputInfo label.label01{float:left;line-height:20px;width:66px;}*/
/* .inputInfoBox01 .inputInfo label.label01a{clear:both;margin-bottom:17px;margin-top:17px;}*/
/* .inputInfoBox01 .inputInfo label i{margin-left:5px;}*/
/* .inputInfoBox01a{margin-right:0;}*/
/* .inpu,.sel{height:40px;line-height:40px;}*/
/* .inpu,.sel,.demand{width:89.5%;float:right;}*/
/* .dialogBox .inpu{float:left;}*/
/* .inpu01{width:70%;}*/
/* .inpu02a{margin-top:17px;}*/
/* #selectedCity{width:auto;}*/
/* .error01{top:-17px;left:78px;}*/
/* .user_btn,.line{width:100%;}*/
/* .footerM{display:none;}*/
/*}*/
/*@media(max-device-width:414px){*/
/* .inpu,.sel,.demand{width:79.5%;}*/
/* .inpu01{width:45%;}*/
/*}*/
/*@media(max-device-width:375px){*/
/* !*.inpu,.sel,.demand{width:77%;}*!*/
/* .inpu01{width:40%;}*/
/* .inpu03{width:45%;}*/
/*}*/
/*@media(max-device-width:320px){*/
/* .inpu,.sel,.demand{width:73%;}*/
/* .inpu01{width:30%;}*/
/* .demand p span{width:80%;}*/
/*}*/
.codeImg1{float: right;width: 72;height: 40; margin-left: 10px;}
</style>
</head>
@@ -238,28 +242,47 @@
<div class="inputInfo">
<label>图形码<i>*</i></label>
<input class="inpu inpu02" type="text" name="code" id="image_input_code" autocomplete="off" placeholder="请输入图形验证码" style="width: 120px;">
<a class="refresh">&nbsp;&nbsp;刷新</a>
<input class="inpu inpu03" type="text" name="code" id="image_input_code" autocomplete="off" placeholder="请输入图形验证码">
<a class="refresh mr">&nbsp;&nbsp;刷新</a>
<div class="codeImg1"></div>
<div class="error error01 dn"><i></i><span></span></div>
</div>
<div class="inputInfo">
<label>短信码<i>*</i></label>
<input id="smsCodeInput" class="inpu inpu01" type="text" autocomplete="off" placeholder="请输入短信验证码" style="width: 120px;">
<a class="change_btn sendCode_before" id="sendCode" style="width: 118px;">发送验证码</a>
<input id="smsCodeInput" class="inpu inpu03" type="text" autocomplete="off" placeholder="请输入短信验证码" >
<a class="change_btn waiting dn">60s</a>
<div class="error error01 dn"><i></i><span></span></div>
</div>
<div class="inputInfo" style="margin-top: 50px;">
<#-- <div class="inputInfo mobile02">-->
<#-- <label>图形码<i>*</i></label>-->
<#-- <input class="inpu inpu02" type="text" name="code" id="image_input_code" autocomplete="off" placeholder="请输入图形验证码" style="width: 120px;float: left; margin-left: 27px;">-->
<#-- <a class="refresh">&nbsp;&nbsp;刷新</a>-->
<#-- <div class="codeImg1"></div>-->
<#-- <div class="error error01 dn"><i></i><span></span></div>-->
<#-- </div>-->
<#-- <div class="inputInfo mobile02">-->
<#-- <label>短信码<i>*</i></label>-->
<#-- <input id="smsCodeInput" class="inpu inpu01" type="text" autocomplete="off" placeholder="请输入短信验证码" style="width: 120px;float: left; margin-left: 27px;">-->
<#-- <a class="change_btn sendCode_before" id="sendCode1" style="width: 118px; touch-action: none;">发送验证码</a>-->
<#-- <a class="change_btn waiting dn">60s</a>-->
<#-- <div class="error error01 dn"><i></i><span></span></div>-->
<#-- </div>-->
<div class="inputInfo textareTop">
<label>咨询内容(选填)</label>
<textarea id="remarks" class="inpu inpu02" name="saleLeads.remarks" rows="5" style="height: 120px;"></textarea>
<textarea id="remarks" class="inpu inpu02" name="saleLeads.remarks" rows="5" style="height: 60px;"></textarea>
</div>
</div>
<input style="display:none" type="text" id="emailStatus" name="saleLeads.emailStatus"/>
<#-- <input style="display:none" type="text" id="emailStatus" name="saleLeads.emailStatus"/>-->
</div>
<a class="user_btn" >提交</a>
<a class="user_btn mobile01" >提交</a>
</form>
</div>
</div>
@@ -267,9 +290,9 @@
</div>
<#include "/header/v5/_footer.ftl" />
<#include "../citys.ftl"/>
<style>
.mr{margin-right: 20px;}
@media(max-device-width:768px){
.main{padding-top:0;}
.main_left{display:none;}
@@ -296,20 +319,34 @@
.error01{top:-17px;left:78px;}
.user_btn,.line{width:100%;}
.footerM{display:none;}
}
@media(max-device-width:414px){
.inpu,.sel,.demand{width:79.5%;}
.inpu01{width:45%;}
.textareTop{margin-top: 10px;}
.inpu03{width:140px;margin-left: 27px;}
}
@media(max-device-width:375px){
.inpu,.sel,.demand{width:77%;}
.inpu01{width:40%;}
.inpu03{width:120px;margin-left: 27px;}
.textareTop{margin-top: 10px;}
}
@media(max-device-width:320px){
.inpu,.sel,.demand{width:73%;}
.inpu01{width:30%;}
.demand p span{width:80%;}
}
.inpu03{width:120px;float: none;}
.change_btn {margin-right: 25px;}
@media(max-device-width:360px){
.inpu03{width:118px;margin-left: 24px;float: none;}
.textareTop{margin-top: 10px;}
.change_btn {margin-right: 10px;}
.mr{margin-right: 10px;}
}
</style>
<script>
@@ -333,6 +370,8 @@
<script src="${staticUrl}/js/fangjia/v5/cn.js?v=${version}"></script>
<script>
$(".newblank").hide()
$(".newfooter").hide()
var controllerName = '${controllerName}';
var mid = '${mid!}'
var guid = function() {
@@ -493,7 +532,7 @@
}
$("#sendCode").click(function() {
$("#sendCode1").click(function() {
if(!checkImgCode($("#image_input_code").val())){
scrollTo(0,0);
@@ -161,7 +161,7 @@
<div class="seo_keyword_content">
<ul>
<#list districtList as district>
<li><a href="<@d_url schema="${citySchema}" uri="/district/show" ><@d_param name="districtName" value="${district.name!}" /><@d_param name="region" value="${district.region!}" /></@d_url>" class="frbtn cur">${district.name}</a></li>
<li><a href="${cityUrl}/zoushi?cityName=${district.city}&districtName=${district.name!''}&region=${district.region!''}">${district.name!}</a></li>
</#list>
</ul>
</div>
@@ -186,14 +186,14 @@
</ul>
<ul class="chartTools">
<#if keyword??>
<li class="<#if type?? && (type=='4' || type=='quarter')>current</#if>"><a href="<@d_url schema="${citySchema}" uri="/zoushi"><@d_param name="keyword" value="${keyword!}" /><@d_param name="type" value="4" /></@d_url>">季度</a></li>
<li class="<#if !type?? || (type=='4' || type=='quarter')>current</#if>"><a href="<@d_url schema="${citySchema}" uri="/zoushi"><@d_param name="keyword" value="${keyword!}" /><@d_param name="type" value="4" /></@d_url>">季度</a></li>
<li class="<#if type?? && (type=='3' || type=='half')>current</#if>"><a href="<@d_url schema="${citySchema}" uri="/zoushi"><@d_param name="keyword" value="${keyword!}" /><@d_param name="type" value="3" /></@d_url>">半年</a></li>
<li class="<#if !type?? || (type=='2' || type=='year')>current</#if>"><a href="<@d_url schema="${citySchema}" uri="/zoushi"><@d_param name="keyword" value="${keyword!}" /><@d_param name="type" value="2" /></@d_url>">一年</a></li>
<li class="<#if type?? && (type=='2' || type=='year')>current</#if>"><a href="<@d_url schema="${citySchema}" uri="/zoushi"><@d_param name="keyword" value="${keyword!}" /><@d_param name="type" value="2" /></@d_url>">一年</a></li>
<li class="<#if type?? && (type=='1' || type=='year2')>current</#if>"><a href="<@d_url schema="${citySchema}" uri="/zoushi"><@d_param name="keyword" value="${keyword!}" /><@d_param name="type" value="1" /></@d_url>">两年</a></li>
<#else>
<li class="<#if type?? && (type=='4' || type=='quarter')>current</#if>"><a href="<@d_url schema="${citySchema}" uri="/zoushi"><@d_param name="region" value="${trendView.region!}" /><#if block??><@d_param name="block" value="${trendView.block!}" /></#if><@d_param name="districtName" value="${trendView.districtName!}" /><@d_param name="type" value="4" /></@d_url>">季度</a></li>
<li class="<#if !type?? || (type=='4' || type=='quarter')>current</#if>"><a href="<@d_url schema="${citySchema}" uri="/zoushi"><@d_param name="region" value="${trendView.region!}" /><#if block??><@d_param name="block" value="${trendView.block!}" /></#if><@d_param name="districtName" value="${trendView.districtName!}" /><@d_param name="type" value="4" /></@d_url>">季度</a></li>
<li class="<#if type?? && (type=='3' || type=='half')>current</#if>"><a href="<@d_url schema="${citySchema}" uri="/zoushi"><@d_param name="region" value="${trendView.region!}" /><#if block??><@d_param name="block" value="${trendView.block!}" /></#if><@d_param name="districtName" value="${trendView.districtName!}" /><@d_param name="type" value="3" /></@d_url>">半年</a></li>
<li class="<#if !type?? ||(type=='2' || type=='year')>current</#if>"><a href="<@d_url schema="${citySchema}" uri="/zoushi"><@d_param name="region" value="${trendView.region!}" /><#if block??><@d_param name="block" value="${trendView.block!}" /></#if><@d_param name="districtName" value="${trendView.districtName!}" /><@d_param name="type" value="2" /></@d_url>">一年</a></li>
<li class="<#if type?? && (type=='2' || type=='year')>current</#if>"><a href="<@d_url schema="${citySchema}" uri="/zoushi"><@d_param name="region" value="${trendView.region!}" /><#if block??><@d_param name="block" value="${trendView.block!}" /></#if><@d_param name="districtName" value="${trendView.districtName!}" /><@d_param name="type" value="2" /></@d_url>">一年</a></li>
<li class="<#if type?? && (type=='1' || type=='year2')>current</#if>"><a href="<@d_url schema="${citySchema}" uri="/zoushi"><@d_param name="region" value="${trendView.region!}" /><#if block??><@d_param name="block" value="${trendView.block!}" /></#if><@d_param name="districtName" value="${trendView.districtName!}" /><@d_param name="type" value="1" /></@d_url>">两年</a></li>
</#if>
@@ -295,9 +295,8 @@
</div>
</div>
</#if>
</div>
<#--<div class=""><h1><a href="${wwwUrl}/district/hidelist?cityName=${cityName!''}">楼盘列表</a></h1></div>-->
<div class="adBox">
<p><label>获取更多关于房产的数据</label></p>
<p><small>房价网可提供关于小区或地址的全面数据,包含城市小区数据库及楼栋数据库,<br>可提供超过70个字段的多维度数据,包含小区信息,房产信息,周边信息以及关于小区和房产的数据分析等信息。</small></p>
@@ -386,7 +385,7 @@ $(document).ready(function(){
</#if>
naver();
<#else>
var url = Constants.cityUrl + '/trend/yearData?defaultCityName=${cityName}&districtName=${districtName!}&region=${region!}&block=${block!}&keyword=${keyword!}';
var url = Constants.cityUrl + '/trend/quarterData?defaultCityName=${cityName}&districtName=${districtName!}&region=${region!}&block=${block!}&keyword=${keyword!}';
</#if>
$.getJSON(encodeURI(url), function(data) {
createChart('container', data, false);
@@ -41,7 +41,8 @@ public enum NewResourceRecommendEnum {
NET("1032", "网点布局"),
GOV("1034", "政府机构"),
BOND("1033", "证券"),
COST("1035", "消费金融");
COST("1035", "消费金融"),
ZIXUN_APP("1036", "业务咨询app");
NewResourceRecommendEnum(String id, String value) {
this.id = id;
@@ -37,7 +37,8 @@ public enum SalesLeadEnum {
NET("1032", "网点布局"),
GOV("1034", "政府机构"),
BOND("1033", "证券"),
COST("1035", "消费金融");
COST("1035", "消费金融"),
ZIXUN_APP("1036", "业务咨询app");
SalesLeadEnum(String id, String value) {
this.id = id;
@@ -214,6 +214,28 @@ select{appearance:none;-webkit-appearance:none;-moz-appearance:none;-ms-appearan
.fixedNav ul li div.fixedNav03 img{width:120px;height:120px;margin:0 auto;margin-top:5px;margin-bottom:10px;}
.fixedNav ul li div.fixedNav03 span{color:#fff;text-align:center;display:block;}
.newblank{width: 100%;height: 55px;float:left;display: none;}
.newfooter{display: none;}
@media screen and (max-width:750px){
.newblank{display: block;}
.newfooter{left:0px;z-index:999;width: 100%;height:55px;position: fixed;bottom: 0;display: block;}
.newfooter-li{width:50%;height:100%;float:left;padding-top: 5px; padding-left: 3px;}
.newfooter-li a{width: 48%;height: 80%;display: inline-block;}
.newfooter-li img{width: 100%;}
}
.fu-btn {
background: #f08300;
border-radius: 100px;
font-size: 16px;
line-height: 46px;
position: absolute;
color: #fff;
text-align: center;
}
/* 自适应 */
@media(max-width:1200px){
.header,.header01,.footer{width:1200px;}
@@ -36,7 +36,7 @@
.option > div.agreement span a:hover{color:#f08300;}
.option > div.agreement .error{left:0;}
.user_btn{width:420px;height:40px;background:#f08300;text-align:center;line-height:40px;color:#fff;display:block;cursor:pointer;margin-top: 20px;}
.user_btn{width:420px;height:40px;background:#f08300;text-align:center;line-height:40px;color:#fff;display:block;cursor:pointer;margin-top: 70px;}
.user_btn:hover{background:#df7900;}
.line{width:420px;height:1px;background:#e5e5e5;margin-top:40px;position:relative;}
.line span{position:absolute;top:-8px;left:50%;margin-left:-31px;display:block;background:#fff;padding:0 25px;font-size:12px;color:#999;}