Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into xh-youfangApp1.1
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
var cityIncreaseRankingData = {cityIncreaseRankingList:[]};
|
||||
|
||||
Vue.component('city_increase_ranking',{
|
||||
template:'<div class="list-block media-list cityList">'+
|
||||
'<ul>'+
|
||||
'<li>'+
|
||||
'<a class="item-content">'+
|
||||
'<div class="item-inner">'+
|
||||
'<div class="item-subtitle row">'+
|
||||
'<div class="col-5"> </div>'+
|
||||
'<div class="col-20">城市</div>'+
|
||||
'<div class="col-25">上月均价</div>'+
|
||||
'<div class="col-25">近30天涨跌幅</div>'+
|
||||
'<div class="col-20"></div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</a>'+
|
||||
'</li>'+
|
||||
'<li v-for="(ci,index) in cityIncreaseRankingList">'+
|
||||
'<a class="item-content">'+
|
||||
'<div class="item-inner">'+
|
||||
'<div class="item-subtitle row">'+
|
||||
'<div class="col-5">{{index+1}}</div>'+
|
||||
'<div class="col-20">{{ci.city}}</div>'+
|
||||
'<div class="col-25">{{!ci.cityTopMonthAvgPrice||ci.cityTopMonthAvgPrice==""?"暂无":""+ci.cityTopMonthAvgPrice+"元/㎡"}}</div>'+
|
||||
'<div class="col-25">'+
|
||||
'<em class="up">{{!ci.oneMonthUpDownRange||ci.oneMonthUpDownRange==""?"暂无":Math.abs(ci.oneMonthUpDownRange)+"%"}}<i class="icon" v-bind:class="[ci.oneMonthUpDownRange>0?"icon-arrow-red":"",ci.oneMonthUpDownRange<0?"icon-arrow-green":""]"></i></em>'+
|
||||
'</div>'+
|
||||
'<div class="col-20">'+
|
||||
'<i class="button theme collection collection01" v-on:click="follow(ci.city)">关注</i>'+
|
||||
'<i class="button collection collection02 dn" v-on:click="abolish(ci.city)">取消</i>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</a>'+
|
||||
'</li>'+
|
||||
'</ul>'+
|
||||
'</div>',
|
||||
data:function(){
|
||||
return cityIncreaseRankingData;
|
||||
},
|
||||
methods:{
|
||||
loadCityIncreaseRanking:function(){
|
||||
axios.get("/rest/quotations/potentialUpTopInfos").then(function(response){
|
||||
cityIncreaseRankingData.cityIncreaseRankingList = response.data.data;
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
},
|
||||
follow:function(city){
|
||||
alert(city)
|
||||
},
|
||||
abolish:function(city){
|
||||
alert(city)
|
||||
}
|
||||
},
|
||||
mounted:function(){
|
||||
this.loadCityIncreaseRanking();
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,79 @@
|
||||
var cityPotentialRankingData = {cityPotentialRankingList:[]};
|
||||
|
||||
Vue.component('city_potential_ranking',{
|
||||
template:'<div class="list-block media-list cityList">'+
|
||||
'<ul>'+
|
||||
'<li>'+
|
||||
'<a class="item-content">'+
|
||||
'<div class="item-inner">'+
|
||||
'<div class="item-subtitle row">'+
|
||||
'<div class="col-5"> </div>'+
|
||||
'<div class="col-20">城市</div>'+
|
||||
'<div class="col-25">近1年涨跌幅</div>'+
|
||||
'<div class="col-25">潜力指数</div>'+
|
||||
'<div class="col-20"></div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</a>'+
|
||||
'</li>'+
|
||||
'<li v-for="(cp,index) in cityPotentialRankingList">'+
|
||||
'<a class="item-content">'+
|
||||
'<div class="item-inner">'+
|
||||
'<div class="item-subtitle row">'+
|
||||
'<div class="col-5">{{index+1}}</div>'+
|
||||
'<div class="col-20">{{cp.city}}</div>'+
|
||||
'<div class="col-25">'+
|
||||
'<em class="up">{{!cp.oneYearUpDownRange||cp.oneYearUpDownRange==""?"暂无":Math.abs(cp.oneYearUpDownRange)+"%"}}<i class="icon" v-bind:class="[cp.oneYearUpDownRange>0?"icon-arrow-red":"",cp.oneYearUpDownRange<0?"icon-arrow-green":""]"></i></em>'+
|
||||
'</div>'+
|
||||
'<div class="col-25">'+
|
||||
'<span class="star">'+
|
||||
'<i v-for="n in cp.starNum" class="icon icon-star01"></i>'+
|
||||
'<i v-for="n in cp.halfStarNum" class="icon icon-star02"></i>'+
|
||||
'<i v-for="n in cp.noneStarNum" class="icon icon-star"></i>'+
|
||||
'</span>'+
|
||||
'</div>'+
|
||||
'<div class="col-20">'+
|
||||
'<i class="button theme collection collection01" v-on:click="follow(cp.city)">关注</i>'+
|
||||
'<i class="button collection collection02 dn" v-on:click="abolish(cp.city)">取消</i>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</a>'+
|
||||
'</li>'+
|
||||
'</ul>'+
|
||||
'</div>',
|
||||
data:function(){
|
||||
return cityPotentialRankingData;
|
||||
},
|
||||
methods:{
|
||||
loadCityPotentialRanking:function(){
|
||||
axios.get("/rest/quotations/potentialUpTopInfos").then(function(response){
|
||||
// alert(1)
|
||||
list = response.data.data;
|
||||
$(list).each(function(i){
|
||||
var index = this.index;
|
||||
var totalHalfStar = Math.round(Math.round(index/5)/2) //总半星
|
||||
var starNum = Math.floor(totalHalfStar/2) //全星
|
||||
var halfStarNum = totalHalfStar%2 //半星
|
||||
var noneStarNum = 5-starNum-halfStarNum //空星
|
||||
this.starNum = starNum;
|
||||
this.halfStarNum = halfStarNum;
|
||||
this.noneStarNum = noneStarNum;
|
||||
})
|
||||
cityPotentialRankingData.cityPotentialRankingList = response.data.data;
|
||||
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
},
|
||||
follow:function(city){
|
||||
alert(city)
|
||||
},
|
||||
abolish:function(city){
|
||||
alert(city)
|
||||
}
|
||||
},
|
||||
mounted:function(){
|
||||
this.loadCityPotentialRanking();
|
||||
}
|
||||
})
|
||||
+4
-24
@@ -22,9 +22,9 @@ Vue.component('my_focus',{
|
||||
'<a class="item-content">'+
|
||||
'<div class="item-inner">'+
|
||||
'<div class="item-subtitle row">'+
|
||||
'<div class="col-5">{{index}}</div>'+
|
||||
'<div class="col-5">{{index+1}}</div>'+
|
||||
'<div class="col-20">{{mf.city}}</div>'+
|
||||
'<div class="col-25">{{!mf.cityTopMonthAvgPrice||mf.cityTopMonthAvgPrice==""?"暂无":""+mf.avgPrice+"元/㎡"}}</div>'+
|
||||
'<div class="col-25">{{!mf.cityTopMonthAvgPrice||mf.cityTopMonthAvgPrice==""?"暂无":""+mf.cityTopMonthAvgPrice+"元/㎡"}}</div>'+
|
||||
'<div class="col-25">'+
|
||||
'<em class="up">{{!mf.oneMonthUpDownRange||mf.oneMonthUpDownRange==""?"暂无":mf.oneMonthUpDownRange+"%"}}<i class="icon icon-arrow-red"></i></em>'+
|
||||
'</div>'+
|
||||
@@ -45,9 +45,9 @@ Vue.component('my_focus',{
|
||||
methods:{
|
||||
loadMyFocus:function(){
|
||||
axios.get("/rest/quotations/userCollectCityInfo").then(function(response){
|
||||
myFocusDatas.myFocusList = response.data.data
|
||||
myFocusDatas.myFocusList = response.data.data;
|
||||
}).catch(function(error){
|
||||
alert(error);
|
||||
//alert(2)
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
@@ -56,23 +56,3 @@ Vue.component('my_focus',{
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
//我的关注
|
||||
//var myFocus = new Vue({
|
||||
// el:"#myFocus",
|
||||
// data:{
|
||||
// myfocusList:[{num:1,city:"test1",avgPrice:"123",percent:"",ranking:"1"},
|
||||
// {num:2,city:"test2",avgPrice:"321",percent:"6.6",ranking:"2"}
|
||||
// ]
|
||||
// }
|
||||
//})
|
||||
|
||||
//涨幅榜
|
||||
var tabCityRanking1 = new Vue({
|
||||
el:"tabCityRanking1"
|
||||
})
|
||||
|
||||
//潜力绑
|
||||
var tabCityRanking2 = new Vue({
|
||||
el:"tabCityRanking2"
|
||||
})
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24,12 +24,31 @@
|
||||
.list-block .item-title em{font-size:0.8rem;color:#EB5F34;}
|
||||
.list-block .item-title .tag small{font-size:80%;color:#F5A100;}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="page-group">
|
||||
<div class="page-group" style="display: none;" id="page-group-nologin">
|
||||
<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>
|
||||
<h1 class="title">我的房产</h1>
|
||||
</header>
|
||||
<div class="content contentSuggest">
|
||||
<div class="noData">
|
||||
<img src="../../images/noData.png">
|
||||
<p>管理房产,房价、房租一手掌握</p>
|
||||
<div class="content-block">
|
||||
<p><a href="#" class="button button-big button-fill theme" onclick="gotoAddHouse()">添加房产</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-group" style="display: none;" id="page-group-login">
|
||||
<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();">
|
||||
@@ -41,7 +60,7 @@
|
||||
<div class="card cardPrice cardPrice01" id="houseInfo">
|
||||
<div class="card-header">
|
||||
<span>房产总值</span>
|
||||
<a class="button theme" href="#">添加房产</a>
|
||||
<a class="button theme" href="#" onclick="gotoAddHouse()">添加房产</a>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="card-content-inner">{{totalPrice}}<span>万</span></div>
|
||||
@@ -197,9 +216,26 @@ function selectHouseInfoList(){
|
||||
});
|
||||
}
|
||||
|
||||
//判断是否登录
|
||||
function checkIsLogin(){
|
||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||
$('#page-group-login').hide();
|
||||
$('#page-group-nologin').show();
|
||||
}else{
|
||||
selectHouseInfoList();
|
||||
//控制显示
|
||||
$('#page-group-nologin').hide();
|
||||
$('#page-group-login').show();
|
||||
}
|
||||
}
|
||||
|
||||
function gotoAddHouse(){
|
||||
clicked('/views/house/add.html',true,false,{},{typeValue:"addHouse"},function(){});
|
||||
}
|
||||
|
||||
//界面加载
|
||||
$(document).ready(function () {
|
||||
selectHouseInfoList();
|
||||
checkIsLogin();
|
||||
});
|
||||
|
||||
/* 分页构造数据 */
|
||||
|
||||
Reference in New Issue
Block a user