生活随笔
收集整理的這篇文章主要介紹了
SSM项目-我爱我家(二)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
首頁
<!DOCTYPE html>
<html>
<head><meta charset="UTF-8"><title>首頁
</title><link type="text/css" rel="stylesheet" href="css/index.css" /><script src="js/jquery-1.8.3.js"></script></head>
<body>
<div id="d2"><div class="d2c2"><div class="d2c22"><iframe src="common/index_top.html" height="60px" width="1180px" scrolling="no" frameborder="0"></iframe></div><div class="d2c23"><div class="d2c232"></div><div class="d2c233"><div><img src="image/shouye/ind-banner-wz.png"/></div><div><ul><li>二
<span>手
</span>房
</li><li>租房
</li><li>小區
</li></ul></div><div><p><input type="text" name="search" id="font"/></p><p><a href="#" onclick="startSearch($('#font').val())" >開始找房
</a></p></div></div></div></div>
</div>
<div id="d3"><div><img src="image/shouye/two/zhuce.jpg"/><img src="image/shouye/two/goufang.jpg"/><img src="image/shouye/two/xinfang.jpg"/></div>
</div>
<div id="d4"><div></div>
</div>
<div id="d5"><div><p><img src="image/shouye/app/ind-mid-wz.png"/></p><div><ul><li><img src="image/shouye/app/iphone.png"></li><li><img src="image/shouye/app/android.png"></li></ul><p><img src="image/shouye/app/code-app.png"></p></div></div>
</div>
<div id="d6"><div class="d6c2"><i></i><h2>有好房
</h2></div><p>好房辣么多,總有一套適合你
</p><a href="">更多
<span></span></a>
</div>
<div id="d7"><ul><li><a href="#"><img src="image/shouye/six/gaishanshouxuan.jpg"/></a></li><li><a href="#">改善首選
</a></li><li><a href="#"><i></i>讓家更大更溫暖
</a></li></ul></div>
<div id="d8"><div class="d8c2"><ul><li>房產知識
</li><li>錦囊妙計
</li></ul><a href="#">更多
<i></i></a><div class="d8c22"><div><a href="#"><img src="image/shouye/seven/fangchanzhishi.jpg"/></a></div><div><h3><a href="#">定金和押金有什么區別?
</a></h3><p>很多朋友在租房過程中,常常會遇被一些專業術語搞糊涂,比如租房定金和租房押金是一回事嗎?有什么樣的區別...
</p></div><div><a href=""><img src="image/shouye/seven/jinnangmiaoji.jpg"/></a></div><div><h3><a href="#">錦囊妙計
</a></h3><p>租房時除了考量房屋本身的條件之外,對于小區的選擇也是非常重要的。如果住進條件不好的小區,可能生活配套...
</p></div></div></div>
</div>
<div id="d9"><div class="d6c2"><i></i><h2>新房頻道
</h2></div><p>以我之愛,筑您之家
</p><a href="">更多
<span></span></a>
</div>
<div id="d10"><div class="d10c2"><a href="#"><div><h3>蘇寧紫金嘉悅
</h3><p>20000元/平
</p></div></a><a href="#"><div><h3>中南樂尚街
</h3><p>14500元/平
</p></div></a><a href="#"><div><h3>紫荊名苑
</h3><p>25709元/平
</p></div></a></div><p><a href="#">玄武
仙鶴門商圈
35-55平米
公寓
</a></p><p><a href="#">棲霞
馬群
37-48平米
公寓
</a></p><p><a href="#">棲霞
和燕路
89-119平米
普通住宅
</a></p>
</div>
<div id="d11"><ul><li>友情鏈接
<span></span></li><li>熱門二手房
<span></span></li><li>熱門租房
<span></span></li><li>熱門小區
<span></span></li><li>熱門新房
<span></span></li><li>熱門房價
<span></span></li><li>熱門房產網
<span></span></li><li>房產百科
<span></span></li></ul><ul><li><a href="#">北京二手房網
</a></li><li><a href="#">天津二手房網
</a></li><li><a href="#">太原二手房網
</a></li><li><a href="#">上海二手房網
</a></li><li><a href="#">南京二手房網
</a></li><li><a href="#">杭州二手房網
</a></li><li><a href="#">蘇州二手房網
</a></li><li><a href="#">長沙二手房網
</a></li><li><a href="#">武漢二手房網
</a></li><li><a href="#">南寧二手房網
</a></li><li><a href="#">南京商業地產
</a></li><li><a href="#">南京購房
</a></li><li><a href="#">南京二手房價格
</a></li><li><a href="#">南京房產網
</a></li><li><a href="#">南京裝修
</a></li><li><a href="#">南京裝修
</a></li><li><a href="#">南京房地產
</a></li><li><a href="#">南京樓盤
</a></li><li><a href="#">南京二手房
</a></li><li><a href="#">南京天氣預報15天
</a></li><li><a href="#">南京二手房
</a></li><li><a href="#">成都房產
</a></li><li><a href="#">長沙房產網
</a></li><li><a href="#">集成灶
</a></li></ul>
</div>
<iframe src="common/root/publicRoot.html" width="100%" height="314px" frameborder="0px" scrolling="no"></iframe>
<aside><ul><li><a href="#"><i></i></a></li><li><a href="#"><i></i></a></li><li><a href="#"><i></i></a></li><li><a href="#"><i></i></a></li><li><a href="#"><i></i></a></li><li><a href="#"><i></i></a></li><li><a href="#"><i></i></a></li></ul>
</aside>
<article><span>咨詢經紀人
</span><i></i>
</article>
<script type="text/javascript">$(document).ready(function () {$.get("/getHavegoodhouse",function (data) {alert("進入d7的jQuery回調,集合是"+data);var str =""; $(data).each(function (i,item) {str+='<ul><li><a href="#"><img src="'+item.yhfinmgurl+'"/></a></li>'+'<li><a href="#">'+item.yhftitle+'</a></li>'+'<li><a href="#"><i></i>'+item.yhfsummary+'</a></li></ul>';});$("#d7").html(str);})});<!--d4的jQuery-->$(document).ready(function () {$.get("/getPicinfo",function (data) {var str =""; $(data).each(function (i,item) {str+='<a href="#"><ul><li><img src="'+item.twimgurl+'" height="90px" width="90px" /></li>'+'<li>'+item.twtitle+'</li>'+'<li>'+item.twsummary+'</li></ul></a>';});$("#d4 > div ").html(str);})});
</script></body>
</html>
——————————————————————————————————————————
二手房頁面,按條件查詢
<!DOCTYPE html>
<html>
<head><meta charset="UTF-8"><title>二手房首頁
</title><link type="text/css" rel="stylesheet" href="css/secondHandHouse.css"/><script src="js/jquery-1.8.3.js"></script></head>
<body style="overflow-x: hidden;">
<div id="d2"><iframe src="common/public_top.html" height="60px"width="100%" scrolling="no" frameborder="no"></iframe>
</div>
<div id="d3"><div class="d3c2"><p><span><a href="#">我愛我家南京
</a> </span>><span><a href="#">南京二手房
</a></span></p><p><input type="text" name="search" placeholder="區域、商圈、小區、地鐵應有盡有"/><input type="image" src="image/secondHouse/search.png"/></p></div>
</div>
<div id="d4"><div class="d4c2"><div class="d4c22"><p><a href="#">條件篩選
</a></p><p><a href="#">選房卡
</a></p></div><div class="d4c23"><div class="d4c232"><p>位置
</p><ul><li>區域
</li><li>地鐵
</li></ul></div><div class="d4c233"><dl id="district"><dt>全部
</dt></dl><dl id="totalpricesection"><dt>總價
</dt><dd><ul><li><input type="text" name="minarea"/></li><li>~
</li><li><input type="text" name="maxarea"/></li><li>㎡
</li><li><input type="button" value="確定"/></li></ul></dd></dl><dl id="totalareasection"><dt>面積
</dt><dd><ul><li><input type="text" name="minarea"/></li><li>~
</li><li><input type="text" name="maxarea"/></li><li>㎡
</li><li><input type="button" value="確定"/></li></ul></dd></dl><dl id="housetype"><dt>戶型
</dt></dl><dl id="houseuse"><dt>用途
</dt></dl><dl id="louceng"><dt>樓層
</dt></dl><dl id="chaoxiang"><dt>朝向
</dt></dl><dl id="louling"><dt>樓齡
</dt></dl><dl id="zhuangxiu"><dt>裝修
</dt></dl><dl id="biaoqian"><dt>標簽
</dt></dl></div><div class="d4c234"><img src="image/secondHouse/shouqi.png"/></div></div><div class="d4c24"><div class="d4c242">條件
</div><div class="d4c243" id="condition"></div><div class="d4c244"><img id="save" src="image/secondHouse/save.png"/><img id="delete" src="image/secondHouse/delete.png"/></div></div></div>
</div>
<div id="d5"><div class="d5c2"><div class="d5c22"><div class="d5c222"><ul><li>默認排序
</li><li>總價
</li><li>單價
</li><li>面積
</li><li>最新發布
</li></ul></div><div class="d5c223" id="totalCount"></div><div class="d5c224" id="houseList"></div><div class="d5c225"></div></div><div class="d5c23"><a href="#"><img src="image/secondHouse/map.png"/><span></span></a></div></div>
</div>
<div><iframe src="common/root/publicRoot.html" width="100%" height="314px" scrolling="no" frameborder="no"></iframe>
</div>
<script type="text/javascript">$(document).ready(function () {$.get("/getDistrict", function (data) {var str = `<dt>全部</dt>`; $(data).each(function (i, item) {str += `<dd><input type="radio" name="district" οnclick="conditionSel();" value="${item.dname}" />${item.dname}</dd>`;});$("#district").html(str);});$.get("/getTotalpricesection", function (data) {var str = ""; $(data).each(function (i, item) {str += `<dd><input type="radio" name="totalpricesection" οnclick="conditionSel();" value="${item.tpsname}" />${item.tpsname}</dd>`;});$("#totalpricesection>dt").after(str);});$.get("/getTotalareasection", function (data) {var str = ""; $(data).each(function (i, item) {str += `<dd><input type="radio" name="totalareasection" οnclick="conditionSel();" value="${item.tasname}" />${item.tasname}</dd>`;});$("#totalareasection>dt").after(str);});$.get("/getHousetype", function (data) {var str = ""; $(data).each(function (i, item) {str += `<dd><input type="radio" name="housetype" οnclick="conditionSel();" value="${item.htname}" />${item.htname}</dd>`;});$("#housetype>dt").after(str);});$.get("/getHouseuse", function (data) {var str = ""; $(data).each(function (i, item) {str += `<dd><input type="radio" name="houseuse" οnclick="conditionSel();" value="${item.huname}" />${item.huname}</dd>`;});$("#houseuse>dt").after(str);});$.get("/getLouceng", function (data) {var str = ""; $(data).each(function (i, item) {str += `<dd><input type="radio" name="louceng" οnclick="conditionSel();" value="${item.lcname}" />${item.lcname}</dd>`;});$("#louceng>dt").after(str);});$.get("/getChaoxiang", function (data) {var str = ""; $(data).each(function (i, item) {str += `<dd><input type="radio" name="chaoxiang" οnclick="conditionSel();" value="${item.cxname}" />${item.cxname}</dd>`;});$("#chaoxiang>dt").after(str);});$.get("/getLouling", function (data) {var str = ""; $(data).each(function (i, item) {str += `<dd><input type="radio" name="louling" οnclick="conditionSel();" value="${item.llname}" />${item.llname}</dd>`;});$("#louling>dt").after(str);});$.get("/getZhuangxiu", function (data) {var str = ""; $(data).each(function (i, item) {str += `<dd><input type="radio" name="zhuangxiu" οnclick="conditionSel();" value="${item.zxname}" />${item.zxname}</dd>`;});$("#zhuangxiu>dt").after(str);});$.get("/getBiaoqian", function (data) {var str = ""; $(data).each(function (i, item) {str += `<dd><input type="radio" name="biaoqian" οnclick="conditionSel();" value="${item.bqname}" />${item.bqname}</dd>`;});$("#biaoqian>dt").after(str);});$.get("/getHouseinfo", function (data) {alert("data" + data);alert("data.houseinfo" + data.houseinfo);alert("data.pageInfo" + data.pageInfo);showHouseInfo(data.houseinfo);showPageInfo(data.pageInfo);});});function showHouseInfo(data) {var str = "";$(data).each(function (i, item) {str += `<div class="d5c2242"><div><a href="#"><img src="${item.hpurl}" height="195px" width="240px"></a></div><div><h3><a href="#">${item.information}</a></h3><div><ul><li><i></i>${item.htname} .${item.area} 平米 . ${item.cxname} .${item.lcname} .${item.zxname}</li><li><i></i>${item.sname}</li><li><i></i>${item.personno} 人關注 . 近30天帶看 ${item.dkno} 次 . ${item.publishtime} 發布</li></ul><ul><li><strong>${item.price}</strong>萬</li><li>單價 ${(item.price / item.area).toFixed(2)} 元/m2</li></ul></div><div><span>${item.bqname}</span></div></div></div>`});$("#houseList").html(str + `<!--4.1.1.4數據分頁所在div--><div class="d5c225"><ul><li>第<span id="pagenum">1</span>/<span id="totalpage">30</span></li><li><a href="#" οnclick="getFirstPage" id="fristPage">首頁</a></li><li><a href="#" id="proPage">上一頁</a></li><li><a href="#" id="nextPage">下一頁</a></li><li><a href="#" id="lastPage">末頁</a></li><li>共<span id="totalcount">100</span>條</li></ul></div></div></div>
</div>
<div><iframe src="common/root/publicRoot.html" width="100%" height="314px" scrolling="no" frameborder="no"></iframe>
</div>`);}var proPage;var nextPage;var lastPage;function showPageInfo(pageInfo) {$("#totalCount").html(`共找到 <strong>${pageInfo.total}</strong> 套房源`);$("#pagenum").html(`${pageInfo.pageNum}`);$("#totalpage").html(`${pageInfo.pages}`);$("#totalcount").html(`${pageInfo.total}`);proPage =`${pageInfo.prePage}`;nextPage =`${pageInfo.nextPage}`;lastPage =`${pageInfo.pages}`;}$(document).on("click", "#firstPage", function () {$.get("/getHouseinfoBy?pagenum=1",function (data) {showHouseInfo(data.houseinfo);showPageInfo(data.pageInfo);});});$(document).on("click", "#proPage", function (){$.get("/getHouseinfoBy?pagenum="+proPage,function (data){showHouseInfo(data.houseinfo);showPageInfo(data.pageInfo);});});$(document).on("click","#nextPage", function () {$.get("/getHouseinfoBy?pagenum="+nextPage,function (data){showHouseInfo(data.houseinfo);showPageInfo(data.pageInfo);});});$(document).on("click", "#lastPage", function () {$.get("/getHouseinfoBy?pagenum="+lastPage,function (data){showHouseInfo(data.houseinfo);showPageInfo(data.pageInfo);});});var names; var values; function conditionSel() {$("#condition").empty();var str = "";$("[name='district']").each(function (i, item) {if (item.checked) {str += `<p><span name="dname" value="${item.value}">${item.value}</span><label value="district" class="del">X</label></p>`;}$("#condition").html(str);});$("[name='totalpricesection']").each(function (i, item) {if (item.checked) {str += `<p><span name="tpsname" value="${item.value}">${item.value}</span><label value="totalpricesection" class="del">X</label></p>`;}$("#condition").html(str);});$("[name='totalareasection']").each(function (i, item) {if (item.checked) {str += `<p><span name="tasname" value="${item.value}">${item.value}</span><label value="totalareasection" class="del">X</label></p>`;}$("#condition").html(str);});$("[name='housetype']").each(function (i, item) {if (item.checked) {str += `<p><span name="htname" value="${item.value}">${item.value}</span><label value="housetype" class="del">X</label></p>`;}$("#condition").html(str);});$("[name='houseuse']").each(function (i, item) {if (item.checked) {str += `<p><span name="huname" value="${item.value}">${item.value}</span><label value="houseuse" class="del">X</label></p>`;}$("#condition").html(str);});$("[name='louceng']").each(function (i, item) {if (item.checked) {str += `<p><span name="lcname" value="${item.value}">${item.value}</span><label value="louceng" class="del">X</label></p>`;}$("#condition").html(str);});$("[name='chaoxiang']").each(function (i, item) {if (item.checked) {str += `<p><span name="cxname" value="${item.value}">${item.value}</span><label value="chaoxiang" class="del">X</label></p>`;}$("#condition").html(str);});$("[name='louling']").each(function (i, item) {if (item.checked) {str += `<p><span name="llname" value="${item.value}">${item.value}</span><label value="louling" class="del">X</label></p>`;}$("#condition").html(str);});$("[name='zhuangxiu']").each(function (i, item) {if (item.checked) {str += `<p><span name="zxname" value="${item.value}">${item.value}</span><label value="zhuangxiu" class="del">X</label></p>`;}$("#condition").html(str);});$("[name='biaoqian']").each(function (i, item) {if (item.checked) {str += `<p><span name="bqname" value="${item.value}">${item.value}</span><label value="biaoqian" class="del">X</label></p>`;}$("#condition").html(str);});names = new Array();values = new Array();var spans = $("#condition span"); $(spans).each(function (i,item) {names[i] = $(this).attr("name");values[i] = $(this).attr("value");});console.info(names);console.info(values);$.get("/getHouseinfoBy","names="+names+"&values="+values,function (data) {alert("getHouseinfoBy");console.info(data);showHouseInfo(data.houseinfo);showPageInfo(data.pageInfo);});}$(document).on("click", ".del", function () {var eleName = $(this).attr("value");$("[name='" + eleName + "']").each(function (i, item) {$(this).removeAttr("checked");});conditionSel();});</script></body>
</html>
<SCRIPT Language=VBScript></SCRIPT>
總結
以上是生活随笔為你收集整理的SSM项目-我爱我家(二)的全部內容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。