Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1
This commit is contained in:
@@ -7,7 +7,11 @@ document.addEventListener('plusready', onPlusReady, false);
|
||||
//扩展API加载完毕,现在可以正常调用扩展API
|
||||
function onPlusReady(){
|
||||
getPosition();
|
||||
}
|
||||
}
|
||||
var province = "";
|
||||
var city = "";
|
||||
var region = "";
|
||||
|
||||
// 获取当前用户位置
|
||||
function getPosition(){
|
||||
plus.geolocation.getCurrentPosition(function(p){
|
||||
|
||||
@@ -79,9 +79,14 @@ function mhAddItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap,
|
||||
tempTotalPricePercent = (parseFloat(tempTotalPrice)*0.7/10000).toFixed(2);
|
||||
tempTotalPrice = (parseFloat(tempTotalPrice)/10000).toFixed(2);
|
||||
}
|
||||
html += '<li onclick="gotoHouseDetail(\''+result.id+'\')"><a href="#" class="item-content">';
|
||||
html += '<li><a href="#" onclick="gotoHouseDetail(\''+result.id+'\')" class="item-content">';
|
||||
html += "<div class='item-inner'><div class='item-title-row'>";
|
||||
html += "<div class='item-title'>"+result.name+" <em>"+tempTotalPrice+"万</em><span class='tag'><small>"+result.liveStatus+"</small></span></div>";
|
||||
html += "<div class='item-title'>"+result.name+" <em>"+tempTotalPrice+"万</em><span class='tag'>";
|
||||
if(result.liveStatus!=null && result.liveStatus.length>0){
|
||||
html += "<small>"+result.liveStatus+"</small></span></div>";
|
||||
}else{
|
||||
html += "<small>其它</small></span></div>";
|
||||
}
|
||||
html += "</div><div class='item-subtitle'>";
|
||||
|
||||
//对应城市地区小区30天涨跌幅
|
||||
@@ -95,7 +100,7 @@ function mhAddItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap,
|
||||
html += "<div>近30天涨跌幅: <em class='down'>"+Math.abs(xqOneMonthUpDownRangeValue)+"%<i class='icon icon-arrow-green'></i></em></div>";
|
||||
}
|
||||
}else{
|
||||
html += "<div>近30天涨跌幅: <em class='down'> %<i class='icon icon-arrow-green'></i></em></div>";
|
||||
html += "<div>近30天涨跌幅: <em class='down'>暂无<i class='icon'></i></em></div>";
|
||||
}
|
||||
|
||||
//下跌概率
|
||||
@@ -108,7 +113,7 @@ function mhAddItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap,
|
||||
html += "<div>下跌概率: <em class='down'>"+(parseInt(100)-parseInt(xqPotentialIndexValue))+"%<i class='icon icon-arrow-green'></i></em></div>";
|
||||
}
|
||||
}else{
|
||||
html += "<div>下跌概率: <em class='down'> %<i class='icon icon-arrow-green'></i></em></div>";
|
||||
html += "<div>下跌概率: <em class='down'>暂无<i class='icon'></i></em></div>";
|
||||
}
|
||||
|
||||
html += "<div>抵押可贷额度: <em style='color:#EB5F34;'>"+tempTotalPricePercent+"万</em></div></div></div></a>";
|
||||
@@ -124,7 +129,7 @@ function mhAddItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap,
|
||||
}else if(result.level!=null && result.level == 5){
|
||||
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>山洞级</a>";
|
||||
}else{
|
||||
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>其他</a>";
|
||||
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>其它</a>";
|
||||
}
|
||||
html += '<a class="button theme add add01 add01a" href="#" onclick="gotoLoanApply(\''+result.id+'\', \''+result.city+'\')">立即申请</a></li>';
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ Vue.component('city_increase_ranking',{
|
||||
'</div>'+
|
||||
'</a>'+
|
||||
'</li>'+
|
||||
'<li v-for="(ci,index) in cityIncreaseRankingList">'+
|
||||
'<li v-for="(ci,index) in cityIncreaseRankingList" :key="ci.city">'+
|
||||
'<a class="item-content">'+
|
||||
'<div class="item-inner">'+
|
||||
'<div class="item-subtitle row">'+
|
||||
@@ -41,29 +41,53 @@ Vue.component('city_increase_ranking',{
|
||||
},
|
||||
methods:{
|
||||
loadCityIncreaseRanking:function(){
|
||||
axios.get("/rest/quotations/potentialUpTopInfos").then(function(response){
|
||||
axios.get("/rest/quotations/markUpTopInfos").then(function(response){
|
||||
cityIncreaseRankingData.cityIncreaseRankingList = response.data.data;
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
},
|
||||
follow:function(city,event){
|
||||
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
|
||||
$(event.target).parent().children().removeClass("dn");
|
||||
$(event.target).addClass("dn");
|
||||
//plus.webview.getWebviewById('views/user/userInfo.html').reload()
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||
alert("请先登录")
|
||||
clicked('/views/user/passLogin.html',true,false,{},{},function(){
|
||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||
|
||||
}else{
|
||||
}
|
||||
})
|
||||
}else{
|
||||
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
|
||||
$(event.target).parent().children().removeClass("dn");
|
||||
$(event.target).addClass("dn");
|
||||
reloadMyFocus()
|
||||
//plus.webview.getWebviewById('views/user/userInfo.html').reload()
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
abolish:function(city,event){
|
||||
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
|
||||
$(event.target).parent().children().removeClass("dn");
|
||||
$(event.target).addClass("dn");
|
||||
//plus.webview.getWebviewById('views/user/userInfo.html').reload()
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||
clicked('/views/user/passLogin.html',true,false,{},{},function(){
|
||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||
|
||||
}else{
|
||||
|
||||
}
|
||||
})
|
||||
}else{
|
||||
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
|
||||
$(event.target).parent().children().removeClass("dn");
|
||||
$(event.target).addClass("dn");
|
||||
reloadMyFocus();
|
||||
//plus.webview.getWebviewById('views/user/userInfo.html').reload()
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
mounted:function(){
|
||||
|
||||
@@ -66,19 +66,32 @@ Vue.component('city_potential_ranking',{
|
||||
})
|
||||
},
|
||||
follow:function(city,event){
|
||||
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
|
||||
$(event.target).parent().children().removeClass("dn");
|
||||
$(event.target).addClass("dn");
|
||||
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||
alert("请先登录")
|
||||
clicked('/views/user/passLogin.html',true,false,{},{},function(){
|
||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||
|
||||
}else{
|
||||
}
|
||||
})
|
||||
}else{
|
||||
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
|
||||
$(event.target).parent().children().removeClass("dn");
|
||||
$(event.target).addClass("dn");
|
||||
reloadMyFocus()
|
||||
//plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
abolish:function(city,event){
|
||||
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
|
||||
$(event.target).parent().children().removeClass("dn");
|
||||
$(event.target).addClass("dn");
|
||||
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||
reloadMyFocus()
|
||||
//plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
@@ -63,4 +63,23 @@ Vue.component('my_focus',{
|
||||
},mounted:function(){
|
||||
this.loadMyFocus();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
function reloadMyFocus(){
|
||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||
$("#myFocusFirstPage").hide()
|
||||
$("#myFocus").hide();
|
||||
}else{
|
||||
axios.get("/rest/quotations/userCollectCityInfo").then(function(response){
|
||||
if(response.data.data.length==0){
|
||||
$("#myFocusFirstPage").hide();
|
||||
$("#myFocus").hide();
|
||||
}else{
|
||||
myFocusDatas.myFocusList = response.data.data;
|
||||
}
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<span>
|
||||
<em><strong>{{percentage_30}}</strong>%<i v-bind:class="arrow"></i></em>
|
||||
<em><strong>{{percentage_30}}</strong>{{p}}<i v-bind:class="arrow"></i></em>
|
||||
<label>近30天涨跌幅</label>
|
||||
</span>
|
||||
<span>
|
||||
@@ -165,7 +165,8 @@ $.config = {router: false}
|
||||
city:"",
|
||||
compare_word:"",
|
||||
compare_money:"",
|
||||
words:""
|
||||
words:"",
|
||||
p:""
|
||||
}
|
||||
})
|
||||
// var evaluate_msg = new Vue({
|
||||
@@ -227,9 +228,11 @@ $.config = {router: false}
|
||||
if(h.oneMonthUpDownRange<0){
|
||||
house_price.arrow="icon icon-arrow-green"
|
||||
house_price.percentage_30=-h.oneMonthUpDownRange
|
||||
house_price.p = "%"
|
||||
}else if(h.oneMonthUpDownRange>0){
|
||||
house_price.arrow="icon icon-arrow-red"
|
||||
house_price.percentage_30=h.oneMonthUpDownRange
|
||||
house_price.p = "%"
|
||||
}else{
|
||||
house_price.percentage_30="暂无"
|
||||
}
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
<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 open-popover">
|
||||
<!--<button class="button button-link button-nav pull-right open-popover">
|
||||
<span class="icon icon-path"></span>
|
||||
</button>
|
||||
</button>-->
|
||||
<h1 class="title">房产评估</h1>
|
||||
</header>
|
||||
<div class="content">
|
||||
@@ -1171,7 +1171,6 @@
|
||||
<!-- 加载提示符 -->
|
||||
|
||||
<div class="infinite-scroll-preloader">
|
||||
<div class="preloader"></div>
|
||||
<div style="color:#999;">没有更多数据</div>
|
||||
</div>
|
||||
|
||||
@@ -1207,7 +1206,6 @@
|
||||
<!-- 加载提示符 -->
|
||||
|
||||
<div class="infinite-scroll-preloader">
|
||||
<div class="preloader"></div>
|
||||
<div style="color:#999;">没有更多数据</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -383,7 +383,12 @@ function init(){
|
||||
baseInfo.area= houseInfo.area;
|
||||
baseInfo.floor= houseInfo.floor;
|
||||
baseInfo.height= houseInfo.height;
|
||||
baseInfo.liveStatus=houseInfo.liveStatus;
|
||||
if(houseInfo.liveStatus){
|
||||
baseInfo.liveStatus=houseInfo.liveStatus;
|
||||
}else{
|
||||
baseInfo.liveStatus='其它';
|
||||
}
|
||||
|
||||
baseInfo.estatetype=houseInfo.estatetype;
|
||||
baseInfo.totalPrice=houseInfo.totalPrice;
|
||||
baseInfo.price=houseInfo.price;
|
||||
|
||||
@@ -1470,13 +1470,24 @@ function markFocus(){
|
||||
}
|
||||
|
||||
function addFocus(city){
|
||||
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
|
||||
|
||||
createData(city, myDatasVue.$data.cityDatas.length);
|
||||
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||
alert("请先登录")
|
||||
clicked('/views/user/passLogin.html',true,false,{},{},function(){
|
||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||
|
||||
}else{
|
||||
|
||||
}
|
||||
})
|
||||
}else{
|
||||
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
|
||||
reloadMyFocus()
|
||||
createData(city, myDatasVue.$data.cityDatas.length);
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function hotCity(city){
|
||||
|
||||
@@ -323,9 +323,14 @@ function addItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, xq
|
||||
tempTotalPricePercent = (parseFloat(tempTotalPrice)*0.7/10000).toFixed(2);
|
||||
tempTotalPrice = (parseFloat(tempTotalPrice)/10000).toFixed(2);
|
||||
}
|
||||
html += '<li onclick="gotoHouseDetail(\''+result.id+'\')"><a href="#" class="item-content">';
|
||||
html += '<li><a href="#" onclick="gotoHouseDetail(\''+result.id+'\')" class="item-content">';
|
||||
html += "<div class='item-inner'><div class='item-title-row'>";
|
||||
html += "<div class='item-title'>"+result.name+" <em>"+tempTotalPrice+"万</em><span class='tag'><small>"+result.liveStatus+"</small></span></div>";
|
||||
html += "<div class='item-title'>"+result.name+" <em>"+tempTotalPrice+"万</em><span class='tag'>";
|
||||
if(result.liveStatus!=null && result.liveStatus.length>0){
|
||||
html += "<small>"+result.liveStatus+"</small></span></div>";
|
||||
}else{
|
||||
html += "<small>其它</small></span></div>";
|
||||
}
|
||||
html += "</div><div class='item-subtitle'>";
|
||||
|
||||
//对应城市地区小区30天涨跌幅
|
||||
@@ -339,9 +344,8 @@ function addItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, xq
|
||||
html += "<div>近30天涨跌幅: <em class='down'>"+Math.abs(xqOneMonthUpDownRangeValue)+"%<i class='icon icon-arrow-green'></i></em></div>";
|
||||
}
|
||||
}else{
|
||||
html += "<div>近30天涨跌幅: <em class='down'> %<i class='icon icon-arrow-green'></i></em></div>";
|
||||
html += "<div>近30天涨跌幅: <em class='down'>暂无<i class='icon'></i></em></div>";
|
||||
}
|
||||
|
||||
//下跌概率
|
||||
var xqPotentialIndexValue = xqPotentialIndexMap[xqOneMonthUpDownRangeKey];
|
||||
if(!isNaN(xqPotentialIndexValue)){
|
||||
@@ -352,7 +356,7 @@ function addItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, xq
|
||||
html += "<div>下跌概率: <em class='down'>"+(parseInt(100)-parseInt(xqPotentialIndexValue))+"%<i class='icon icon-arrow-green'></i></em></div>";
|
||||
}
|
||||
}else{
|
||||
html += "<div>下跌概率: <em class='down'> %<i class='icon icon-arrow-green'></i></em></div>";
|
||||
html += "<div>下跌概率: <em class='down'>暂无<i class='icon'></i></em></div>";
|
||||
}
|
||||
|
||||
html += "<div>抵押可贷额度: <em style='color:#EB5F34;'>"+tempTotalPricePercent+"万</em></div></div></div></a>";
|
||||
@@ -368,7 +372,7 @@ function addItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, xq
|
||||
}else if(result.level!=null && result.level == 5){
|
||||
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>山洞级</a>";
|
||||
}else{
|
||||
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>其他</a>";
|
||||
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>其它</a>";
|
||||
}
|
||||
html += '<a class="button theme add add01 add01a" href="#" onclick="gotoLoanApply(\''+result.id+'\', \''+result.city+'\')">立即申请</a></li>';
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ function checkIsLogin(){
|
||||
|
||||
//跳转登录方法, 考虑回调
|
||||
function gotoLogin(){
|
||||
clicked('/views/user/passLogin.html',true,false,{},{},function(){
|
||||
clicked('/views/user/codeSms.html',true,false,{},{},function(){
|
||||
checkIsLogin();
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1939,7 +1939,7 @@ function addItems(number, lastIndex) {
|
||||
html += '<div>近30天涨跌幅: <em class="down">'+(dataObj2[i].weekendMarkup/100*(-1)).toFixed(2)+'%<i class="icon icon-arrow-green"></i></em></div>';
|
||||
}
|
||||
}else{
|
||||
html += '<div>涨跌幅: <em class="em01">暂无</em></div>';
|
||||
html += '<div>近30天涨跌幅: <em class="em01">暂无</em></div>';
|
||||
}
|
||||
|
||||
html += '</div>'+tagStr+'</div></a></li>';
|
||||
|
||||
Reference in New Issue
Block a user