bug
This commit is contained in:
+31
-15
@@ -71,16 +71,16 @@
|
||||
<div class="card-footer">
|
||||
<span>
|
||||
<em><strong>{{momRate*100}}</strong>%
|
||||
<i v-bind:class="{'icon icon-arrow-red': momRate>=0}" v-bind:class="{'icon icon-arrow-green': momRate<0}"></i>
|
||||
<i class="icon" id="momRateClass"></i>
|
||||
</em>
|
||||
<label>环比上月</label>
|
||||
</span>
|
||||
<span>
|
||||
<em><strong>{{dealCount}}</strong>套<i class="icon icon-arrow-red"></i></em>
|
||||
<em><strong>{{dealCount}}</strong>套<i class="icon icon-arrow-red" id="dealCountClass"></i></em>
|
||||
<label>{{topMonth}}月成交</label>
|
||||
</span>
|
||||
<span>
|
||||
<em><strong>{{priceRate}}</strong>%<i v-bind:class="{priceRateType?'icon icon-arrow-red': 'icon icon-arrow-grey'}"></i></em>
|
||||
<em><strong>{{priceRate}}</strong>%<i class="icon" id="priceRateTypeClass"></i></em>
|
||||
<label id="priceInfo">下跌概率</label>
|
||||
</span>
|
||||
</div>
|
||||
@@ -1278,9 +1278,6 @@ function getPosition(){
|
||||
|
||||
/* 获取#region字数,截取#region前4字,并添加... */
|
||||
|
||||
|
||||
|
||||
|
||||
var baseInfo = new Vue({
|
||||
el: '#baseInfo',
|
||||
data: {
|
||||
@@ -1290,7 +1287,7 @@ var baseInfo = new Vue({
|
||||
momRate: "",
|
||||
dealCount:"",
|
||||
priceRate:"",
|
||||
priceRateType:"",
|
||||
priceRateType:1,
|
||||
isLogin:""
|
||||
}
|
||||
})
|
||||
@@ -1318,7 +1315,6 @@ function initBaseInfo(city,region,address,lat,lng){
|
||||
}
|
||||
})
|
||||
.then(function (response) {
|
||||
console.log(response.data.data.priceRateType);
|
||||
baseInfo.region = response.data.data.region;
|
||||
baseInfo.topMonth = response.data.data.topMonth;
|
||||
baseInfo.momAvgPrice = response.data.data.momAvgPrice;
|
||||
@@ -1327,7 +1323,6 @@ function initBaseInfo(city,region,address,lat,lng){
|
||||
baseInfo.priceRate = response.data.data.priceRate;
|
||||
baseInfo.priceRateType = response.data.data.priceRateType;
|
||||
baseInfo.isLogin = response.data.data.isLogin;
|
||||
|
||||
if(response.data.data.isLogin){
|
||||
$("#addHouseDiv").hide();
|
||||
$("#detailHouseDiv").show();
|
||||
@@ -1336,11 +1331,14 @@ function initBaseInfo(city,region,address,lat,lng){
|
||||
$("#detailHouseDiv").hide();
|
||||
}
|
||||
|
||||
if(response.data.data.priceRateType=="up"){
|
||||
if(response.data.data.priceRateType>0){
|
||||
$("#priceRateTypeClass").addClass("icon-arrow-red");
|
||||
$("#priceInfo").text("上涨概率");
|
||||
}else{
|
||||
$("#priceRateTypeClass").addClass("icon-arrow-green");
|
||||
$("#priceInfo").text("下跌概率");
|
||||
}
|
||||
|
||||
regionChange(response.data.data.region);
|
||||
|
||||
regionList = response.data.data.regionList;
|
||||
@@ -1463,11 +1461,20 @@ function initNews(){
|
||||
}
|
||||
$("body").delegate("#regionStatusButton", "click", function () {
|
||||
var region_copy = $("#region_copy").val();
|
||||
var value = $(".picker-selected").text();
|
||||
if(region_copy != value && value!="" && value!=null){
|
||||
var value = $(".picker-selected").text();
|
||||
if(region_copy != value && value!="" && value!=null){
|
||||
changeRegion();
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#region").click(function(e){
|
||||
$(document).click(function(e){
|
||||
var region_copy = $("#region_copy").val();
|
||||
var value = $(".picker-selected").text();
|
||||
if(region_copy != value && value!="" && value!=null){
|
||||
changeRegion();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
$("body").delegate(".icon-light-red", "click", function () {
|
||||
var id = $(this).attr("data-val");
|
||||
@@ -1528,12 +1535,21 @@ function changeRegion(){
|
||||
baseInfo.priceRateType = response.data.data.priceRateType;
|
||||
|
||||
regionChange(response.data.data.region);
|
||||
if(response.data.data.priceRateType>0){
|
||||
$("#priceRateTypeClass").addClass("icon-arrow-red");
|
||||
$("#priceInfo").text("上涨概率");
|
||||
}else{
|
||||
$("#priceRateTypeClass").addClass("icon-arrow-green");
|
||||
$("#priceInfo").text("下跌概率");
|
||||
}
|
||||
$("#region_copy").val(response.data.data.region);
|
||||
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
/* 页面底部无限加载事件 */
|
||||
$.init();
|
||||
var loading = false;
|
||||
@@ -1566,7 +1582,7 @@ function addItems(number, lastIndex) {
|
||||
'<div class="card-header">'+dataObj[i].title+'</div>'+
|
||||
'<div class="card-footer">'+
|
||||
'<span style="margin-right:1.5rem;" id="visitCount_'+dataObj[i].id+'">'+
|
||||
'<i class="icon icon-praise-white"></i>'+dataObj[i].visitCount+'人'+
|
||||
'<i class="icon icon-eye-white"></i>'+dataObj[i].visitCount+'人'+
|
||||
'</span>'+
|
||||
/*'<span><i class="icon icon-comments-white"></i>1245条</span>'+*/
|
||||
'</div>'+
|
||||
@@ -1618,7 +1634,7 @@ function addItems(number, lastIndex) {
|
||||
'<img src='+dataObj[i].coverImg+'></div><div class="item-inner">'+
|
||||
'<div class="item-title-row"><div class="item-title">'+dataObj[i].title+'</div></div>'+
|
||||
'<div class="item-subtitle"><font>'+dataObj[i].introduction+'</font></div>'+
|
||||
'<div class="item-subtitle"><span style="margin-right:0.75rem;" id="visitCount_'+dataObj[i].id+'"><i class="icon icon-praise-grey"></i>'+dataObj[i].visitCount+'人</span>'+
|
||||
'<div class="item-subtitle"><span style="margin-right:0.75rem;" id="visitCount_'+dataObj[i].id+'"><i class="icon icon-eye-white"></i>'+dataObj[i].visitCount+'人</span>'+
|
||||
/*'<span><i class="icon icon-comments-grey"></i>1245条</span>'+*/
|
||||
'</div></div></li></ul></div></div></div>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user