找回小区详情代码
This commit is contained in:
@@ -340,7 +340,6 @@ function addItems(number, lastIndex) {
|
||||
}
|
||||
}).then(function (response) {
|
||||
var totalCount = response.data.data.totalCount
|
||||
alert(totalCount);
|
||||
baseInfo.matchCount = totalCount
|
||||
|
||||
var datas = response.data.data.ret
|
||||
|
||||
@@ -99,6 +99,7 @@ Vue.component('base-info-component', {
|
||||
loadDistrictInfo:function(){
|
||||
axios.get("/rest/districts/detail", {
|
||||
params: {
|
||||
rid:rid,
|
||||
city: city,
|
||||
region:region,
|
||||
name: name
|
||||
@@ -107,6 +108,12 @@ Vue.component('base-info-component', {
|
||||
var vo = response.data.data.detail
|
||||
var cityPrice = response.data.data.cityPrice
|
||||
var collected = response.data.data.collected
|
||||
var sr = response.data.data.substitutionResult
|
||||
var hs = response.data.data.houseSubstitution;
|
||||
var house = response.data.data.houseInfo;
|
||||
if(hs && sr){
|
||||
addSubstitution(sr, hs, house);
|
||||
}
|
||||
if(cityPrice){
|
||||
baseInfo.cityPrice = cityPrice
|
||||
}
|
||||
@@ -246,3 +253,55 @@ function getStarContent(starScore){
|
||||
return html;
|
||||
}
|
||||
|
||||
function addSubstitution(sr, hs, house){
|
||||
var s = "购买 "+sr.name;
|
||||
if(sr.intentionArea==0){
|
||||
s += "50平米以下"
|
||||
}else if(sr.intentionArea==1){
|
||||
s += "50-70平米"
|
||||
}else if(sr.intentionArea==2){
|
||||
s += "70-90平米"
|
||||
}else if(sr.intentionArea==3){
|
||||
s += "90-110平米"
|
||||
}else if(sr.intentionArea==4){
|
||||
s += "110-150平米"
|
||||
}else if(sr.intentionArea==5){
|
||||
s += "150-200平米"
|
||||
}else if(sr.intentionArea==6){
|
||||
s += "200-300平米"
|
||||
}else if(sr.intentionArea==7){
|
||||
s += "300平米以上"
|
||||
}
|
||||
s += "的房子,总价预计约为"
|
||||
if(sr.intentionArea==0){
|
||||
s += parseInt(sr.maxTotalPrice/10000)+"万以内"
|
||||
}else if(sr.intentionArea==7){
|
||||
s += parseInt(sr.minTotalPrice/10000)+"万以上"
|
||||
}else{
|
||||
s += parseInt(sr.minTotalPrice/10000)+"-"+parseInt(sr.maxTotalPrice/10000)+"万"
|
||||
}
|
||||
|
||||
|
||||
var soufu_min=((sr.minTotalPrice * hs.shoufu/100)/10000)
|
||||
var soufu_max=((sr.maxTotalPrice * hs.shoufu/100)/10000)
|
||||
var initPrice = 0;
|
||||
if(hs.substitutionType==1){
|
||||
initPrice = hs.curMoney + house.totalPrice/10000;
|
||||
}else if(hs.substitutionType==0){
|
||||
initPrice = hs.curMoney
|
||||
}
|
||||
|
||||
if(initPrice < soufu_min){
|
||||
s +=",资金缺口约为"+((soufu_min-initPrice)-(soufu_max-initPrice))+"万";
|
||||
}else if(initPrice > soufu_min && initPrice < soufu_max){
|
||||
s += ",资金缺口约为"+(soufu_max-initPrice)+"万";
|
||||
}else if(initPrice > soufu_max){
|
||||
s += "。";
|
||||
}
|
||||
|
||||
// <#if advertisement?? && advertisement.content?? && advertisement.content?length gt 0>
|
||||
// <a <#if advertisement.link?? && advertisement.link?length gt 0>onclick="openUrl('${basePath}/message/openView?url=${basePath}/mad/adUrlLoad?adid=${advertisement.id!?c}')"</#if> ><#if advertisement.content??>${advertisement.content!}</#if><i class="icon icon-right icon-right01"></i></a></p>
|
||||
// </#if>
|
||||
$("#suggestDiv").text(s);
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,10 @@
|
||||
<h1 class="title">{{name}}</h1>
|
||||
</header>
|
||||
<div class="content">
|
||||
<div class="topBg topBg02" id="suggestDiv">
|
||||
<p>购买 龙盛佳苑 90-110㎡ 的房子,总价预计约为<em>587-717万</em>。<br><a href="">查看详情<i class="icon icon-right icon-right01"></i></a></p>
|
||||
</div>
|
||||
|
||||
<div class="list-block media-list topList">
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
Reference in New Issue
Block a user