diff --git a/fangija-zsyf/js/plus.info.js b/fangija-zsyf/js/plus.info.js index 27dcd88..265545c 100644 --- a/fangija-zsyf/js/plus.info.js +++ b/fangija-zsyf/js/plus.info.js @@ -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){ diff --git a/fangija-zsyf/js/user/myHouse.js b/fangija-zsyf/js/user/myHouse.js index 8f5f0bf..c4419ab 100644 --- a/fangija-zsyf/js/user/myHouse.js +++ b/fangija-zsyf/js/user/myHouse.js @@ -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 += '
  • '; + html += '
  • '; html += "
    "; - html += "
    "+result.name+" "+tempTotalPrice+"万"+result.liveStatus+"
    "; + html += "
    "+result.name+" "+tempTotalPrice+"万"; + if(result.liveStatus!=null && result.liveStatus.length>0){ + html += ""+result.liveStatus+"
    "; + }else{ + html += "其它
    "; + } html += "
    "; //对应城市地区小区30天涨跌幅 @@ -95,7 +100,7 @@ function mhAddItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, html += "
    近30天涨跌幅: "+Math.abs(xqOneMonthUpDownRangeValue)+"%
    "; } }else{ - html += "
    近30天涨跌幅: %
    "; + html += "
    近30天涨跌幅: 暂无
    "; } //下跌概率 @@ -108,7 +113,7 @@ function mhAddItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, html += "
    下跌概率: "+(parseInt(100)-parseInt(xqPotentialIndexValue))+"%
    "; } }else{ - html += "
    下跌概率: %
    "; + html += "
    下跌概率: 暂无
    "; } html += "
    抵押可贷额度: "+tempTotalPricePercent+"万
    "; @@ -124,7 +129,7 @@ function mhAddItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, }else if(result.level!=null && result.level == 5){ html += "山洞级"; }else{ - html += "其他"; + html += "其它"; } html += '立即申请
  • '; } diff --git a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js index 7740940..53c55ff 100644 --- a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js +++ b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js @@ -16,7 +16,7 @@ Vue.component('city_increase_ranking',{ ''+ ''+ ''+ - '
  • '+ + '
  • '+ ''+ '
    '+ '
    '+ @@ -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(){ diff --git a/fangija-zsyf/views/component/cityPotentialRankingComponent.js b/fangija-zsyf/views/component/cityPotentialRankingComponent.js index 4322962..5acd4f8 100644 --- a/fangija-zsyf/views/component/cityPotentialRankingComponent.js +++ b/fangija-zsyf/views/component/cityPotentialRankingComponent.js @@ -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) }) diff --git a/fangija-zsyf/views/component/myFocusComponent.js b/fangija-zsyf/views/component/myFocusComponent.js index 5edb81d..a52a058 100644 --- a/fangija-zsyf/views/component/myFocusComponent.js +++ b/fangija-zsyf/views/component/myFocusComponent.js @@ -63,4 +63,23 @@ Vue.component('my_focus',{ },mounted:function(){ this.loadMyFocus(); } -}) \ No newline at end of file +}) + +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) + }) + } +} + diff --git a/fangija-zsyf/views/evaluate/evaluateReport.html b/fangija-zsyf/views/evaluate/evaluateReport.html index d24f535..e36b04c 100644 --- a/fangija-zsyf/views/evaluate/evaluateReport.html +++ b/fangija-zsyf/views/evaluate/evaluateReport.html @@ -61,7 +61,7 @@
  • '; } diff --git a/fangija-zsyf/views/user/userInfo.html b/fangija-zsyf/views/user/userInfo.html index a0ac6b0..e071a1a 100644 --- a/fangija-zsyf/views/user/userInfo.html +++ b/fangija-zsyf/views/user/userInfo.html @@ -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(); }) } diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html index a2a4444..196f272 100644 --- a/fangija-zsyf/yfindex.html +++ b/fangija-zsyf/yfindex.html @@ -1939,7 +1939,7 @@ function addItems(number, lastIndex) { html += '
    近30天涨跌幅: '+(dataObj2[i].weekendMarkup/100*(-1)).toFixed(2)+'%
    '; } }else{ - html += '
    涨跌幅: 暂无
    '; + html += '
    近30天涨跌幅: 暂无
    '; } html += ''+tagStr+'';