|
|
|
@@ -39,14 +39,14 @@
|
|
|
|
|
<div class="content" >
|
|
|
|
|
<div class="buttons-tab theme" id="tabCityDiv" >
|
|
|
|
|
<a href="#tabQuotation1" class="tab-link active button">全国</a>
|
|
|
|
|
<div v-for="o in citys">
|
|
|
|
|
<a v-bind:href="o.hrefId" class="tab-link button" @click="clickCity(o.hrefId)">{{o.city}}</a>
|
|
|
|
|
<div v-for="mycollectcity in citys" >
|
|
|
|
|
<a class="tab-link button" @click="clickCity(mycollectcity)" v-bind:vcity="mycollectcity">{{mycollectcity}}</a>
|
|
|
|
|
</div>
|
|
|
|
|
<a href="#tabQuotation0" class="tab-link button">添加</a>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="tabs">
|
|
|
|
|
<div id="tabQuotation1" class="tab active">
|
|
|
|
|
<div id="tabQuotation1" class="tab active">
|
|
|
|
|
<div class="card cardPrice cardPrice01 cardCity" id="countryInfo">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<label>全国</label>
|
|
|
|
@@ -167,92 +167,92 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="contentTabDiv">
|
|
|
|
|
<div class="tab" v-for="(myCityMap,index) in cityDatas">
|
|
|
|
|
<div class="card cardPrice cardPrice01 cardCity01" v-bind:hrefid="myCityMap.hrefId">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<label>{{myCityMap.city}}</label>
|
|
|
|
|
<a v-if="myCityMap.colled" class="button collection collection02 " @click="collectCity(myCityMap.city, index)">取消</a>
|
|
|
|
|
<a v-else class="button theme collection collection01" @click="collectCity(myCityMap.city, index)">关注</a>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<span>当前参考均价</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-content">
|
|
|
|
|
<div class="card-content-inner" v-if="myCityMap.cityTopMonthAvgPrice > 0">{{myCityMap.cityTopMonthAvgPrice}}<span>元/㎡</span></div>
|
|
|
|
|
<div class="card-content-inner" v-else>暂无</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-footer">
|
|
|
|
|
<span v-if="myCityMap.oneMonthUpDownRange >= 0">
|
|
|
|
|
<em><strong>{{myCityMap.oneMonthUpDownRange}}</strong>%<i class="icon icon-arrow-red"></i></em>
|
|
|
|
|
<label>近30天涨跌幅</label>
|
|
|
|
|
|
|
|
|
|
<div id="cityInfo" class="dn">
|
|
|
|
|
<div class="card cardPrice cardPrice01 cardCity01" v-bind:hrefid="myCityMap.hrefId">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<label>{{myCityMap.city}}</label>
|
|
|
|
|
<a v-if="collecd" class="button collection collection02 " @click="collectCity(myCityMap.city)">取消</a>
|
|
|
|
|
<a v-else class="button theme collection collection01" @click="collectCity(myCityMap.city)">关注</a>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<span>当前参考均价</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-content">
|
|
|
|
|
<div class="card-content-inner" v-if="myCityMap.cityTopMonthAvgPrice">{{myCityMap.cityTopMonthAvgPrice}}<span>元/㎡</span></div>
|
|
|
|
|
<div class="card-content-inner" v-else>暂无</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-footer">
|
|
|
|
|
<span v-if="myCityMap.oneMonthUpDownRange >= 0">
|
|
|
|
|
<em><strong>{{myCityMap.oneMonthUpDownRange}}</strong>%<i class="icon icon-arrow-red"></i></em>
|
|
|
|
|
<label>近30天涨跌幅</label>
|
|
|
|
|
</span>
|
|
|
|
|
<span v-else>
|
|
|
|
|
<em><strong>{{myCityMap.oneMonthUpDownRange}}</strong>%<i class="icon icon-arrow-green"></i></em>
|
|
|
|
|
<label>近30天涨跌幅</label>
|
|
|
|
|
</span>
|
|
|
|
|
<span>
|
|
|
|
|
<em><strong>{{myCityMap.rangeLevel}}</strong></em>
|
|
|
|
|
<label>城市涨跌排名</label>
|
|
|
|
|
</span>
|
|
|
|
|
<span v-if="myCityMap.index < 50">
|
|
|
|
|
<em><strong>{{myCityMap.downChance}}</strong>%<i class="icon icon-arrow-green"></i></em>
|
|
|
|
|
<label>下跌概率</label>
|
|
|
|
|
</span>
|
|
|
|
|
<span v-else>
|
|
|
|
|
<em><strong>{{myCityMap.downChance}}</strong>%<i class="icon icon-arrow-red"></i></em>
|
|
|
|
|
<label>上涨概率</label>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="topic">
|
|
|
|
|
<div class="topicTitle topicTitle02">{{myCityMap.time}}楼市行情<span><a @click="showRegionInfo(myCityMap.city)">区县涨跌详情<i class="icon icon-right"></i></a></span></div>
|
|
|
|
|
<div class="topicContent" style="padding-top:0;">
|
|
|
|
|
<div class="chartBox row">
|
|
|
|
|
<span class="col-50">
|
|
|
|
|
<div class="chart" id="up_chart"></div>
|
|
|
|
|
</span>
|
|
|
|
|
<span v-else>
|
|
|
|
|
<em><strong>{{myCityMap.oneMonthUpDownRange}}</strong>%<i class="icon icon-arrow-green"></i></em>
|
|
|
|
|
<label>近30天涨跌幅</label>
|
|
|
|
|
</span>
|
|
|
|
|
<span>
|
|
|
|
|
<em><strong>{{myCityMap.rangeLevel}}</strong></em>
|
|
|
|
|
<label>城市涨跌排名</label>
|
|
|
|
|
</span>
|
|
|
|
|
<span v-if="myCityMap.index < 50">
|
|
|
|
|
<em><strong>{{myCityMap.downChance}}</strong>%<i class="icon icon-arrow-green"></i></em>
|
|
|
|
|
<label>下跌概率</label>
|
|
|
|
|
</span>
|
|
|
|
|
<span v-else>
|
|
|
|
|
<em><strong>{{myCityMap.downChance}}</strong>%<i class="icon icon-arrow-red"></i></em>
|
|
|
|
|
<label>上涨概率</label>
|
|
|
|
|
<span class="col-50">
|
|
|
|
|
<div class="chart" id="down_chart"></div>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="topic">
|
|
|
|
|
<div class="topicTitle topicTitle02">{{myCityMap.time}}楼市行情<span><a @click="showRegionInfo(myCityMap.city)">区县涨跌详情<i class="icon icon-right"></i></a></span></div>
|
|
|
|
|
<div class="topicContent" style="padding-top:0;">
|
|
|
|
|
<div class="chartBox row">
|
|
|
|
|
<span class="col-50">
|
|
|
|
|
<div class="chart" v-bind:id="myCityMap.numId_up_chart"></div>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="col-50">
|
|
|
|
|
<div class="chart" v-bind:id="myCityMap.numId_down_chart"></div>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="topic" id="trendChartDiv">
|
|
|
|
|
<div class="topicTitle" style="position:relative;">城市均价及挂牌走势
|
|
|
|
|
<div class="content-block">
|
|
|
|
|
<div class="buttons-row theme" id="trendDiv">
|
|
|
|
|
<a class="tab-link button active" v="2" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 2)">半年</a>
|
|
|
|
|
<a class="tab-link button" v="3" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 3)">一年</a>
|
|
|
|
|
<a class="tab-link button" v="5" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 5)">三年</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="topic">
|
|
|
|
|
<div class="topicTitle" style="position:relative;">城市均价及挂牌走势
|
|
|
|
|
<div class="content-block">
|
|
|
|
|
<div class="buttons-row theme" v-bind:tid="index+1">
|
|
|
|
|
<a class="tab-link button active" v="2" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 2, index+1)">半年</a>
|
|
|
|
|
<a class="tab-link button" v="3" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 3, index+1)">一年</a>
|
|
|
|
|
<a class="tab-link button" v="5" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 5, index+1)">三年</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="topicContent" style="padding:0;">
|
|
|
|
|
<div class="chart" v-bind:id="myCityMap.numId_price_chart"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="topicContent" style="padding:0;">
|
|
|
|
|
<div class="chart" id="price_chart"></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="topic">
|
|
|
|
|
<div class="topicTitle">热门小区</div>
|
|
|
|
|
<div class="topicContent" style="padding:0;">
|
|
|
|
|
<div class="cardNearbyBox cardNearbyBox01">
|
|
|
|
|
<div class="cardNearbyWin" style="width: 38rem;">
|
|
|
|
|
<div class="card cardNearby" v-for="nearDist in myCityMap.nears" @click="showDistrictDetail(index, myCityMap.city)">
|
|
|
|
|
<div class="card-header">{{nearDist.sname}}</div>
|
|
|
|
|
<div class="card-content">
|
|
|
|
|
<div class="card-content-inner">{{nearDist.avgPrice==0?"暂无":nearDist.avgPrice+"元/㎡"}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="topic">
|
|
|
|
|
<div class="topicTitle">热门小区</div>
|
|
|
|
|
<div class="topicContent" style="padding:0;">
|
|
|
|
|
<div class="cardNearbyBox cardNearbyBox01">
|
|
|
|
|
<div class="cardNearbyWin" style="width: 38rem;">
|
|
|
|
|
<div class="card cardNearby" v-for="nearDist in nears" @click="showDistrictDetail(nearDist.city, nearDist.region, nearDist.name)">
|
|
|
|
|
<div class="card-header">{{nearDist.sname}}</div>
|
|
|
|
|
<div class="card-content">
|
|
|
|
|
<div class="card-content-inner" v-if="nearDist.avgPrice">{{nearDist.avgPrice}}元/㎡</div>
|
|
|
|
|
<div class="card-content-inner" v-else>暂无</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1210,9 +1210,36 @@ $.config = {router: false}
|
|
|
|
|
<script type="text/javascript" src="../component/cityChooseComponent.js"></script>
|
|
|
|
|
<script type="text/javascript" src="../../js/echarts.js" charset="utf-8"></script>
|
|
|
|
|
<script type="text/javascript" src="../../js/highcharts-4.2.3.js" charset="utf-8"></script>
|
|
|
|
|
<script type="text/javascript" src="../../js/quotations/collectCity.js" ></script>
|
|
|
|
|
<script type="text/javascript" src="../../js/quotations/cityDetail.js" ></script>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
var date = new Date();
|
|
|
|
|
var year = date.getFullYear()+'年';
|
|
|
|
|
var month = date.getMonth()+1+'月';
|
|
|
|
|
var positionCity = "";
|
|
|
|
|
var cityInfoVue = new Vue({
|
|
|
|
|
el: '#cityInfo',
|
|
|
|
|
data: {
|
|
|
|
|
city:"",
|
|
|
|
|
month:month,
|
|
|
|
|
collecd:false,
|
|
|
|
|
nears:[],
|
|
|
|
|
myCityMap : []
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var cityDetaiVue = new Vue({
|
|
|
|
|
el: '#tabCityDiv',
|
|
|
|
|
data: {
|
|
|
|
|
citys:[]
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
document.addEventListener('plusready', onPlusReady, false);
|
|
|
|
|
function onPlusReady(){
|
|
|
|
|
var city = "";
|
|
|
|
@@ -1221,11 +1248,12 @@ $.config = {router: false}
|
|
|
|
|
city = p.address.city;
|
|
|
|
|
//region = p.address.district;
|
|
|
|
|
if(city && city.endsWith("市")){
|
|
|
|
|
city = city.substring(0, city.length-1)
|
|
|
|
|
myCollectCitys.push(city);
|
|
|
|
|
positionCity = city.substring(0, city.length-1)
|
|
|
|
|
}
|
|
|
|
|
//lng = p.coords.longitude;//获取到当前位置的经度
|
|
|
|
|
//lat = p.coords.latitude;//获取到当前位置的纬度;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loadMyCollectCity();
|
|
|
|
|
}, function(e){
|
|
|
|
|
},
|
|
|
|
@@ -1265,17 +1293,7 @@ $.config = {router: false}
|
|
|
|
|
coordsType:'bd09ll'
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
/* 关注&已关注切换 */
|
|
|
|
|
$(".collection01").on("click", function () {
|
|
|
|
|
$(this).hide();
|
|
|
|
|
$(this).next().show();
|
|
|
|
|
$.toast("已关注");
|
|
|
|
|
});
|
|
|
|
|
$(".collection02").on("click", function () {
|
|
|
|
|
$(this).hide();
|
|
|
|
|
$(this).prev().show();
|
|
|
|
|
$.toast("取消关注");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* button状态切换 */
|
|
|
|
|
$(".content-block .button").on("click", function () {
|
|
|
|
@@ -1379,6 +1397,9 @@ $.config = {router: false}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
@@ -1414,19 +1435,32 @@ $(document).ready(function () {
|
|
|
|
|
$("a[href='#tabQuotation1'],a[href='#tabQuotation0']").click(function(){
|
|
|
|
|
$("#tabCityDiv a").removeClass("active");
|
|
|
|
|
$("#contentTabDiv > .tab").removeClass("active");
|
|
|
|
|
$("#cityInfo").hide()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
function clickCity(val){
|
|
|
|
|
city = val;
|
|
|
|
|
$("#cityInfo").show()
|
|
|
|
|
$("#tabCityDiv a").removeClass("active");
|
|
|
|
|
$("a[href="+val+"]").addClass("active");
|
|
|
|
|
$("#contentTabDiv > .tab > div:first-child").each(function(){
|
|
|
|
|
var href = $(this).attr("hrefid")
|
|
|
|
|
if(val == href){
|
|
|
|
|
$("div[hrefid="+href+"]").parent().addClass("active");
|
|
|
|
|
}else{
|
|
|
|
|
$("div[hrefid="+href+"]").parent().removeClass("active");
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
// $("a[href="+val+"]").addClass("active");
|
|
|
|
|
// $("#contentTabDiv > .tab > div:first-child").each(function(){
|
|
|
|
|
// var href = $(this).attr("hrefid")
|
|
|
|
|
// if(val == href){
|
|
|
|
|
// $("div[hrefid="+href+"]").parent().addClass("active");
|
|
|
|
|
// }else{
|
|
|
|
|
// $("div[hrefid="+href+"]").parent().removeClass("active");
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
$("a[vcity='"+val+"']").addClass("active");
|
|
|
|
|
loadCurCity(city);
|
|
|
|
|
loadCityPriceInfo(city)
|
|
|
|
|
loadUpOrDown(city);
|
|
|
|
|
loadHotDistrict(city)
|
|
|
|
|
loadCityPricesAndCounts(city)
|
|
|
|
|
|
|
|
|
|
$("#trendDiv a").removeClass("active")
|
|
|
|
|
$("#trendDiv a[v='2']").addClass("active")// 默认走势显示半年
|
|
|
|
|
|
|
|
|
|
$("#tabQuotation1").removeClass("active");
|
|
|
|
|
$("#tabQuotation0").removeClass("active");
|
|
|
|
|
|
|
|
|
@@ -1490,7 +1524,7 @@ function addFocus(city){
|
|
|
|
|
}else{
|
|
|
|
|
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
|
|
|
|
|
reloadMyFocus()
|
|
|
|
|
createData(city, myDatasVue.$data.cityDatas.length);
|
|
|
|
|
cityDetaiVue.$data.citys.push(city);
|
|
|
|
|
}).catch(function(error){
|
|
|
|
|
console.log(error)
|
|
|
|
|
})
|
|
|
|
@@ -1499,9 +1533,38 @@ function addFocus(city){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function hotCity(city){
|
|
|
|
|
clicked('../house/cityDetail.html',true,false,{},{city:city});
|
|
|
|
|
clicked('../house/cityDetail.html',true,false,{},{city:city},function(){
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function loadMyCollectCity(){
|
|
|
|
|
axios.get("/rest/quotations/userCollectCitys",{}).then(function (response) {
|
|
|
|
|
var curDatas = response.data.data
|
|
|
|
|
if(curDatas && curDatas.length>0){
|
|
|
|
|
if(positionCity){
|
|
|
|
|
curDatas.splice(0,0, positionCity)
|
|
|
|
|
}
|
|
|
|
|
cityDetaiVue.$data.citys = curDatas;
|
|
|
|
|
}else{
|
|
|
|
|
if(positionCity){
|
|
|
|
|
curDatas.splice(0,0, positionCity)
|
|
|
|
|
}
|
|
|
|
|
cityDetaiVue.$data.citys = curDatas;
|
|
|
|
|
|
|
|
|
|
$("#cityInfo").hide()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}).catch(function (error) {
|
|
|
|
|
alert(error)
|
|
|
|
|
console.log(error);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|