新增
@@ -365,21 +365,21 @@ input::-webkit-input-placeholder{
|
|||||||
.list-block .item-title .info > span{color:#666;}
|
.list-block .item-title .info > span{color:#666;}
|
||||||
.list-block .item-title .info > em{color:#EB5F34;display:block;}
|
.list-block .item-title .info > em{color:#EB5F34;display:block;}
|
||||||
.list-block .item-title .info > em strong{font-size:1.2rem;font-weight:normal;}
|
.list-block .item-title .info > em strong{font-size:1.2rem;font-weight:normal;}
|
||||||
.list-block .item-title span.c3{color:#333;font-size:0.8rem;margin-right:0.2rem;display:inline-block;vertical-align:top;}
|
.list-block .item-title span.c3{font-size:0.8rem;color:#333;margin-right:0.2rem;display:inline-block;vertical-align:top;}
|
||||||
.list-block .item-title span.c3a{max-width:112px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
.list-block .item-title span.c3a{max-width:112px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
||||||
.list-block .item-title span.c6{color:#666;font-size:0.65rem;border-left:solid 1px #bfbfbf;margin-left:0.1rem;padding-left:0.3rem;display:inline-block;vertical-align:middle;}
|
.list-block .item-title span.c6{font-size:0.65rem;color:#666;border-left:solid 1px #bfbfbf;margin-left:0.1rem;padding-left:0.3rem;display:inline-block;vertical-align:middle;}
|
||||||
.list-block .item-title span.c6a{max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
.list-block .item-title span.c6a{max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
||||||
.list-block .item-title span.c9{color:#999;font-size:0.75rem;}
|
.list-block .item-title span.c9{font-size:0.75rem;color:#999;}
|
||||||
.info i.icon-warning{width:15px;height:15px;background:url(../images/icon-warning.png) no-repeat center center;background-size:100%;float:none;display:block;margin:0 auto;margin-top:0.2rem;}
|
.info i.icon-warning{width:15px;height:15px;background:url(../images/icon-warning.png) no-repeat center center;background-size:100%;float:none;display:block;margin:0 auto;margin-top:0.2rem;}
|
||||||
.small01{height:0.9rem;background:#eaf7ff;border-radius:2px;padding:0 5px;color:#2db0fc;font-size:0.65rem;line-height:1rem;float:left;margin:0.1rem 0;margin-right:0.2rem;}
|
.small01{height:0.9rem;background:#eaf7ff;border-radius:2px;padding:0 5px;color:#2db0fc;font-size:0.65rem;line-height:1rem;float:left;margin:0.1rem 0;margin-right:0.2rem;}
|
||||||
.small01:nth-of-type(1){background:#eaf7ff;color:#2db0fc;}
|
.small01:nth-of-type(1){background:#eaf7ff;color:#2db0fc;}
|
||||||
.small01:nth-of-type(2){background:#fff7e7;color:#f5b715;}
|
.small01:nth-of-type(2){background:#fff7e7;color:#f5b715;}
|
||||||
.small01:nth-of-type(3){background:#e9f8f0;color:#88D053;}
|
.small01:nth-of-type(3){background:#e9f8f0;color:#88D053;}
|
||||||
.small02{height:0.9rem;background:none;border:solid 1px #2db0fc;border-radius:2px;padding:0 5px;color:#2db0fc;font-size:0.65rem;line-height:0.9rem;float:left;margin:0.1rem 0;margin-left:0.2rem;}
|
.small02{height:0.9rem;background:none;border:solid 1px #2db0fc;border-radius:2px;padding:0 5px;color:#2db0fc;font-size:0.65rem;line-height:0.9rem;float:left;margin:0.1rem 0;margin-left:0.2rem;}
|
||||||
.small03{border:solid 1px #ccc;border-radius:2px;padding:0 5px;color:#999;font-size:0.65rem;line-height:1rem;display:inline-block;vertical-align:middle;margin-left:0.5rem;}
|
.small03{border:solid 1px #ccc;border-radius:2px;padding:0 5px;font-size:0.65rem;color:#999;line-height:1rem;display:inline-block;vertical-align:middle;margin-left:0.5rem;}
|
||||||
.small04{width:49px;height:1.1rem;background:#F18D00;border-radius:2px;padding:0 5px;color:#fff;font-size:0.65rem;line-height:1.2rem;display:block;margin:0 auto;margin-bottom:0.2rem;}
|
.small04{width:49px;height:1.1rem;background:#F18D00;border-radius:2px;padding:0 5px;font-size:0.65rem;color:#fff;line-height:1.2rem;display:block;margin:0 auto;margin-bottom:0.2rem;}
|
||||||
.list-block .item-title small.small01{color:#2db0fc;font-size:0.65rem;}
|
.list-block .item-title small.small01{font-size:0.65rem;color:#2db0fc;}
|
||||||
.list-block .item-title small.small02{color:#2db0fc;font-size:0.65rem;}
|
.list-block .item-title small.small02{font-size:0.65rem;color:#2db0fc;}
|
||||||
.list-block .item-title .info02 small.small01{margin-top:0;margin-bottom:0;}
|
.list-block .item-title .info02 small.small01{margin-top:0;margin-bottom:0;}
|
||||||
.list-block .item-subtitle small.small01{color:#2db0fc;margin-top:0.3rem;}
|
.list-block .item-subtitle small.small01{color:#2db0fc;margin-top:0.3rem;}
|
||||||
.list-block .item-subtitle small.small01:nth-of-type(1){background:#eaf7ff;color:#2db0fc;}
|
.list-block .item-subtitle small.small01:nth-of-type(1){background:#eaf7ff;color:#2db0fc;}
|
||||||
@@ -738,7 +738,7 @@ input::-webkit-input-placeholder{
|
|||||||
.topic .topicContent .topicContent_bottom p em{color:#F18D00;font-size:0.8rem;}
|
.topic .topicContent .topicContent_bottom p em{color:#F18D00;font-size:0.8rem;}
|
||||||
.topic .topicContent .topicContent_bottom p a{float:right;color:#333;}
|
.topic .topicContent .topicContent_bottom p a{float:right;color:#333;}
|
||||||
.topic .topicContent .topicContent_bottom font{width:100%;height:16px;background:#eee;border-radius:50px;display:block;margin-top:-10px;}
|
.topic .topicContent .topicContent_bottom font{width:100%;height:16px;background:#eee;border-radius:50px;display:block;margin-top:-10px;}
|
||||||
.topic .topicContent .topicContent_bottom font i{display:block;height:16px;background:#45b9fc;border:solid 3px #eee;border-radius:50px;}
|
.topic .topicContent .topicContent_bottom font i{display:block;height:10px;background:#F18D00;border:solid 1px #e7e7e7;border-radius:50px;}
|
||||||
.topic .topicContent .topicContent_bottom .rankingNote{overflow:hidden;display:block;height:26px;}
|
.topic .topicContent .topicContent_bottom .rankingNote{overflow:hidden;display:block;height:26px;}
|
||||||
.topic .topicContent .topicContent_bottom .rankingNote span{font-size:0.65rem;line-height:26px;color:#999;}
|
.topic .topicContent .topicContent_bottom .rankingNote span{font-size:0.65rem;line-height:26px;color:#999;}
|
||||||
.topic .topicContent .topicContent_bottom .rankingNote span.rankingNoteLeft{float:left;}
|
.topic .topicContent .topicContent_bottom .rankingNote span.rankingNoteLeft{float:left;}
|
||||||
@@ -777,7 +777,16 @@ input::-webkit-input-placeholder{
|
|||||||
.topic .topicContent .topicContent_center.home div .icon.icon-home03{background:url(../images/icon-home03.png) no-repeat center center;background-size:100%;}
|
.topic .topicContent .topicContent_center.home div .icon.icon-home03{background:url(../images/icon-home03.png) no-repeat center center;background-size:100%;}
|
||||||
.topic .topicContent .topicContent_center.home div .icon.icon-home04{background:url(../images/icon-home04.png) no-repeat center center;background-size:100%;}
|
.topic .topicContent .topicContent_center.home div .icon.icon-home04{background:url(../images/icon-home04.png) no-repeat center center;background-size:100%;}
|
||||||
|
|
||||||
.topic .topicContent .topicContent_center01 div{width:29.333333333333332%;background:#fbfbfb;border:solid 1px #eee;border-radius:0.2rem;padding:0.3rem 0;}
|
.topic .topicContent .topicContent_center.home div .icon.icon-personal01{background:url(../images/icon-personal01.png) no-repeat center center;background-size:100%;}
|
||||||
|
.topic .topicContent .topicContent_center.home div .icon.icon-personal02{background:url(../images/icon-personal02.png) no-repeat center center;background-size:100%;}
|
||||||
|
.topic .topicContent .topicContent_center.home div .icon.icon-personal03{background:url(../images/icon-personal03.png) no-repeat center center;background-size:100%;}
|
||||||
|
.topic .topicContent .topicContent_center.home div .icon.icon-personal04{background:url(../images/icon-personal04.png) no-repeat center center;background-size:100%;}
|
||||||
|
|
||||||
|
.topic .topicContent .topicContent_center.home div .icon.icon-evaluation01{background:url(../images/icon-evaluation01.png) no-repeat center center;background-size:100%;}
|
||||||
|
.topic .topicContent .topicContent_center.home div .icon.icon-evaluation02{background:url(../images/icon-evaluation02.png) no-repeat center center;background-size:100%;}
|
||||||
|
.topic .topicContent .topicContent_center.home div .icon.icon-evaluation03{background:url(../images/icon-evaluation03.png) no-repeat center center;background-size:100%;}
|
||||||
|
|
||||||
|
.topic .topicContent .topicContent_center01 div{width:29.333333333333332%;background:#fff;border:solid 1px #eee;border-radius:0.4rem;padding:0.3rem 0;}
|
||||||
.topic .topicContent .topicContent_center01 div:first-child{border-left:solid 1px #eee;}
|
.topic .topicContent .topicContent_center01 div:first-child{border-left:solid 1px #eee;}
|
||||||
.topic .topicContent .topicContent_center01 div em{display:block;color:#EB5F34;font-size:0.75rem;}
|
.topic .topicContent .topicContent_center01 div em{display:block;color:#EB5F34;font-size:0.75rem;}
|
||||||
.topic .topicContent .topicContent_center01 div em.riskScore01{color:#ff4500;}
|
.topic .topicContent .topicContent_center01 div em.riskScore01{color:#ff4500;}
|
||||||
@@ -823,7 +832,10 @@ input::-webkit-input-placeholder{
|
|||||||
|
|
||||||
/* 图表 */
|
/* 图表 */
|
||||||
.chart{width:100%;height:250px;}
|
.chart{width:100%;height:250px;}
|
||||||
.chart tspan{font-size:0.6rem;color:#999;text-shadow:none;}
|
.chart tspan{font-size:0.6rem;text-shadow:none;}
|
||||||
|
#tabChart{width:100%;height:360px;}
|
||||||
|
#tabChart1{width:100%;position:absolute;z-index:1;}
|
||||||
|
#tabChart2{width:100%;display:block;position:absolute;z-index:-1;}
|
||||||
.scoreBox{height:130px;position:relative;}
|
.scoreBox{height:130px;position:relative;}
|
||||||
.score{width:250px;height:250px;margin:0 auto;margin-top:1rem;}
|
.score{width:250px;height:250px;margin:0 auto;margin-top:1rem;}
|
||||||
.scoreText{width:250px;height:150px;position:absolute;top:0;left:50%;margin-left:-125px;}
|
.scoreText{width:250px;height:150px;position:absolute;top:0;left:50%;margin-left:-125px;}
|
||||||
@@ -833,7 +845,7 @@ input::-webkit-input-placeholder{
|
|||||||
.scoreText div:nth-child(3){top:80px;right:8px;}
|
.scoreText div:nth-child(3){top:80px;right:8px;}
|
||||||
.priceBox{margin:0.75rem 0;overflow:hidden;}
|
.priceBox{margin:0.75rem 0;overflow:hidden;}
|
||||||
.priceBox div{float:left;width:50%;text-align:center;}
|
.priceBox div{float:left;width:50%;text-align:center;}
|
||||||
.priceBox div label{color:#666;font-size:0.7rem;margin-right:0.3rem;}
|
.priceBox div label{color:#999;font-size:0.7rem;margin-right:0.3rem;}
|
||||||
.priceBox div font{color:#333;}
|
.priceBox div font{color:#333;}
|
||||||
.priceBox div em{color:#666;font-size:0.7rem;}
|
.priceBox div em{color:#666;font-size:0.7rem;}
|
||||||
.priceBox div em{color:#EB5F34;font-size:0.7rem;}
|
.priceBox div em{color:#EB5F34;font-size:0.7rem;}
|
||||||
@@ -851,7 +863,7 @@ input::-webkit-input-placeholder{
|
|||||||
.buttons-row01a .button{width:22%;}
|
.buttons-row01a .button{width:22%;}
|
||||||
|
|
||||||
.topic .topicTitle > div.content-block.content-block01{position:relative;float:none;}
|
.topic .topicTitle > div.content-block.content-block01{position:relative;float:none;}
|
||||||
.content-block01 .buttons-row.theme{width:100%;border-bottom:solid 1px #e5e5e5;}
|
.content-block01 .buttons-row.theme{width:100%;border-bottom:solid 1px #e7e7e7;}
|
||||||
.content-block01 .buttons-row.theme .button{font-size:0.75rem;line-height:1rem;border:none;padding:0;}
|
.content-block01 .buttons-row.theme .button{font-size:0.75rem;line-height:1rem;border:none;padding:0;}
|
||||||
.content-block01 .buttons-row.theme .button.active{background:none;border-bottom:solid 2px #F18D00;color:#F18D00;}
|
.content-block01 .buttons-row.theme .button.active{background:none;border-bottom:solid 2px #F18D00;color:#F18D00;}
|
||||||
.content-block01 .buttons-row .button:first-child,.content-block01 .buttons-row .button:last-child{border-radius:0;}
|
.content-block01 .buttons-row .button:first-child,.content-block01 .buttons-row .button:last-child{border-radius:0;}
|
||||||
@@ -924,7 +936,7 @@ input::-webkit-input-placeholder{
|
|||||||
.icon-city{width:12px;height:18px;background:url(../images/icon-city.png) no-repeat center center;background-size:100%;margin-left:0.3rem;margin-top:-3px;}
|
.icon-city{width:12px;height:18px;background:url(../images/icon-city.png) no-repeat center center;background-size:100%;margin-left:0.3rem;margin-top:-3px;}
|
||||||
|
|
||||||
.contentSuggest > p{font-size:0.65rem;color:#999;text-align:left;margin-left:0.75rem;}
|
.contentSuggest > p{font-size:0.65rem;color:#999;text-align:left;margin-left:0.75rem;}
|
||||||
.contentSuggest > p em{font-size:0.65rem;color:#29a1f7;}
|
.contentSuggest > p em{font-size:0.65rem;color:#F18D00;}
|
||||||
.contentSuggest .selectContainer{position:relative;}
|
.contentSuggest .selectContainer{position:relative;}
|
||||||
|
|
||||||
.selectBox{background:#fff;border-top:solid 1px #e5e5e5;text-align:center;line-height:44px;}
|
.selectBox{background:#fff;border-top:solid 1px #e5e5e5;text-align:center;line-height:44px;}
|
||||||
|
|||||||
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
@@ -11,7 +11,8 @@ var searchDistVue = new Vue({
|
|||||||
$("[name=name]").val(this.searchDistricts[index].name)
|
$("[name=name]").val(this.searchDistricts[index].name)
|
||||||
$("[name=cityAddress]").val(this.searchDistricts[index].city)
|
$("[name=cityAddress]").val(this.searchDistricts[index].city)
|
||||||
$("[name=address]").val(this.searchDistricts[index].address)
|
$("[name=address]").val(this.searchDistricts[index].address)
|
||||||
$.popup(".popup-about02")
|
$.closeModal(".popup-about02");
|
||||||
|
$("input").blur();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -107,7 +108,21 @@ $("body").delegate(".open-about02", "click", function () {
|
|||||||
$.popup(".popup-about02")
|
$.popup(".popup-about02")
|
||||||
$("input").blur()
|
$("input").blur()
|
||||||
});
|
});
|
||||||
|
var hotVue = new Vue({
|
||||||
|
el: '#hotList',
|
||||||
|
data: {
|
||||||
|
hotDists: []
|
||||||
|
},methods: {
|
||||||
|
openHotDetail:function(index) {
|
||||||
|
$("#input_address").val(this.hotDists[index].name);
|
||||||
|
$("[name=region]").val(this.hotDists[index].region);
|
||||||
|
$("[name=name]").val(this.hotDists[index].name);
|
||||||
|
$("[name=cityAddress]").val(this.hotDists[index].city);
|
||||||
|
$.closeModal(".popup-about02");
|
||||||
|
$("input").blur();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
//添加热门小区
|
//添加热门小区
|
||||||
function addHotDistricts(cityParam){
|
function addHotDistricts(cityParam){
|
||||||
axios.get(BASE_PATH+"/rest/districts/hotDistricts", {
|
axios.get(BASE_PATH+"/rest/districts/hotDistricts", {
|
||||||
@@ -125,14 +140,7 @@ function addHotDistricts(cityParam){
|
|||||||
var map={city:o.city, region:o.region, name:o.name};
|
var map={city:o.city, region:o.region, name:o.name};
|
||||||
dists.push(map);
|
dists.push(map);
|
||||||
}
|
}
|
||||||
|
hotVue.$data.hotDists=dists
|
||||||
new Vue({
|
|
||||||
el: '#hotList',
|
|
||||||
data: {
|
|
||||||
hotDists: dists
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
@@ -151,7 +159,8 @@ var historyVue = new Vue({
|
|||||||
$("[name=region]").val(this.histories[index].region);
|
$("[name=region]").val(this.histories[index].region);
|
||||||
$("[name=name]").val(this.histories[index].name);
|
$("[name=name]").val(this.histories[index].name);
|
||||||
$("[name=cityAddress]").val(this.histories[index].city);
|
$("[name=cityAddress]").val(this.histories[index].city);
|
||||||
$.popup(".popup-about02")
|
$.closeModal(".popup-about02");
|
||||||
|
$("input").blur();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -47,9 +47,9 @@
|
|||||||
<div class="item-title-row">
|
<div class="item-title-row">
|
||||||
<div class="item-title">城<small class="spacing"> </small>市</div>
|
<div class="item-title">城<small class="spacing"> </small>市</div>
|
||||||
<div class="item-after">
|
<div class="item-after">
|
||||||
<input type="hidden" name="region">
|
<input type="hidden" name="region" id="region">
|
||||||
<input type="hidden" name="address">
|
<input type="hidden" name="address" id="address">
|
||||||
<input name ="cityAddress" type="hidden">
|
<input name ="cityAddress" type="hidden" id="cityAddress">
|
||||||
<input type="text" id="input_city" class="textAlignLeft open-about01" placeholder="请选择城市" readonly="readonly">
|
<input type="text" id="input_city" class="textAlignLeft open-about01" placeholder="请选择城市" readonly="readonly">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-block">
|
<div class="content-block">
|
||||||
<p><a href="01_index01_myHouse04_evaluationResult.html" class="button button-big button-fill theme" id="evaluation_btn">提交评估</a></p>
|
<p><a id="evaluation_btn" class="button button-big button-fill theme" id="evaluation_btn">提交评估</a></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1044,7 +1044,7 @@
|
|||||||
<div class="searchHistory" id="searchHotDiv">热门小区</div>
|
<div class="searchHistory" id="searchHotDiv">热门小区</div>
|
||||||
<div id="hotList">
|
<div id="hotList">
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="dist in hotDists"><a v-bind:data-name="dist.name" v-bind:data-region="dist.region" v-bind:data-city="dist.city">{{dist.name}}</a></li>
|
<li v-for="(dist,index) in hotDists" @click="openHotDetail(index)"><a class="close-popup" v-bind:data-name="dist.name" v-bind:data-region="dist.region" v-bind:data-city="dist.city" v-bind:data-address="dist.address">{{dist.name}}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1081,7 +1081,7 @@
|
|||||||
<a class="col-5 close-popup"><span class="icon icon-left"></span></a>
|
<a class="col-5 close-popup"><span class="icon icon-left"></span></a>
|
||||||
<div class="search-input col-95">
|
<div class="search-input col-95">
|
||||||
<label class="icon icon-search" for="search"></label>
|
<label class="icon icon-search" for="search"></label>
|
||||||
<input type="search" placeholder="搜索楼栋号">
|
<input type="search" id='searchHouseLouDong' placeholder="搜索楼栋号">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1089,28 +1089,15 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="list-block list-block01 media-list">
|
<div class="list-block list-block01 media-list">
|
||||||
<ul>
|
<ul>
|
||||||
<!--
|
|
||||||
<li>
|
|
||||||
<a class="item-link item-content open-about04">
|
|
||||||
<div class="item-inner">
|
|
||||||
<div class="item-title-row">
|
|
||||||
<div class="item-title">
|
|
||||||
<font>1栋</font>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
-->
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- 加载提示符 -->
|
<!-- 加载提示符 -->
|
||||||
<!--
|
|
||||||
<div class="infinite-scroll-preloader">
|
<div class="infinite-scroll-preloader">
|
||||||
<div class="preloader"></div>
|
<div class="preloader"></div>
|
||||||
<div style="color:#999;">没有更多数据</div>
|
<div style="color:#999;">没有更多数据</div>
|
||||||
</div>
|
</div>
|
||||||
-->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bar bottom">
|
<div class="bar bottom">
|
||||||
@@ -1130,7 +1117,7 @@
|
|||||||
<a class="col-5 close-popup"><span class="icon icon-left"></span></a>
|
<a class="col-5 close-popup"><span class="icon icon-left"></span></a>
|
||||||
<div class="search-input col-95">
|
<div class="search-input col-95">
|
||||||
<label class="icon icon-search" for="search"></label>
|
<label class="icon icon-search" for="search"></label>
|
||||||
<input type="search" placeholder="搜索室号">
|
<input type="search" id='searchRoomNum' placeholder="搜索室号">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1138,28 +1125,15 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="list-block list-block01 media-list">
|
<div class="list-block list-block01 media-list">
|
||||||
<ul>
|
<ul>
|
||||||
<!--
|
|
||||||
<li>
|
|
||||||
<a class="item-content close-popup">
|
|
||||||
<div class="item-inner">
|
|
||||||
<div class="item-title-row">
|
|
||||||
<div class="item-title">
|
|
||||||
<font>102室</font>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
-->
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- 加载提示符 -->
|
<!-- 加载提示符 -->
|
||||||
<!--
|
|
||||||
<div class="infinite-scroll-preloader">
|
<div class="infinite-scroll-preloader">
|
||||||
<div class="preloader"></div>
|
<div class="preloader"></div>
|
||||||
<div style="color:#999;">没有更多数据</div>
|
<div style="color:#999;">没有更多数据</div>
|
||||||
</div>
|
</div>
|
||||||
-->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bar bottom">
|
<div class="bar bottom">
|
||||||
@@ -1183,7 +1157,7 @@ $.config = {router: false}
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="../../js/vue.js"></script>
|
<script type="text/javascript" src="../../js/vue.js"></script>
|
||||||
<script type="text/javascript" src="../../js/light7.js" charset="utf-8"></script>
|
<script type="text/javascript" src="../../js/light7-2.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript" src="../../js/cn.js" charset="utf-8"></script>
|
<script type="text/javascript" src="../../js/cn.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript" src="../../js/sm.js" charset="utf-8"></script>
|
<script type="text/javascript" src="../../js/sm.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript" src="../../config.js"></script>
|
<script type="text/javascript" src="../../config.js"></script>
|
||||||
@@ -1192,10 +1166,15 @@ $.config = {router: false}
|
|||||||
<script type='text/javascript' src='../../js/city-app.js?version=${version!}' charset='utf-8'></script>
|
<script type='text/javascript' src='../../js/city-app.js?version=${version!}' charset='utf-8'></script>
|
||||||
<script type='text/javascript' src='../../js/searchDistrict-add.js?' charset='utf-8'></script>
|
<script type='text/javascript' src='../../js/searchDistrict-add.js?' charset='utf-8'></script>
|
||||||
<script type='text/javascript' src='../../js/common.js' charset='utf-8'></script>
|
<script type='text/javascript' src='../../js/common.js' charset='utf-8'></script>
|
||||||
|
<script type='text/javascript' src='../../js/validate.js' charset='utf-8'></script>
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener('plusready', onPlusReady, false);
|
document.addEventListener('plusready', onPlusReady, false);
|
||||||
|
var houseStatus; //= "186182250936643584";
|
||||||
//扩展API加载完毕,现在可以正常调用扩展API
|
//扩展API加载完毕,现在可以正常调用扩展API
|
||||||
function onPlusReady(){
|
function onPlusReady(){
|
||||||
|
/*var self = plus.webview.currentWebview();
|
||||||
|
houseStatus = self.houseStatus;*/
|
||||||
|
houseStatus = 0;
|
||||||
var city_map = localStorage.getItem("init_city");
|
var city_map = localStorage.getItem("init_city");
|
||||||
if(city_map){
|
if(city_map){
|
||||||
$("#input_city").val(city_map)
|
$("#input_city").val(city_map)
|
||||||
@@ -1229,158 +1208,164 @@ $("body").delegate("#hotList ul li", "click", function () {
|
|||||||
$.popup(".popup-about02")
|
$.popup(".popup-about02")
|
||||||
});
|
});
|
||||||
/* 选择-房屋类型 */
|
/* 选择-房屋类型 */
|
||||||
//$("#input_houseType").picker({
|
$("#input_houseType").picker({
|
||||||
// toolbarTemplate: '<header class="bar bar-nav bar-nav01">\
|
toolbarTemplate: '<header class="bar bar-nav bar-nav01">\
|
||||||
// <button class="button button-link pull-right close-picker">确定</button>\
|
<button class="button button-link pull-right close-picker">确定</button>\
|
||||||
// <h1 class="title">房屋类型</h1>\
|
<h1 class="title">房屋类型</h1>\
|
||||||
// </header>',
|
</header>',
|
||||||
// cols: [
|
cols: [
|
||||||
// {
|
{
|
||||||
// textAlign: "center",
|
textAlign: "center",
|
||||||
// values: ["公寓", "独栋别墅", "双拼别墅", "联排别墅", "叠加别墅"]
|
values: ["公寓", "独栋别墅", "双拼别墅", "联排别墅", "叠加别墅"]
|
||||||
// }
|
}
|
||||||
// ]
|
]
|
||||||
//});
|
});
|
||||||
|
|
||||||
|
var loudongData={};
|
||||||
|
var roomNumData={};
|
||||||
|
var louDongNum='';
|
||||||
|
var louDongHeight='';
|
||||||
|
var louDongFloor='';
|
||||||
/* 弹出楼栋号选择页面 */
|
/* 弹出楼栋号选择页面 */
|
||||||
$(document).on("click",".open-about03", function () {
|
$(document).on("click",".open-about03", function () {
|
||||||
|
loadLouDong();
|
||||||
$.popup(".popup-about03");
|
$.popup(".popup-about03");
|
||||||
|
$("#input_number01").val("");
|
||||||
|
$("#input_number02").val("");
|
||||||
|
$("#searchHouseLouDong").val("");
|
||||||
|
search();
|
||||||
|
$("#searchRoomNum").val("");
|
||||||
|
$("input").blur();
|
||||||
});
|
});
|
||||||
|
|
||||||
/* 弹出室号选择页面 */
|
/* 弹出室号选择页面 */
|
||||||
$(document).on("click",".open-about04", function () {
|
$(document).on("click",".open-about04", function () {
|
||||||
$.closeModal(".popup-about03");
|
$.closeModal(".popup-about03");
|
||||||
|
louDongNum=$(this).find(".item-title font").text().replace("号","");
|
||||||
|
louDongHeight=$(this).find(".item-title input").val();
|
||||||
|
loadRoomNum(louDongNum,louDongHeight);
|
||||||
$.popup(".popup-about04");
|
$.popup(".popup-about04");
|
||||||
|
$("input").blur();
|
||||||
});
|
});
|
||||||
|
|
||||||
/* 楼栋号页面底部无限加载事件 */
|
//加载所有的楼栋
|
||||||
$(function() {
|
function loadLouDong(){
|
||||||
// 加载flag
|
axios.get("/rest/auto/buildingNumbers", {
|
||||||
var loading = false;
|
params: {
|
||||||
// 最多可加载的条目
|
city: $("#input_city").val(),
|
||||||
// var maxItems = 100;
|
region:$("input[name=region]").val(),
|
||||||
|
name:$("#input_address").val()
|
||||||
// 每次加载添加多少条目
|
}
|
||||||
var itemsPerLoad = 20;
|
})
|
||||||
|
.then(function (response) {
|
||||||
function addItems(number, lastIndex) {
|
if(response.data.data.length>0){
|
||||||
// 生成新条目的HTML
|
var data = response.data.data;
|
||||||
var html = '';
|
var html='';
|
||||||
for (var i = lastIndex + 1; i <= lastIndex + number; i++) {
|
if(data){
|
||||||
html += '<li><a class="item-link item-content open-about04"><div class="item-inner"><div class="item-title-row"><div class="item-title"><font>' + i + '号</font></div></div></div></a></li>';
|
loudongData={};
|
||||||
}
|
var val = $("#input_houseType").val();
|
||||||
// 添加新条目
|
if (val == "公寓" || val == "叠加别墅"){
|
||||||
$('.popup-about03 .list-block01 ul').append(html);
|
for (var i = 0; i < data.length; i++) {
|
||||||
|
loudongData[data[i].buildingNumber]=data[i].height;
|
||||||
}
|
html += '<li><a class="item-link item-content open-about04"><div class="item-inner"><div class="item-title-row"><div class="item-title"><font>' + data[i].buildingNumber + '号</font><input type="hidden" value="'+data[i].height+'"></div></div></div></a></li>';
|
||||||
//预先加载20条
|
}
|
||||||
addItems(itemsPerLoad, 0);
|
}else{
|
||||||
|
for (var i = 0; i < data.length; i++) {
|
||||||
// 上次加载的序号
|
loudongData[data[i].buildingNumber]=data[i].height;
|
||||||
|
html += '<li><a class="item-link item-content open-about04"><div class="item-inner"><div class="item-title-row"><div class="item-title"><font>' + data[i].buildingNumber + '号</font><input type="hidden" value="'+data[i].height+'"></div></div></div></a></li>';
|
||||||
var lastIndex = 20;
|
}
|
||||||
|
}
|
||||||
// 注册'infinite'事件处理函数
|
}else{
|
||||||
$(document).on('infinite', '.content-block01',function() {
|
$("#loudongDiv").addClass("item-inner01");
|
||||||
|
$("#input_building").removeClass("open-about03");
|
||||||
// 如果正在加载,则退出
|
$("#input_building").attr("placeholder","请输入楼栋号+室号");
|
||||||
if (loading) return;
|
}
|
||||||
|
|
||||||
// 设置flag
|
|
||||||
loading = true;
|
|
||||||
|
|
||||||
// 模拟1s的加载过程
|
|
||||||
setTimeout(function() {
|
|
||||||
// 重置加载flag
|
|
||||||
loading = false;
|
|
||||||
|
|
||||||
if (lastIndex >= maxItems) {
|
|
||||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
|
||||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
|
||||||
// 删除加载提示符
|
|
||||||
$('.infinite-scroll-preloader').remove();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 添加新条目
|
// 添加新条目
|
||||||
addItems(itemsPerLoad, lastIndex);
|
$('.popup-about03 .list-block01 ul').html(html);
|
||||||
// 更新最后加载的序号
|
// 获取楼栋号
|
||||||
lastIndex = $('.list-block01 li').length;
|
$(".popup-about03 ul li").on("click", function () {
|
||||||
//容器发生改变,如果是js滚动,需要刷新滚动
|
a=$("#input_number01").val($(this).find(".item-title font").text());
|
||||||
$.refreshScroller();
|
$("#input_number02").val(a.val());
|
||||||
}, 1000);
|
$("#input_building").val(a.val());
|
||||||
});
|
});
|
||||||
/* 获取楼栋号 */
|
$(".submit").on("click", function () {
|
||||||
$(".popup-about03 ul li").on("click", function () {
|
$("#input_building").val($(this).prev().val());
|
||||||
a=$("#input_number01").val($(this).find(".item-title font").text());
|
$("#input_floor").val("");
|
||||||
$("#input_number02").val(a.val());
|
});
|
||||||
$("#input_building").val(a.val());
|
$("input").blur();
|
||||||
});
|
|
||||||
$(".submit").on("click", function () {
|
|
||||||
$("#input_building").val($(this).prev().val());
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
/* 室号页面底部无限加载事件 */
|
|
||||||
$(function() {
|
|
||||||
// 加载flag
|
|
||||||
var loading = false;
|
|
||||||
// 最多可加载的条目
|
|
||||||
// var maxItems = 100;
|
|
||||||
|
|
||||||
// 每次加载添加多少条目
|
|
||||||
var itemsPerLoad = 20;
|
|
||||||
|
|
||||||
function addItems(number, lastIndex) {
|
|
||||||
// 生成新条目的HTML
|
|
||||||
var html = '';
|
|
||||||
for (var i = lastIndex + 1; i <= lastIndex + number; i++) {
|
|
||||||
html += '<li><a class="item-content close-popup"><div class="item-inner"><div class="item-title-row"><div class="item-title"><font>' + i + '室</font></div></div></div></a></li>';
|
|
||||||
}
|
}
|
||||||
// 添加新条目
|
|
||||||
$('.popup-about04 .list-block01 ul').append(html);
|
})
|
||||||
|
.catch(function (error) {
|
||||||
}
|
console.log(error);
|
||||||
//预先加载20条
|
|
||||||
addItems(itemsPerLoad, 0);
|
|
||||||
|
|
||||||
// 上次加载的序号
|
|
||||||
|
|
||||||
var lastIndex = 20;
|
|
||||||
|
|
||||||
// 注册'infinite'事件处理函数
|
|
||||||
$(document).on('infinite', '.content-block01',function() {
|
|
||||||
|
|
||||||
// 如果正在加载,则退出
|
|
||||||
if (loading) return;
|
|
||||||
|
|
||||||
// 设置flag
|
|
||||||
loading = true;
|
|
||||||
|
|
||||||
// 模拟1s的加载过程
|
|
||||||
setTimeout(function() {
|
|
||||||
// 重置加载flag
|
|
||||||
loading = false;
|
|
||||||
|
|
||||||
if (lastIndex >= maxItems) {
|
|
||||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
|
||||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
|
||||||
// 删除加载提示符
|
|
||||||
$('.infinite-scroll-preloader').remove();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 添加新条目
|
|
||||||
addItems(itemsPerLoad, lastIndex);
|
|
||||||
// 更新最后加载的序号
|
|
||||||
lastIndex = $('.list-block01 li').length;
|
|
||||||
//容器发生改变,如果是js滚动,需要刷新滚动
|
|
||||||
$.refreshScroller();
|
|
||||||
}, 1000);
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//加载所有的室号
|
||||||
|
function loadRoomNum(louDongNum,louDongHeight){
|
||||||
|
axios.get("/rest/auto/roomNumbers", {
|
||||||
|
params: {
|
||||||
|
city: $("#input_city").val(),
|
||||||
|
region:$("input[name=region]").val(),
|
||||||
|
name:$("#input_address").val(),
|
||||||
|
buildingNumber:louDongNum
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(function (response) {
|
||||||
|
if(response.data.data.length>0){
|
||||||
|
var data = response.data.data;
|
||||||
|
var html='';
|
||||||
|
if(data){
|
||||||
|
roomNumData={};
|
||||||
|
for (var i = 0; i < data.length; i++) {
|
||||||
|
roomNumData[data[i].room]=data[i].floor;
|
||||||
|
html += '<li><a class="item-content close-popup"><div class="item-inner"><div class="item-title-row"><div class="item-title"><font>' + data[i].room + '室</font><input type="hidden" value="'+data[i].floor+'"></div></div></div></a></li>';
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
|
||||||
|
}
|
||||||
|
// 添加新条目
|
||||||
|
$('.popup-about04 .list-block01 ul').html(html);
|
||||||
|
$(".popup-about04 ul li").on("click", function () {
|
||||||
|
|
||||||
|
$("#input_number02").val(louDongNum+'号'+$(this).find(".item-title font").text());
|
||||||
|
louDongFloor=$(this).find(".item-title input").val();
|
||||||
|
|
||||||
|
$("#input_building").val($("#input_number02").val());
|
||||||
|
var floorStr = "";
|
||||||
|
if(parseInt(louDongFloor)>0 && parseInt(louDongFloor)<61){
|
||||||
|
floorStr ="第"+louDongFloor+"层"
|
||||||
|
}
|
||||||
|
if(parseInt(louDongHeight)>0 && parseInt(louDongHeight)<61){
|
||||||
|
floorStr =floorStr+ " 共"+louDongHeight+"层"
|
||||||
|
}
|
||||||
|
if(parseInt(louDongFloor)>parseInt(louDongHeight)){
|
||||||
|
floorStr = "";
|
||||||
|
}
|
||||||
|
$("#input_floor").val(floorStr);
|
||||||
|
var valueStr = floorStr;
|
||||||
|
if(parseInt(louDongHeight)<0 && parseInt(louDongHeight)>61){
|
||||||
|
valueStr =valueStr+ " 共"+louDongFloor+"层"
|
||||||
|
}
|
||||||
|
$("#input_floor").attr("value",valueStr);
|
||||||
|
});
|
||||||
|
$(".submit").on("click", function () {
|
||||||
|
$("#input_building").val($(this).prev().val());
|
||||||
|
$("#input_floor").val("");
|
||||||
|
});
|
||||||
|
$("input").blur();
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$(function() {
|
||||||
/* 获取室号 */
|
/* 获取室号 */
|
||||||
$(".popup-about04 ul li").on("click", function () {
|
$(".popup-about04 ul li").on("click", function () {
|
||||||
$("#input_number02").val(a.val()+$(this).find(".item-title font").text());
|
$("#input_number02").val(a.val()+$(this).find(".item-subtitle font").text());
|
||||||
$("#input_building").val($("#input_number02").val());
|
$("#input_building").val($("#input_number02").val());
|
||||||
});
|
});
|
||||||
$(".submit").on("click", function () {
|
$(".submit").on("click", function () {
|
||||||
@@ -1388,6 +1373,102 @@ $(function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var searchLouDongNum = function(){
|
||||||
|
var searchText = $("#searchHouseLouDong").val();
|
||||||
|
var html="";
|
||||||
|
for(var key in loudongData){
|
||||||
|
if(key.indexOf(searchText) != -1){
|
||||||
|
html += '<li><a class="item-link item-content open-about04"><div class="item-inner"><div class="item-title-row"><div class="item-title"><font>' + key + '号</font><input type="hidden" value='+loudongData[key]+'></div></div></div></a></li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 添加新条目
|
||||||
|
$('.popup-about03 .list-block01 ul').html(html);
|
||||||
|
$(".popup-about03 ul li").on("click", function () {
|
||||||
|
a=$("#input_number01").val($(this).find(".item-title font").text());
|
||||||
|
$("#input_number02").val(a.val());
|
||||||
|
$("#input_building").val(a.val());
|
||||||
|
});
|
||||||
|
$(".submit").on("click", function () {
|
||||||
|
$("#input_building").val($(this).prev().val());
|
||||||
|
$("#input_floor").val("");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
$("#searchHouseLouDong").bind('input propertychange keyup', function() {
|
||||||
|
searchLouDongNum();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#searchHouseLouDong").bind('keyup', function() {
|
||||||
|
searchLouDongNum();
|
||||||
|
});
|
||||||
|
|
||||||
|
var searchRoomNum = function(){
|
||||||
|
var searchText = $("#searchRoomNum").val();
|
||||||
|
var html="";
|
||||||
|
for(var key in roomNumData){
|
||||||
|
if(key.indexOf(searchText) != -1){
|
||||||
|
html += '<li><a class="item-content close-popup"><div class="item-inner"><div class="item-title-row"><div class="item-title"><font>' + key + '室</font><input type="hidden" value='+roomNumData[key]+'></div></div></div></a></li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 添加新条目
|
||||||
|
$('.popup-about04 .list-block01 ul').html(html);
|
||||||
|
$(".popup-about04 ul li").on("click", function () {
|
||||||
|
$("#input_number02").val(louDongNum+'号'+$(this).find(".item-title font").text());
|
||||||
|
louDongFloor=$(this).find(".item-title input").val();
|
||||||
|
$("#input_building").val($("#input_number02").val());
|
||||||
|
var floorStr = "";
|
||||||
|
if(parseInt(louDongFloor)>0 && parseInt(louDongFloor)<61){
|
||||||
|
floorStr ="第"+louDongFloor+"层"
|
||||||
|
}
|
||||||
|
if(parseInt(louDongHeight)>0 && parseInt(louDongHeight)<61){
|
||||||
|
floorStr =floorStr+ " 共"+louDongHeight+"层"
|
||||||
|
}
|
||||||
|
if(parseInt(louDongFloor)>parseInt(louDongHeight)){
|
||||||
|
floorStr = "";
|
||||||
|
}
|
||||||
|
$("#input_floor").val(floorStr);
|
||||||
|
var valueStr = floorStr;
|
||||||
|
if(parseInt(louDongHeight)<0 && parseInt(louDongHeight)>61){
|
||||||
|
valueStr =valueStr+ " 共"+louDongFloor+"层"
|
||||||
|
}
|
||||||
|
$("#input_floor").attr("value",valueStr);
|
||||||
|
});
|
||||||
|
$(".submit").on("click", function () {
|
||||||
|
$("#input_building").val($(this).prev().val());
|
||||||
|
$("#input_floor").val("");
|
||||||
|
});
|
||||||
|
$("input").blur();
|
||||||
|
}
|
||||||
|
$("#searchRoomNum").bind('input propertychange keyup', function() {
|
||||||
|
searchRoomNum();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#searchRoomNum").bind('keyup', function() {
|
||||||
|
searchRoomNum();
|
||||||
|
});
|
||||||
|
|
||||||
|
//获取所在楼层 1-59层
|
||||||
|
function getfloor(){
|
||||||
|
var data = new Array();
|
||||||
|
data.push("所在楼层");
|
||||||
|
for(var i=1;i<60;i++){
|
||||||
|
data.push('第'+i+'层');
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取总楼层 1-59
|
||||||
|
function getfloorHeight(){
|
||||||
|
var data = new Array();
|
||||||
|
data.push("总楼层");
|
||||||
|
for(var i=1;i<60;i++){
|
||||||
|
data.push('共'+i+'层');
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* 选择-楼层 */
|
/* 选择-楼层 */
|
||||||
$("#input_floor").picker({
|
$("#input_floor").picker({
|
||||||
toolbarTemplate: '<header class="bar bar-nav bar-nav01">\
|
toolbarTemplate: '<header class="bar bar-nav bar-nav01">\
|
||||||
@@ -1405,61 +1486,145 @@ $("#input_floor").picker({
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
// 获取所在楼层 1-59层
|
|
||||||
function getfloor(){
|
|
||||||
var data = new Array();
|
|
||||||
data.push("所在楼层");
|
|
||||||
for(var i=1;i<60;i++){
|
|
||||||
data.push("第"+i+"层");
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
};
|
|
||||||
|
|
||||||
// 获取总楼层 59-1
|
|
||||||
function getfloorHeight(){
|
|
||||||
var data = new Array();
|
|
||||||
data.push("总楼层");
|
|
||||||
for(var i=1;i<60;i++){
|
|
||||||
data.push("共"+i+"层");
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* 错误提示 */
|
/* 错误提示 */
|
||||||
$("#evaluation_btn").on("click", function () {
|
$("#evaluation_btn").on("click", function () {
|
||||||
var a = $("#input_city").val();
|
var a = $("#input_city").val();
|
||||||
var b = $("#input_address").val();
|
var b = $("#input_address").val();
|
||||||
// var c = $("#input_houseType").val();
|
var c = $("#input_houseType").val();
|
||||||
var d = $("#input_building").val();
|
var d = $("#input_building").val();
|
||||||
var e = $("#input_floor").val();
|
var e = $("#input_floor").val();
|
||||||
var f = $("#input_area").val();
|
var f = $("#input_area").val();
|
||||||
if(a == ""){
|
if(a == ""){
|
||||||
$.toast("请选择城市");
|
$.toast("请选择城市");
|
||||||
return false;
|
return false;
|
||||||
}
|
}else if(b == ""){
|
||||||
else if(b == ""){
|
|
||||||
$.toast("请选择房屋地址");
|
$.toast("请选择房屋地址");
|
||||||
return false;
|
return false;
|
||||||
}
|
}else if(c == ""){
|
||||||
// else if(c == ""){
|
$.toast("请选择房屋类型");
|
||||||
// $.toast("请选择房屋类型");
|
return false;
|
||||||
// return false;
|
}else if(d == ""){
|
||||||
// }
|
|
||||||
else if(d == ""){
|
|
||||||
$.toast("请选择楼栋室号");
|
$.toast("请选择楼栋室号");
|
||||||
return false;
|
return false;
|
||||||
}
|
}else if(e == ""){
|
||||||
else if(e == "" || e.indexOf("所在楼层") != -1 || e.indexOf("总楼层") != -1){
|
$.toast("楼层不能为空!");
|
||||||
$.toast("请选择楼层");
|
return false;
|
||||||
return false;
|
}else if(e.indexOf("所在楼层")!= -1){
|
||||||
}
|
$.toast("所在楼层不能为空!");
|
||||||
else if(f == ""){
|
return false;
|
||||||
|
}else if(e.indexOf("总楼层")!= -1){
|
||||||
|
$.toast("总楼层不能为空!");
|
||||||
|
return false;
|
||||||
|
}else if(f == ""){
|
||||||
$.toast("请输入房屋面积");
|
$.toast("请输入房屋面积");
|
||||||
return false;
|
return false;
|
||||||
|
}else if(!$("#input_area").isPositiveFloat() || f=='0'){
|
||||||
|
$.toast("请输入正确的面积!")
|
||||||
|
return false
|
||||||
|
}else if(Number(f)<10 || Number(f)>1000){
|
||||||
|
$.toast("面积范围10-1000㎡");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(c && c.indexOf("别墅")>-1){
|
||||||
|
var num = e.replace(/第/g,"").replace(/层/g,"").replace(/共/g,"").split(" ");
|
||||||
|
if(parseInt(num[0])>parseInt(num[1])){
|
||||||
|
$.toast("总楼层选择错误!")
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if($("#cityAddress").val() != "" && $("#cityAddress").val() != $("#input_city").val()){
|
||||||
|
$.toast("城市和房屋地址不匹配")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
axios.get("/rest/index/checkAddress", {
|
||||||
|
params: {
|
||||||
|
city: $("#input_city").val(),
|
||||||
|
region:$("input[name=region]").val(),
|
||||||
|
name:$("#input_address").val(),
|
||||||
|
address:$("input[name=address]").val()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(function (response) {
|
||||||
|
if(response.data.data.success){
|
||||||
|
var district = response.data.data
|
||||||
|
$("#input_city").val(district.city)
|
||||||
|
$("input[name='address']").val(district.address)
|
||||||
|
$("input[name='name']").val(district.name)
|
||||||
|
$("input[name='region']").val(district.region)
|
||||||
|
$("#input_city").val(district.city)
|
||||||
|
addEvaluation();
|
||||||
|
}else{
|
||||||
|
// $("#nextBtn").attr("disabled", false)
|
||||||
|
console.log("error");
|
||||||
|
$.toast(result.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function addEvaluation(){
|
||||||
|
axios.get("/rest/index/checkEvalPrice", {
|
||||||
|
params: {
|
||||||
|
cityDisplay: $("#input_city").val(),
|
||||||
|
region:$("input[name=region]").val(),
|
||||||
|
district:$("#input_address").val(),
|
||||||
|
address:$("input[name=address]").val(),
|
||||||
|
estateType:$("#input_houseType").val(),
|
||||||
|
loudongName:$("#input_building").val(),
|
||||||
|
floorName:$("input[name=floorName]").val(),
|
||||||
|
floors:$("#input_floor").val(),
|
||||||
|
area:$("#input_area").val()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(function (response) {
|
||||||
|
if(response.data.data!=null && response.data.data.success){
|
||||||
|
alert("添加成功!");
|
||||||
|
}else{
|
||||||
|
$.toast(response.data.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/*$.ajax({
|
||||||
|
url:"${basePath}/fsh/checkEvalPrice",
|
||||||
|
dataType:'json',
|
||||||
|
data:$("form").serialize(),
|
||||||
|
success:function (data) {
|
||||||
|
console.log()
|
||||||
|
var str = "/house/add?city="+$("#input_city").val()+"®ion="+$("input[name=region]").val()+"&name="+$("#input_address").val()+"&address="+$("input[name=address]").val()+"&estateType="+$("#input_houseType").val()+"&building="+$("#input_building").val()+"&floors="+$("#input_floor").val()+"&area="+$("#input_area").val();
|
||||||
|
if(data.success){
|
||||||
|
$.showIndicator();
|
||||||
|
window.location.href="${basePath}/house/doEvaluation?id="+data.id+"&backUrl=${backUrl!}";
|
||||||
|
}else{
|
||||||
|
if (data.data == 0){
|
||||||
|
$.toast(data.message);
|
||||||
|
var sstr = "${basePath}/user/smsLogin";
|
||||||
|
console.log(sstr);
|
||||||
|
//window.location.href = sstr;
|
||||||
|
clicked(sstr,true);
|
||||||
|
}
|
||||||
|
if(data.message!=undefined && data.message!=""){
|
||||||
|
$.hidePreloader();
|
||||||
|
$.toast(data.message);
|
||||||
|
}else{
|
||||||
|
$.hidePreloader();
|
||||||
|
$.toast("该地址不支持估价!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error:function () {
|
||||||
|
$.toast("估价失败请重试!")
|
||||||
|
}
|
||||||
|
})*/
|
||||||
|
}
|
||||||
|
|
||||||
/* 信息输入弹窗 */
|
/* 信息输入弹窗 */
|
||||||
$(document).on('click','.open-modal', function () {
|
$(document).on('click','.open-modal', function () {
|
||||||
$.modal({
|
$.modal({
|
||||||
|
|||||||
@@ -0,0 +1,562 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<title>智能选房</title>
|
||||||
|
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
|
||||||
|
<link rel="shortcut icon" href="/favicon.ico">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
|
||||||
|
<link rel="stylesheet" href="../../css/main.css">
|
||||||
|
<link rel="stylesheet" href="../../css/theme-orange.css">
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.pstion{position:fixed;}
|
||||||
|
@media(max-width:414px){
|
||||||
|
.pstion{top:145px;}
|
||||||
|
}
|
||||||
|
@media(max-width:375px){
|
||||||
|
.pstion{top:136px;}
|
||||||
|
}
|
||||||
|
@media(max-width:320px){
|
||||||
|
.pstion{top:155px;}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="page-group">
|
||||||
|
<div class="page page-current">
|
||||||
|
<header class="bar bar-nav barBorder">
|
||||||
|
<button class="button button-link button-nav pull-left" onclick="back(),plus.nativeUI.closeWaiting();">
|
||||||
|
<span class="icon icon-left"></span>
|
||||||
|
</button>
|
||||||
|
<button class="button button-link button-nav pull-right" onclick="back(),plus.nativeUI.closeWaiting();">
|
||||||
|
地图
|
||||||
|
</button>
|
||||||
|
<h1 class="title">智能选房</h1>
|
||||||
|
</header>
|
||||||
|
<div class="content contentSuggest">
|
||||||
|
<p>匹配出满足需求的<em id="houseNum"></em>个小区,智能推荐以下最合适的:</p>
|
||||||
|
<div class="list-block media-list">
|
||||||
|
<div class="selectBox row">
|
||||||
|
<div class="region col-33 theme"><a>全部区域</a><i class="icon icon-down"></i></div>
|
||||||
|
<div class="filter col-33 theme"><a>小区标签</a><i class="icon icon-down"></i></div>
|
||||||
|
<div class="order col-33 theme"><a>智能排序</a><i class="icon icon-down"></i></div>
|
||||||
|
</div>
|
||||||
|
<div class="selectContent">
|
||||||
|
<div class="topic dn" id="select_region">
|
||||||
|
<div class="topicContent" style="padding:0.2rem 0.75rem;" id="regionDiv">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="topic dn" id="select_filter">
|
||||||
|
<div class="topicContent" style="padding:0.2rem 0.75rem;">
|
||||||
|
<p class="buttons-row buttons-row01 buttons-row01a theme">
|
||||||
|
<a class="button">近地铁</a>
|
||||||
|
<a class="button">公交多</a>
|
||||||
|
<a class="button">买菜做饭</a>
|
||||||
|
<a class="button">商超便利</a>
|
||||||
|
</p>
|
||||||
|
<p class="buttons-row buttons-row01 buttons-row01a theme">
|
||||||
|
<a class="button">爱逛街</a>
|
||||||
|
<a class="button">在外面吃</a>
|
||||||
|
<a class="button">近医疗</a>
|
||||||
|
<a class="button">近幼儿园</a>
|
||||||
|
</p>
|
||||||
|
<p class="buttons-row buttons-row01 buttons-row01a theme">
|
||||||
|
<a class="button">近小学</a>
|
||||||
|
<a class="button">近中学</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="content-block content-block01">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-50"><a href="#" class="button button-big button-fill theme reset_btn">重置</a></div>
|
||||||
|
<div class="col-50"><a href="#" class="button button-big button-fill theme confirm_btn">确定</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="list-block dn" id="select_order">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title theme active" data-id="1"><i class="icon icon-check"></i>智能排序</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title theme" data-id="2"><i class="icon"></i>距离优先</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title theme" data-id="3"><i class="icon"></i>均价优先</div>
|
||||||
|
<input type="hidden" id="lat">
|
||||||
|
<input type="hidden" id="lng">
|
||||||
|
<input type="hidden" id="city">
|
||||||
|
<input type="hidden" id="address">
|
||||||
|
<input type="hidden" id="areaTag">
|
||||||
|
<input type="hidden" id="travelTime">
|
||||||
|
<input type="hidden" id="minAvgPrice">
|
||||||
|
<input type="hidden" id="maxAvgPrice">
|
||||||
|
<input type="hidden" id="tag">
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="content infinite-scroll infinite-scroll-bottom pstion" data-distance="50">
|
||||||
|
<div class="list-block media-list">
|
||||||
|
<ul class="list-container" id="resultData">
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- 加载提示符 -->
|
||||||
|
<div class="infinite-scroll-preloader">
|
||||||
|
<div class="preloader"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="http://g.alicdn.com/sj/lib/zepto/zepto.js" charset="utf-8"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
/* 关闭路由,以实现不同页面之间的相互跳转(仅开发环境需要) */
|
||||||
|
Zepto = $
|
||||||
|
$.config = {router: false}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="../../js/light7.js" charset="utf-8"></script>
|
||||||
|
<script type="text/javascript" src="../../js/cn.js" charset="utf-8"></script>
|
||||||
|
<script type="text/javascript" src="../../js/mui.min.js" charset="utf-8"></script>
|
||||||
|
<script type="text/javascript" src="../../config.js"></script>
|
||||||
|
<script type="text/javascript" src="../../js/axios.min.js"></script>
|
||||||
|
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
|
||||||
|
<script type='text/javascript' src='../../js/common.js' charset='utf-8'></script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var lat = 31.2221;
|
||||||
|
var lng = 121.359204;
|
||||||
|
var city = "上海";
|
||||||
|
var address="广顺小区";
|
||||||
|
var travelTime=20;
|
||||||
|
var minAvgPrice=50000;
|
||||||
|
var maxAvgPrice=80000;
|
||||||
|
var areaTag=3;
|
||||||
|
var tag="近地铁_公交多_买菜做饭_商超便利_爱逛街_在外面吃_近医疗_近幼儿园_近小学_近中学";
|
||||||
|
var orderBy=0;
|
||||||
|
var dataObj = [];
|
||||||
|
|
||||||
|
function init(){
|
||||||
|
axios.get("/rest/intelligentHouse/aroundDetail", {
|
||||||
|
params: {
|
||||||
|
city: city,
|
||||||
|
lat:lat,
|
||||||
|
lng:lng,
|
||||||
|
address:address,
|
||||||
|
travelTime:travelTime,
|
||||||
|
minAvgPrice:minAvgPrice,
|
||||||
|
maxAvgPrice:maxAvgPrice,
|
||||||
|
areaTag:areaTag,
|
||||||
|
tag:tag,
|
||||||
|
orderBy:orderBy
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(function (response) {
|
||||||
|
$("#city").val(response.data.data.city);
|
||||||
|
$("#address").val(response.data.data.address);
|
||||||
|
$("#areaTag").val(response.data.data.areaTag);
|
||||||
|
$("#lng").val(response.data.data.lng);
|
||||||
|
$("#lat").val(response.data.data.lat);
|
||||||
|
$("#travelTime").val(response.data.data.travelTime);
|
||||||
|
$("#minAvgPrice").val(response.data.data.minAvgPrice);
|
||||||
|
$("#maxAvgPrice").val(response.data.data.maxAvgPrice);
|
||||||
|
$("#houseNum").text(response.data.data.houseNum);
|
||||||
|
dataObj = $.parseJSON(response.data.data.houseListJson);
|
||||||
|
//加载区域
|
||||||
|
var regionList = response.data.data.regionList;
|
||||||
|
console.log(regionList);
|
||||||
|
var html = '<p class="buttons-row buttons-row01 buttons-row01a theme"><a class="button active">不限</a>';
|
||||||
|
for(var i=0;i<regionList.length;i++){
|
||||||
|
if((i+1)%4 == 0){
|
||||||
|
html += '<p class="buttons-row buttons-row01 buttons-row01a theme">';
|
||||||
|
html += '<a class="button">'+regionList[i]+'</a>';
|
||||||
|
}else if((i+2)%4 == 0 || (i+1 == regionList.length)){
|
||||||
|
html += '<a class="button">'+regionList[i]+'</a>';
|
||||||
|
html += '</p>';
|
||||||
|
}else{
|
||||||
|
html += '<a class="button">'+regionList[i]+'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$("#regionDiv").html(html);
|
||||||
|
regionClick();
|
||||||
|
//预先加载20条
|
||||||
|
addItems(itemsPerLoad, 0);
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
init();
|
||||||
|
function turnMap(){
|
||||||
|
var city = $("#city").val();
|
||||||
|
var address = $("#address").val();
|
||||||
|
var areaTag = $("#areaTag").val();
|
||||||
|
var lng = $("#lng").val();
|
||||||
|
var lat = $("#lat").val();
|
||||||
|
var travelTime = $("#travelTime").val();
|
||||||
|
var minAvgPrice = $("#minAvgPrice").val();
|
||||||
|
var maxAvgPrice = $("#maxAvgPrice").val();
|
||||||
|
var obj = $("#select_filter .topicContent .button");
|
||||||
|
var tag = "";
|
||||||
|
$.each(obj, function(key, val) {
|
||||||
|
if(obj[key].className.indexOf("active")!=-1){
|
||||||
|
tag += "_"+obj[key].text;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
var url="${basePath}/intelligentHouse/mapDetail2?city="+city+"&areaTag="+areaTag+"&lng="+lng+"&lat="+lat+
|
||||||
|
"&travelTime="+travelTime+"&minAvgPrice="+minAvgPrice+"&maxAvgPrice="+maxAvgPrice+"&tag="+tag+"&address="+address;
|
||||||
|
clicked(url,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* 智能排序 */
|
||||||
|
$("#select_order li").on("click", function () {
|
||||||
|
$(this).parents("#select_order").find(".item-title").removeClass("active");
|
||||||
|
$(this).parents("#select_order").find(".item-title i").removeClass("icon-check");
|
||||||
|
$(this).find(".item-title").addClass("active");
|
||||||
|
$(this).find(".item-title i").addClass("icon-check");
|
||||||
|
$(".order a").text($(this).text());
|
||||||
|
//默认按距离
|
||||||
|
var select_order = $("#select_order").find(".active").attr("data-id");
|
||||||
|
var orderBy = 1;
|
||||||
|
if(select_order=="3"){
|
||||||
|
orderBy = 2;
|
||||||
|
}
|
||||||
|
var obj = $("#select_filter .topicContent .button");
|
||||||
|
var tag = "";
|
||||||
|
$.each(obj, function(key, val) {
|
||||||
|
if(obj[key].className.indexOf("active")!=-1){
|
||||||
|
tag += "_"+obj[key].text;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//区域
|
||||||
|
var region = $(".region a")[0].innerText;
|
||||||
|
if(region == "全部区域"){
|
||||||
|
region = "";
|
||||||
|
}
|
||||||
|
orderList(tag,orderBy,region);
|
||||||
|
$(".mask").hide();
|
||||||
|
$("#select_order").hide();
|
||||||
|
$(".order").removeClass("active");
|
||||||
|
$(".order i").removeClass("icon-up");
|
||||||
|
});
|
||||||
|
|
||||||
|
function regionClick(){
|
||||||
|
/* 全部区域 */
|
||||||
|
$("#select_region .button").on("click", function () {
|
||||||
|
$(this).parents("#select_region").find(".item-title").removeClass("active");
|
||||||
|
$(this).parents("#select_region").find(".item-title i").removeClass("icon-check");
|
||||||
|
$(this).find(".item-title").addClass("active");
|
||||||
|
$(this).find(".item-title i").addClass("icon-check");
|
||||||
|
a = $("#select_region li").eq(0).find(".item-title").hasClass("active");
|
||||||
|
if(a){
|
||||||
|
$(".region a").text("全部区域");
|
||||||
|
}else{
|
||||||
|
if($(this).text()=="不限"){
|
||||||
|
$(".region a").text("全部区域");
|
||||||
|
}else{
|
||||||
|
$(".region a").text($(this).text());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var select_order = $("#select_order").find(".active").attr("data-id");
|
||||||
|
var orderBy = 1;
|
||||||
|
if(select_order=="3"){
|
||||||
|
orderBy = 2;
|
||||||
|
}
|
||||||
|
var obj = $("#select_filter .topicContent .button");
|
||||||
|
var tag = "";
|
||||||
|
$.each(obj, function(key, val) {
|
||||||
|
if(obj[key].className.indexOf("active")!=-1){
|
||||||
|
tag += "_"+obj[key].text;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//区域
|
||||||
|
var region = $(this).text().trim();
|
||||||
|
if(region == "不限"){
|
||||||
|
region = "";
|
||||||
|
}
|
||||||
|
orderList(tag,orderBy,region);
|
||||||
|
$(this).parents("#select_region").find("a").removeClass("active");
|
||||||
|
$(".mask").hide();
|
||||||
|
$("#select_region").hide();
|
||||||
|
$(".region").removeClass("active");
|
||||||
|
$(".region i").removeClass("icon-up");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/* 小区标签&智能排序切换 */
|
||||||
|
|
||||||
|
$(".region").on("click", function () {
|
||||||
|
$(".mask").show();
|
||||||
|
$("#select_region").show();
|
||||||
|
$("#select_filter").hide();
|
||||||
|
$("#select_order").hide();
|
||||||
|
$(".region").addClass("active");
|
||||||
|
$(".region i").addClass("icon-up");
|
||||||
|
$(".filter").removeClass("active");
|
||||||
|
$(".filter i").removeClass("icon-up");
|
||||||
|
$(".order").removeClass("active");
|
||||||
|
$(".order i").removeClass("icon-up");
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".filter").on("click", function () {
|
||||||
|
$(".mask").show();
|
||||||
|
$("#select_region").hide();
|
||||||
|
$("#select_filter").show();
|
||||||
|
$("#select_order").hide();
|
||||||
|
$(".region").removeClass("active");
|
||||||
|
$(".region i").removeClass("icon-up");
|
||||||
|
$(".filter").addClass("active");
|
||||||
|
$(".filter i").addClass("icon-up");
|
||||||
|
$(".order").removeClass("active");
|
||||||
|
$(".order i").removeClass("icon-up");
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".order").on("click", function () {
|
||||||
|
$(".mask").show();
|
||||||
|
$("#select_region").hide();
|
||||||
|
$("#select_filter").hide();
|
||||||
|
$("#select_order").show();
|
||||||
|
$(".region").removeClass("active");
|
||||||
|
$(".region i").removeClass("icon-up");
|
||||||
|
$(".filter").removeClass("active");
|
||||||
|
$(".filter i").removeClass("icon-up");
|
||||||
|
$(".order").addClass("active");
|
||||||
|
$(".order i").addClass("icon-up");
|
||||||
|
});
|
||||||
|
/* 小区标签 */
|
||||||
|
$(".reset_btn").on("click", function () {
|
||||||
|
$(".button").removeClass("active");
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".confirm_btn").on("click", function () {
|
||||||
|
$(".mask").hide();
|
||||||
|
$("#select_filter").hide();
|
||||||
|
$(".filter").removeClass("active");
|
||||||
|
$(".filter i").removeClass("icon-up");
|
||||||
|
/*if($("#select_filter .button").hasClass("active")){
|
||||||
|
$(".filter").addClass("active");
|
||||||
|
}else{
|
||||||
|
$(".filter").removeClass("active");
|
||||||
|
}*/
|
||||||
|
var obj = $("#select_filter .topicContent .button");
|
||||||
|
var tag = "";
|
||||||
|
$.each(obj, function(key, val) {
|
||||||
|
if(obj[key].className.indexOf("active")!=-1){
|
||||||
|
tag += "_"+obj[key].text;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
var select_order = $("#select_order").find(".active").attr("data-id");
|
||||||
|
var orderBy = 1;
|
||||||
|
if(select_order=="3"){
|
||||||
|
orderBy = 2;
|
||||||
|
}
|
||||||
|
//区域
|
||||||
|
var region = $(".region a")[0].innerText;
|
||||||
|
if(region == "全部区域"){
|
||||||
|
region = "";
|
||||||
|
}
|
||||||
|
orderList(tag,orderBy,region);
|
||||||
|
});
|
||||||
|
|
||||||
|
$("body").delegate(".button","click",function(){
|
||||||
|
if($(this).hasClass("active")){
|
||||||
|
$(this).removeClass("active");
|
||||||
|
}else{
|
||||||
|
$(this).addClass("active");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/* 智能排序 */
|
||||||
|
$("#select_order li").on("click", function () {
|
||||||
|
$(this).parents("#select_order").find(".item-title").removeClass("active");
|
||||||
|
$(this).parents("#select_order").find(".item-title i").removeClass("icon-check");
|
||||||
|
$(this).find(".item-title").addClass("active");
|
||||||
|
$(this).find(".item-title i").addClass("icon-check");
|
||||||
|
$(".order a").text($(this).text());
|
||||||
|
$(".mask").hide();
|
||||||
|
$("#select_order").hide();
|
||||||
|
$(".order").removeClass("active");
|
||||||
|
$(".order i").removeClass("icon-up");
|
||||||
|
});
|
||||||
|
|
||||||
|
function orderList(tagStr,orderByStr,regionStr){
|
||||||
|
var cityStr = $("#city").val();
|
||||||
|
var areaTagStr = $("#areaTag").val();
|
||||||
|
var lngStr = $("#lng").val();
|
||||||
|
var latStr = $("#lat").val();
|
||||||
|
var travelTimeStr = $("#travelTime").val();
|
||||||
|
var minAvgPriceStr = $("#minAvgPrice").val();
|
||||||
|
var maxAvgPriceStr = $("#maxAvgPrice").val();
|
||||||
|
axios.get("/rest/intelligentHouse/getDistrictByTag", {
|
||||||
|
params: {
|
||||||
|
city:cityStr,
|
||||||
|
areaTag:areaTagStr,
|
||||||
|
lng:lngStr,
|
||||||
|
lat:latStr,
|
||||||
|
travelTime:travelTimeStr,
|
||||||
|
minAvgPrice:minAvgPriceStr,
|
||||||
|
maxAvgPrice:maxAvgPriceStr,
|
||||||
|
tag:tagStr,
|
||||||
|
orderBy:orderByStr,
|
||||||
|
region:regionStr
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(function (response) {
|
||||||
|
if(response.data.message){
|
||||||
|
$.toast(response.data.message);
|
||||||
|
}else{
|
||||||
|
var html="";
|
||||||
|
var result = response.data.data.data;
|
||||||
|
dataObj = result;
|
||||||
|
lastIndex = 0;
|
||||||
|
addItems(itemsPerLoad, 0)
|
||||||
|
if(result.length>10){
|
||||||
|
$(".infinite-scroll-preloader").show();
|
||||||
|
}else{
|
||||||
|
$(".infinite-scroll-preloader").hide();
|
||||||
|
}
|
||||||
|
lastIndex = $('.list-container li').length;
|
||||||
|
$("#houseNum").text(result.length);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
$.toast("查询失败");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/* 页面底部无限加载事件 */
|
||||||
|
$.init();
|
||||||
|
var loading = false;
|
||||||
|
// 最多可加载的条目
|
||||||
|
var maxItems = 100;
|
||||||
|
|
||||||
|
// 每次加载添加多少条目
|
||||||
|
var itemsPerLoad = 10;
|
||||||
|
function addItems(number, lastIndex) {
|
||||||
|
// 生成新条目的HTML
|
||||||
|
if(dataObj.length == 0) {
|
||||||
|
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||||
|
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||||
|
// 删除加载提示符
|
||||||
|
$('.infinite-scroll-preloader').remove();
|
||||||
|
$('.infinite-scroll-bottom .list-block ul ').html("<div style='text-align: center; line-height: 3rem;'></div>");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var html = '';
|
||||||
|
for(var i in dataObj){
|
||||||
|
if(i>=lastIndex){
|
||||||
|
if(dataObj.length<lastIndex + number){
|
||||||
|
var tags = dataObj[i].poiTags;
|
||||||
|
var tagStr = "";
|
||||||
|
if(tags){
|
||||||
|
for(var j=0;j<tags.length;j++){
|
||||||
|
if(j<3){
|
||||||
|
var tag = tags[j];
|
||||||
|
tagStr = tagStr + '<small class="small">'+tag+'</small>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
html += '<li>'+
|
||||||
|
"<a onclick=clicked('${basePath}/district/details?city="+dataObj[i].city+"®ion="+dataObj[i].district+"&name="+dataObj[i].name+"',true) class='external item-content'>"+
|
||||||
|
'<div class="item-inner">'+
|
||||||
|
'<div class="item-title-row"><div class="item-title">'+dataObj[i].name+'</div><div class="item-after"><em>¥'+dataObj[i].avgPrice+'元/㎡</em></div></div>'+
|
||||||
|
'<div class="item-title-row"><div class="item-title"><i class="icon icon-address03"></i><small>'+dataObj[i].city+dataObj[i].district+dataObj[i].address+'</small></div>'+
|
||||||
|
'<div class="item-after"><span>距您'+dataObj[i].distance+'m</span></div></div>';
|
||||||
|
if(tagStr){
|
||||||
|
html += '<div class="item-subtitle"><span class="tag">'+tagStr+'</span></div>';
|
||||||
|
}
|
||||||
|
html+='</div></a></li>'
|
||||||
|
}else{
|
||||||
|
if(i < lastIndex + number){
|
||||||
|
var tags = dataObj[i].poiTags;
|
||||||
|
var tagStr = "";
|
||||||
|
if(tags){
|
||||||
|
for(var j=0;j<tags.length;j++){
|
||||||
|
if(j<3){
|
||||||
|
var tag = tags[j];
|
||||||
|
tagStr = tagStr + '<small class="small">'+tag+'</small>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
html += '<li>'+
|
||||||
|
"<a onclick=clicked('${basePath}/district/details?city="+dataObj[i].city+"®ion="+dataObj[i].district+"&name="+dataObj[i].name+"',true) class='external item-content'>"+
|
||||||
|
'<div class="item-inner">'+
|
||||||
|
'<div class="item-title-row"><div class="item-title">'+dataObj[i].name+'</div><div class="item-after"><em>¥'+dataObj[i].avgPrice+'元/㎡</em></div></div>'+
|
||||||
|
'<div class="item-title-row"><div class="item-title"><i class="icon icon-address03"></i><small>'+dataObj[i].city+dataObj[i].district+dataObj[i].address+'</small></div>'+
|
||||||
|
'<div class="item-after"><span>距您'+dataObj[i].distance+'m</span></div></div>';
|
||||||
|
if(tagStr){
|
||||||
|
html += '<div class="item-subtitle"><span class="tag">'+tagStr+'</span></div>';
|
||||||
|
}
|
||||||
|
html+='</div></a></li>'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(dataObj.length<=(lastIndex + number)){
|
||||||
|
$(".infinite-scroll-preloader").hide();
|
||||||
|
}
|
||||||
|
// 添加新条目
|
||||||
|
if(lastIndex == 0){
|
||||||
|
$('.infinite-scroll-bottom .list-block ul').html(html);
|
||||||
|
}else{
|
||||||
|
$('.infinite-scroll-bottom .list-block ul').append(html);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 上次加载的序号
|
||||||
|
|
||||||
|
var lastIndex = 10;
|
||||||
|
|
||||||
|
// 注册'infinite'事件处理函数
|
||||||
|
$(document).on('infinite', '.infinite-scroll-bottom',function() {
|
||||||
|
|
||||||
|
// 如果正在加载,则退出
|
||||||
|
if (loading) return;
|
||||||
|
|
||||||
|
// 设置flag
|
||||||
|
loading = true;
|
||||||
|
|
||||||
|
// 模拟1s的加载过程
|
||||||
|
setTimeout(function() {
|
||||||
|
// 重置加载flag
|
||||||
|
loading = false;
|
||||||
|
/* if (lastIndex >= maxItems) {
|
||||||
|
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||||
|
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||||
|
// 删除加载提示符
|
||||||
|
$('.infinite-scroll-preloader').remove();
|
||||||
|
return;
|
||||||
|
} */
|
||||||
|
// 添加新条目
|
||||||
|
addItems(itemsPerLoad, lastIndex);
|
||||||
|
// 更新最后加载的序号
|
||||||
|
lastIndex = $('.list-block li').length;
|
||||||
|
//容器发生改变,如果是js滚动,需要刷新滚动
|
||||||
|
// $.refreshScroller();
|
||||||
|
}, 500);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,629 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<title>智能选房</title>
|
||||||
|
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
|
||||||
|
<link rel="shortcut icon" href="/favicon.ico">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
|
||||||
|
<link rel="stylesheet" href="../../css/main.css">
|
||||||
|
<link rel="stylesheet" href="../../css/theme-orange.css">
|
||||||
|
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=0a7eM0lkIvpKGPiq1bMCfeH7"></script>
|
||||||
|
<script type="text/javascript" src="http://api.map.baidu.com/library/RichMarker/1.2/src/RichMarker_min.js"></script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.bar .button{top:0;}
|
||||||
|
.bar-tab{height:auto;z-index:11000;}
|
||||||
|
.bar-tab ~ .content{bottom:2.2rem;}
|
||||||
|
.list-block ul:before,.list-block ul:after{height:0;}
|
||||||
|
.bar-tab .list-block{width:100%;position:absolute;left:0;bottom:0;}
|
||||||
|
.bar-tab .show01 .item-title{color:#999;font-size:0.75rem;}
|
||||||
|
.bar-tab .show01 .item-title em{color:#F18D00;font-size:0.75rem;}
|
||||||
|
.selectContent{width:100%;background:#fff;top:inherit;bottom:0;}
|
||||||
|
.topic{border:none;padding:0;margin:0;}
|
||||||
|
.topic .topicTitle{border-bottom:none;font-size:inherit;width:100%;}
|
||||||
|
.topic .topicContent > p:first-child{margin-top:0;}
|
||||||
|
.mask{top:2.2rem;}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="page-group">
|
||||||
|
<div class="page page-current">
|
||||||
|
<header class="bar bar-nav">
|
||||||
|
<button class="button button-link button-nav pull-left" onclick="back(),plus.nativeUI.closeWaiting();">
|
||||||
|
<span class="icon icon-left"></span>
|
||||||
|
</button>
|
||||||
|
<button class="button button-link button-nav pull-right" onclick="getAroundList()">
|
||||||
|
列表
|
||||||
|
</button>
|
||||||
|
<h1 class="title">智能选房</h1>
|
||||||
|
</header>
|
||||||
|
<nav class="bar bar-tab">
|
||||||
|
<div class="list-block media-list show01" id="districtShow01">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a onclick="getAroundList()" class="item-link item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title-row">
|
||||||
|
<div class="item-title">匹配出满足需求的<em id="houseNum"></em>个小区</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="list-block media-list show02 dn" id="districtShow02">
|
||||||
|
</div>
|
||||||
|
<div class="selectContent dn">
|
||||||
|
<div class="topic" id="select_filter">
|
||||||
|
<div class="topicTitle">小区标签筛选</div>
|
||||||
|
<div class="topicContent" style="padding:0.2rem 0.75rem;">
|
||||||
|
<p class="buttons-row buttons-row01 buttons-row01a theme">
|
||||||
|
<a class="button">近地铁</a>
|
||||||
|
<a class="button">公交多</a>
|
||||||
|
<a class="button">买菜做饭</a>
|
||||||
|
<a class="button">商超便利</a>
|
||||||
|
</p>
|
||||||
|
<p class="buttons-row buttons-row01 buttons-row01a theme">
|
||||||
|
<a class="button">爱逛街</a>
|
||||||
|
<a class="button">在外面吃</a>
|
||||||
|
<a class="button">近医疗</a>
|
||||||
|
<a class="button">近幼儿园</a>
|
||||||
|
</p>
|
||||||
|
<p class="buttons-row buttons-row01 buttons-row01a theme">
|
||||||
|
<a class="button">近小学</a>
|
||||||
|
<a class="button">近中学</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="content-block content-block01">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-50"><a href="#" class="button button-big button-fill theme reset_btn">重置</a></div>
|
||||||
|
<div class="col-50"><a href="#" class="button button-big button-fill theme confirm_btn">确定</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
<div class="mask dn"></div>
|
||||||
|
<div class="content">
|
||||||
|
<div class="districtMap01" id="map"></div>
|
||||||
|
<!--<img src="../../images/filter.png" class="filter_btn">
|
||||||
|
<div class="houseNum"><p>静安<br>55</p></div>
|
||||||
|
<div class="icon-house"></div>
|
||||||
|
<div class="icon-house" style="left:70%;"></div>-->
|
||||||
|
|
||||||
|
<img src="../../images/filter.png" class="filter_btn">
|
||||||
|
<input type="hidden" id="lat">
|
||||||
|
<input type="hidden" id="lng">
|
||||||
|
<input type="hidden" id="city">
|
||||||
|
<input type="hidden" id="address">
|
||||||
|
<input type="hidden" id="areaTag">
|
||||||
|
<input type="hidden" id="travelTime">
|
||||||
|
<input type="hidden" id="minAvgPrice">
|
||||||
|
<input type="hidden" id="maxAvgPrice">
|
||||||
|
<input type="hidden" id="tag">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="http://g.alicdn.com/sj/lib/zepto/zepto.js" charset="utf-8"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
/* 关闭路由,以实现不同页面之间的相互跳转(仅开发环境需要) */
|
||||||
|
Zepto = $
|
||||||
|
$.config = {router: false}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="../../js/light7.js" charset="utf-8"></script>
|
||||||
|
<script type="text/javascript" src="../../js/cn.js" charset="utf-8"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.bootcss.com/light7/0.4.3/js/light7.min.js" charset="utf-8"></script>
|
||||||
|
<script type="text/javascript" src="../../js/mui.min.js" charset="utf-8"></script>
|
||||||
|
<script type="text/javascript" src="../../config.js"></script>
|
||||||
|
<script type="text/javascript" src="../../js/axios.min.js"></script>
|
||||||
|
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
|
||||||
|
<script type='text/javascript' src='../../js/city-app.js?version=${version!}' charset='utf-8'></script>
|
||||||
|
<script type='text/javascript' src='../../js/common.js' charset='utf-8'></script>
|
||||||
|
<script type='text/javascript' src='../../js/validate.js' charset='utf-8'></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
//document.addEventListener('plusready', onPlusReady, false);
|
||||||
|
var lat = 31.2221;
|
||||||
|
var lng = 121.359204;
|
||||||
|
var city = "上海";
|
||||||
|
var address="广顺小区";
|
||||||
|
var outTime="20分钟";
|
||||||
|
var budget=500;
|
||||||
|
var area="90-110㎡";
|
||||||
|
var houseListJson=[]
|
||||||
|
|
||||||
|
//扩展API加载完毕,现在可以正常调用扩展API
|
||||||
|
/*function onPlusReady(){
|
||||||
|
var self = plus.webview.currentWebview();
|
||||||
|
houseStatus = self.houseStatus;
|
||||||
|
}*/
|
||||||
|
var mapConfig = {
|
||||||
|
isFirstLoad: true,
|
||||||
|
datas: {
|
||||||
|
// myIcon: "<div class='positionIcon'></div>",
|
||||||
|
myIcon: function (level) {
|
||||||
|
if(level != undefined && level > 1) {
|
||||||
|
var position = (level - 1) * -20;
|
||||||
|
return "<div class='icon-house' style='background-position-x: " + position + "px;'></div>"
|
||||||
|
} else {
|
||||||
|
return "<div class='icon-house'></div>"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
markers: [],
|
||||||
|
center: new BMap.Point(lng, lat),
|
||||||
|
zoom: 12,
|
||||||
|
zoomThreshold:16,//超过次阀值,显示详细信息
|
||||||
|
mapData: null,
|
||||||
|
curCity: null,
|
||||||
|
minZoom: 10,
|
||||||
|
maxZoom: 20,
|
||||||
|
hasCity: false,
|
||||||
|
},
|
||||||
|
requestParams:{
|
||||||
|
fileId: null,
|
||||||
|
cityName: null,
|
||||||
|
region: null,
|
||||||
|
minTotalPrice: null,
|
||||||
|
maxTotalPrice: null,
|
||||||
|
minPrice: null,
|
||||||
|
maxPrice: null,
|
||||||
|
estateType: null,
|
||||||
|
minHouseYear: null,
|
||||||
|
maxHouseYear: null,
|
||||||
|
minArea: null,
|
||||||
|
maxArea: null
|
||||||
|
},
|
||||||
|
init: function (map) {
|
||||||
|
//启用滚轮放大缩小
|
||||||
|
if(map) {
|
||||||
|
this.mapObj = map;
|
||||||
|
} else {
|
||||||
|
this.mapObj = new BMap.Map("map", {minZoom:this.datas.minZoom,maxZoom:this.datas.maxZoom})
|
||||||
|
}
|
||||||
|
this.mapObj.enableScrollWheelZoom();
|
||||||
|
this.mapObj.centerAndZoom(this.datas.center, this.datas.zoom);
|
||||||
|
var that = this;
|
||||||
|
|
||||||
|
that.addMapControl();
|
||||||
|
mapConfig.loadCountMapData(true);
|
||||||
|
this.mapObj.addEventListener("zoomend", function() {
|
||||||
|
var map = that.mapObj
|
||||||
|
that.datas.zoom = map.getZoom()
|
||||||
|
var city = map.getCurrentCity().name.replace("市", '')
|
||||||
|
if(map.getZoom() >= that.datas.zoomThreshold) {
|
||||||
|
that.clearOverlays()
|
||||||
|
that.loadDetailMapData()
|
||||||
|
} else if(map.getZoom() < that.datas.zoomThreshold) {
|
||||||
|
that.clearOverlays()
|
||||||
|
that.loadCountMapData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
serializeParams: function () {
|
||||||
|
var params = this.requestParams;
|
||||||
|
params.lat = lat;
|
||||||
|
params.lng = lng;
|
||||||
|
params.houseList= houseListJson;
|
||||||
|
params.city= city;
|
||||||
|
return params;
|
||||||
|
},
|
||||||
|
addMapControl: function (reload) {
|
||||||
|
var scaleControl = new BMap.ScaleControl({
|
||||||
|
anchor : BMAP_ANCHOR_BOTTOM_LEFT
|
||||||
|
});
|
||||||
|
scaleControl.setUnit(BMAP_UNIT_METRIC);
|
||||||
|
this.mapObj.addControl(scaleControl);
|
||||||
|
var navControl = new BMap.NavigationControl({
|
||||||
|
anchor : BMAP_ANCHOR_TOP_LEFT,
|
||||||
|
type : BMAP_NAVIGATION_CONTROL_LARGE
|
||||||
|
});
|
||||||
|
this.mapObj.addControl(navControl);
|
||||||
|
},
|
||||||
|
loadDetailMapData: function (reload) {
|
||||||
|
var params = this.serializeParams()
|
||||||
|
var that = this
|
||||||
|
this.clearOverlays()
|
||||||
|
var houseList = $.parseJSON(params.houseList)
|
||||||
|
$.each(houseList, function (index, val) {
|
||||||
|
var icon = that.datas.myIcon(val.level)
|
||||||
|
var marker = new BMapLib.RichMarker(icon, new BMap.Point(val.lng, val.lat));
|
||||||
|
that._addClickListener(marker, val)
|
||||||
|
that.addPoint(marker)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
loadCountMapData: function (reload) {
|
||||||
|
var params = this.serializeParams()
|
||||||
|
var that = this
|
||||||
|
this.clearOverlays()
|
||||||
|
var map = {};
|
||||||
|
var houseList = $.parseJSON(params.houseList)
|
||||||
|
$.each(houseList, function (index, val) {
|
||||||
|
if(map[val.district]!=undefined && map[val.district]!=null){
|
||||||
|
var value = map[val.district];
|
||||||
|
map[val.district]=value+1;
|
||||||
|
}else{
|
||||||
|
map[val.district]=1;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
for(var i in map){
|
||||||
|
that._showCountWin(that.mapObj, i, i + "<br>"+map[i])
|
||||||
|
}
|
||||||
|
//下面列表数据变换
|
||||||
|
$("#districtShow01").show();
|
||||||
|
$("#districtShow02").hide();
|
||||||
|
},
|
||||||
|
setCenter: function (center) {
|
||||||
|
if(center) {
|
||||||
|
if(center instanceof BMap.Point) {
|
||||||
|
this.datas.center = center
|
||||||
|
this.mapObj.centerAndZoom(center, this.datas.zoom);
|
||||||
|
} else if(typeof center === 'string') {
|
||||||
|
if(cities[center]) {
|
||||||
|
this.datas.center = cities[center]
|
||||||
|
}
|
||||||
|
this.mapObj.centerAndZoom(center, this.datas.zoom);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
_addClickListener: function (marker, data) {
|
||||||
|
var that = this
|
||||||
|
marker.addEventListener("click", function(e) {
|
||||||
|
var position = e.target._position
|
||||||
|
var mp = that.mapObj
|
||||||
|
//重新移动中心点
|
||||||
|
var pixel = mp.pointToPixel(position);
|
||||||
|
pixel.y = pixel.y-150;
|
||||||
|
var newCenterPoint = mp.pixelToPoint(pixel);
|
||||||
|
mp.centerAndZoom(newCenterPoint, that.datas.zoom);
|
||||||
|
$('.icon-house01').each(function (i) {
|
||||||
|
$(this).attr('class', "icon-house");
|
||||||
|
})
|
||||||
|
this._container.children[0].className = "icon-house01";
|
||||||
|
var html="";
|
||||||
|
html += '<ul><li>'+
|
||||||
|
"<a onclick=clicked('${basePath}/district/details?city="+data.city+"®ion="+data.district+"&name="+data.name+"',true) class='external item-content'>"+
|
||||||
|
'<div class="item-inner">'+
|
||||||
|
'<div class="item-title-row"><div class="item-title">'+data.name+'</div><div class="item-after"><em>¥'+data.avgPrice+'元/㎡</em></div></div>'+
|
||||||
|
'<div class="item-title-row"><div class="item-title"><i class="icon icon-address03"></i><small>'+data.city+data.district+data.address+'</small></div>'+
|
||||||
|
'<div class="item-after"><span>距您'+data.distance+'m</span></div></div><div class="item-subtitle"><span class="tag">';
|
||||||
|
var count = 0;
|
||||||
|
for(var i in data.poiTags){
|
||||||
|
if(count<3){
|
||||||
|
html+='<small class="small">'+data.poiTags[i]+'</small>';
|
||||||
|
}
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
html+='</span></div></div></a></li>'
|
||||||
|
html+='</div></div></a></li></ul>';
|
||||||
|
$("#districtShow01").hide();
|
||||||
|
$("#districtShow02").show();
|
||||||
|
$("#districtShow02").html(html);
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
_showDetailWin: function(mp, point, popWinHtml) {
|
||||||
|
// var mp = this.map;
|
||||||
|
function ComplexCustomOverlay(point, text){
|
||||||
|
this._point = point;
|
||||||
|
this._text = text;
|
||||||
|
}
|
||||||
|
ComplexCustomOverlay.prototype = new BMap.Overlay();
|
||||||
|
ComplexCustomOverlay.prototype.initialize = function(map){
|
||||||
|
this._map = map;
|
||||||
|
var div = this._div = document.createElement("div");
|
||||||
|
$(div).attr("id", "popWin")
|
||||||
|
// $(div).attr("style", "position:absolute;background:#fff;box-shadow: 1px 1px 5px rgba(93,93,93,0.75);border-radius: 5px;z-index:"+BMap.Overlay.getZIndex(this._point.lat));
|
||||||
|
$(div).attr("style", "position:absolute;background:#fff;box-shadow: 1px 1px 5px rgba(93,93,93,0.75);border-radius: 5px;");
|
||||||
|
$(div).append(popWinHtml)
|
||||||
|
mp.getPanes().labelPane.appendChild(div);
|
||||||
|
return div;
|
||||||
|
}
|
||||||
|
ComplexCustomOverlay.prototype.draw = function(){
|
||||||
|
var map = this._map;
|
||||||
|
var pixel = map.pointToOverlayPixel(this._point);
|
||||||
|
this._div.style.left = pixel.x - 2 + "px";
|
||||||
|
this._div.style.top = pixel.y - $(this._div).height() + "px";
|
||||||
|
}
|
||||||
|
mp.addOverlay(new ComplexCustomOverlay(point, popWinHtml));
|
||||||
|
},
|
||||||
|
clearOverlays: function () {
|
||||||
|
this.datas.markers = []
|
||||||
|
this.mapObj.clearOverlays();
|
||||||
|
this.showDistrict(this.mapObj, address);
|
||||||
|
},
|
||||||
|
addPoint: function (point, level) {
|
||||||
|
if(point) {
|
||||||
|
if(point instanceof BMap.Point) {
|
||||||
|
var pointIcon = this.datas.myIcon()
|
||||||
|
var marker = new BMapLib.RichMarker(pointIcon, point);
|
||||||
|
this.addPoint(marker)
|
||||||
|
} else if(point instanceof BMapLib.RichMarker || point instanceof BMap.Marker) {
|
||||||
|
this.datas.markers.push(point);
|
||||||
|
this.mapObj.addOverlay(point);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showDistrict: function (mp, text) {
|
||||||
|
var that = this
|
||||||
|
// 编写自定义函数,创建标注
|
||||||
|
var marker = new BMap.Marker(this.datas.center);
|
||||||
|
var point = new BMap.Point(lng, lat);
|
||||||
|
function CountOverlay(city, text){
|
||||||
|
this._city = city;
|
||||||
|
this._point = point;
|
||||||
|
this._text = text;
|
||||||
|
}
|
||||||
|
|
||||||
|
CountOverlay.prototype = new BMap.Overlay();
|
||||||
|
CountOverlay.prototype.initialize = function(map){
|
||||||
|
//this._map = this.mapObj;
|
||||||
|
var div = this._div = document.createElement("div");
|
||||||
|
div.style.position = "absolute";
|
||||||
|
div.style.zIndex = BMap.Overlay.getZIndex(20000);
|
||||||
|
div.style.backgroundColor = "grey";
|
||||||
|
div.style.border = "1px solid grey";
|
||||||
|
div.style.color = "white";
|
||||||
|
div.style.height = "25px";
|
||||||
|
div.style.padding = "2px";
|
||||||
|
div.style.lineHeight = "18px";
|
||||||
|
div.style.whiteSpace = "nowrap";
|
||||||
|
div.style.MozUserSelect = "none";
|
||||||
|
div.style.fontSize = "12px";
|
||||||
|
div.style.cursor = "pointer";
|
||||||
|
var span = this._span = document.createElement("span");
|
||||||
|
span.style.lineHeight = "inherit";
|
||||||
|
span.style.minWidth = "25px";
|
||||||
|
span.style.textAlign = "center";
|
||||||
|
div.appendChild(span);
|
||||||
|
span.appendChild(document.createTextNode(this._text));
|
||||||
|
var arrow = this._arrow = document.createElement("div");
|
||||||
|
arrow.style.position = "absolute";
|
||||||
|
arrow.style.width = "11px";
|
||||||
|
arrow.style.height = "10px";
|
||||||
|
arrow.style.top = "24px";
|
||||||
|
arrow.style.left = "28px";
|
||||||
|
arrow.style.overflow = "hidden";
|
||||||
|
div.appendChild(arrow);
|
||||||
|
|
||||||
|
mp.getPanes().labelPane.appendChild(div);
|
||||||
|
return div;
|
||||||
|
}
|
||||||
|
|
||||||
|
CountOverlay.prototype.draw = function(){
|
||||||
|
//var map = this._map;
|
||||||
|
var pixel = mp.pointToOverlayPixel(this._point);
|
||||||
|
this._div.style.left = pixel.x - parseInt(this._arrow.style.left) - 13 + "px";
|
||||||
|
this._div.style.top = pixel.y - 60 + "px";
|
||||||
|
}
|
||||||
|
|
||||||
|
mp.addOverlay(new CountOverlay(city, text));
|
||||||
|
marker.disableMassClear();
|
||||||
|
mp.addOverlay(marker);
|
||||||
|
},
|
||||||
|
_showCountWin: function (mp, region, text) {
|
||||||
|
var localSearch = new BMap.LocalSearch(mp);
|
||||||
|
localSearch.setSearchCompleteCallback(function (searchResult) {
|
||||||
|
var poi = searchResult.getPoi(0);
|
||||||
|
var lng = poi.point.lng;
|
||||||
|
var lat = poi.point.lat;
|
||||||
|
|
||||||
|
var point = new BMap.Point(lng,lat)
|
||||||
|
|
||||||
|
var that = this
|
||||||
|
function CountOverlay(region, text){
|
||||||
|
this._region = region;
|
||||||
|
this._point = point;
|
||||||
|
this._text = text;
|
||||||
|
}
|
||||||
|
CountOverlay.prototype = new BMap.Overlay();
|
||||||
|
CountOverlay.prototype.initialize = function(map){
|
||||||
|
this._map = map;
|
||||||
|
var div = this._div = document.createElement("div");
|
||||||
|
div.setAttribute("id", "regionCount")
|
||||||
|
//div.setAttribute("onclick", "showDetail("+lng+","+lat+","+mp+")")
|
||||||
|
//div.style.zIndex = BMap.Overlay.getZIndex(this._point.lat);
|
||||||
|
div.style.zIndex = 1000;
|
||||||
|
div.style.width = "3.5rem";
|
||||||
|
div.style.height = "3.5rem";
|
||||||
|
div.style.border = "solid 2px #fff";
|
||||||
|
div.style.borderRadius = "100%";
|
||||||
|
div.style.background = "#f74949";
|
||||||
|
div.style.opacity = "0.9";
|
||||||
|
div.style.position = "absolute";
|
||||||
|
//div.style.left = "40%";
|
||||||
|
//div.style.top = "20%";
|
||||||
|
var p = this._p = document.createElement("p");
|
||||||
|
p.style.color = "#fff";
|
||||||
|
p.style.fontSize = "0.75rem"
|
||||||
|
p.style.textAlign = "center"
|
||||||
|
p.style.lineHeight = "1rem";
|
||||||
|
div.appendChild(p);
|
||||||
|
$(p).append($('<div>'+this._text+'</div>'));
|
||||||
|
|
||||||
|
div.addEventListener('click', function(e){
|
||||||
|
mp.centerAndZoom(city+region, map.getZoom() + 2);
|
||||||
|
})
|
||||||
|
div.addEventListener("touchstart",function(e){
|
||||||
|
mp.centerAndZoom(city+region, map.getZoom() + 2);
|
||||||
|
})
|
||||||
|
mp.getPanes().labelPane.appendChild(div);
|
||||||
|
|
||||||
|
return div;
|
||||||
|
}
|
||||||
|
|
||||||
|
CountOverlay.prototype.draw = function(){
|
||||||
|
var map = this._map;
|
||||||
|
var pixel = map.pointToOverlayPixel(this._point);
|
||||||
|
this._div.style.left = pixel.x - 41 + "px";
|
||||||
|
this._div.style.top = pixel.y - 60 + "px";
|
||||||
|
}
|
||||||
|
|
||||||
|
mp.addOverlay(new CountOverlay(city, text));
|
||||||
|
});
|
||||||
|
localSearch.search(region);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
axios.get("/rest/intelligentHouse/mapDetail", {
|
||||||
|
params: {
|
||||||
|
city: city,
|
||||||
|
lat:lat,
|
||||||
|
lng:lng,
|
||||||
|
address:address,
|
||||||
|
outTime:outTime,
|
||||||
|
budget:budget,
|
||||||
|
area:area
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(function (response) {
|
||||||
|
console.log(response)
|
||||||
|
houseListJson = response.data.data.houseListJson;
|
||||||
|
$("#city").val(response.data.data.city);
|
||||||
|
$("#address").val(response.data.data.address);
|
||||||
|
$("#areaTag").val(response.data.data.areaTag);
|
||||||
|
$("#lng").val(response.data.data.lng);
|
||||||
|
$("#lat").val(response.data.data.lat);
|
||||||
|
$("#travelTime").val(response.data.data.travelTime);
|
||||||
|
$("#minAvgPrice").val(response.data.data.minAvgPrice);
|
||||||
|
$("#maxAvgPrice").val(response.data.data.maxAvgPrice);
|
||||||
|
$("#houseNum").text(response.data.data.houseNum);
|
||||||
|
mapConfig.init()
|
||||||
|
$('#map').on('click', ".positionBox .close", function (e) {
|
||||||
|
mapConfig.hidePopWin()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
function getAroundList(){
|
||||||
|
var city = $("#city").val();
|
||||||
|
var address = $("#address").val();
|
||||||
|
var areaTag = $("#areaTag").val();
|
||||||
|
var lng = $("#lng").val();
|
||||||
|
var lat = $("#lat").val();
|
||||||
|
var travelTime = $("#travelTime").val();
|
||||||
|
var minAvgPrice = $("#minAvgPrice").val();
|
||||||
|
var maxAvgPrice = $("#maxAvgPrice").val();
|
||||||
|
|
||||||
|
var obj = $("#select_filter .topicContent .button");
|
||||||
|
var tag = "";
|
||||||
|
$.each(obj, function(key, val) {
|
||||||
|
if(obj[key].className.indexOf("active")!=-1){
|
||||||
|
tag += "_"+obj[key].text;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
mui.openWindow({
|
||||||
|
url: 'aroundDetail.html',
|
||||||
|
id:'aroundDetail.html',
|
||||||
|
extras:{
|
||||||
|
city:city,
|
||||||
|
address:address,
|
||||||
|
areaTag:areaTag,
|
||||||
|
lng:lng,
|
||||||
|
lat:lat,
|
||||||
|
travelTime:travelTime,
|
||||||
|
minAvgPrice:minAvgPrice,
|
||||||
|
maxAvgPrice:maxAvgPrice,
|
||||||
|
tag:tag,
|
||||||
|
orderBy:0
|
||||||
|
}
|
||||||
|
});
|
||||||
|
/*var url = "${basePath}/intelligentHouse/aroundDetail?city="+city+"&areaTag="+areaTag+"&lng="+lng+"&lat="+lat+
|
||||||
|
"&travelTime="+travelTime+"&minAvgPrice="+minAvgPrice+"&maxAvgPrice="+maxAvgPrice+"&tag="+tag+"&orderBy=0"+"&address="+address;
|
||||||
|
clicked(url,true);*/
|
||||||
|
}
|
||||||
|
/* 点击图标出现小区信息 */
|
||||||
|
function turnMap(){
|
||||||
|
var city = $("#city").val();
|
||||||
|
var address = $("#address").val();
|
||||||
|
var areaTag = $("#areaTag").val();
|
||||||
|
var lng = $("#lng").val();
|
||||||
|
var lat = $("#lat").val();
|
||||||
|
var travelTime = $("#travelTime").val();
|
||||||
|
var minAvgPrice = $("#minAvgPrice").val();
|
||||||
|
var maxAvgPrice = $("#maxAvgPrice").val();
|
||||||
|
var obj = $("#select_filter .topicContent .button");
|
||||||
|
var tag = "";
|
||||||
|
$.each(obj, function(key, val) {
|
||||||
|
if(obj[key].className.indexOf("active")!=-1){
|
||||||
|
tag += "_"+obj[key].text;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
axios.get("/rest/intelligentHouse/mapDetail2", {
|
||||||
|
params: {
|
||||||
|
city: city,
|
||||||
|
areaTag:areaTag,
|
||||||
|
lat:lat,
|
||||||
|
lng:lng,
|
||||||
|
address:address,
|
||||||
|
travelTime:travelTime,
|
||||||
|
minAvgPrice:minAvgPrice,
|
||||||
|
maxAvgPrice:maxAvgPrice,
|
||||||
|
tag:tag
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(function (response) {
|
||||||
|
houseListJson = response.data.data.houseListJson;
|
||||||
|
$("#houseNum").text(response.data.data.houseNum);
|
||||||
|
mapConfig.init();
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
|
||||||
|
/*window.location.href="../intelligentHouse/mapDetail2?city="+city+"&areaTag="+areaTag+"&lng="+lng+"&lat="+lat+
|
||||||
|
"&travelTime="+travelTime+"&minAvgPrice="+minAvgPrice+"&maxAvgPrice="+maxAvgPrice+"&tag="+tag+"&address="+address;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 小区标签筛选 */
|
||||||
|
$(".filter_btn").on("click", function () {
|
||||||
|
$(".selectContent").show();
|
||||||
|
$(".mask").show();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".reset_btn").on("click", function () {
|
||||||
|
$(".button").removeClass("active");
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".confirm_btn,.mask").on("click", function () {
|
||||||
|
$(".selectContent").hide();
|
||||||
|
$(".mask").hide();
|
||||||
|
turnMap();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("body").delegate(".button","click",function(){
|
||||||
|
if($(this).hasClass("active")){
|
||||||
|
$(this).removeClass("active");
|
||||||
|
}else{
|
||||||
|
$(this).addClass("active");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/* 地图 */
|
||||||
|
/*$(document).ready(function(){
|
||||||
|
// 百度地图API功能
|
||||||
|
var map0 = new BMap.Map("map");
|
||||||
|
var point0 = new BMap.Point(lng, lat);
|
||||||
|
map0.centerAndZoom(point0, 17);
|
||||||
|
map0.enableScrollWheelZoom(true); // 开启鼠标滚轮缩放
|
||||||
|
});*/
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -194,11 +194,11 @@
|
|||||||
<div class="item-title theme" data-id="4"><i class="icon"></i>按跌幅排序</div>
|
<div class="item-title theme" data-id="4"><i class="icon"></i>按跌幅排序</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="item-content">
|
<!--<li class="item-content">
|
||||||
<div class="item-inner">
|
<div class="item-inner">
|
||||||
<div class="item-title theme" data-id="5"><i class="icon"></i>租金回报率排序</div>
|
<div class="item-title theme" data-id="5"><i class="icon"></i>租金回报率排序</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>-->
|
||||||
<li class="item-content">
|
<li class="item-content">
|
||||||
<div class="item-inner">
|
<div class="item-inner">
|
||||||
<div id="indexOrder" class="item-title theme" data-id="6"><i class="icon"></i>按潜力指数</div>
|
<div id="indexOrder" class="item-title theme" data-id="6"><i class="icon"></i>按潜力指数</div>
|
||||||
@@ -262,8 +262,8 @@
|
|||||||
<div class="city-list01">
|
<div class="city-list01">
|
||||||
<span class="city-letter" id="Hot">热门城市</span>
|
<span class="city-letter" id="Hot">热门城市</span>
|
||||||
<div>
|
<div>
|
||||||
<p class="close-popup collectionCity">北京<i class="icon-collection03"></i></p>
|
<p class="close-popup">北京<i></i></p>
|
||||||
<p class="close-popup collectionCity">上海<i class="icon-collection03"></i></p>
|
<p class="close-popup">上海<i></i></p>
|
||||||
<p class="close-popup">广州<i></i></p>
|
<p class="close-popup">广州<i></i></p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||