diff --git a/fangija-zsyf/js/user/myHouse.js b/fangija-zsyf/js/user/myHouse.js index 7f36148..70cf389 100644 --- a/fangija-zsyf/js/user/myHouse.js +++ b/fangija-zsyf/js/user/myHouse.js @@ -105,7 +105,7 @@ function mhAddItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, if(!isNaN(xqPotentialIndexValue)){ //涨跌幅大于零 if(parseInt(xqPotentialIndexValue)>=50){ - html += "
下跌概率: "+xqPotentialIndexValue+"%
"; + html += "
上涨概率: "+xqPotentialIndexValue+"%
"; }else{ html += "
下跌概率: "+(parseInt(100)-parseInt(xqPotentialIndexValue))+"%
"; } diff --git a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js index 411193a..abe937c 100644 --- a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js +++ b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js @@ -53,13 +53,19 @@ Vue.component('city_increase_ranking',{ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ }else{ axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ - $(event.target).parent().children().removeClass("dn"); - $(event.target).addClass("dn"); - reloadMyFocus() - reloadCityPotentialRanking() - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); + var msg = response.data.message; + if(msg != "取消关注成功" && msg != "关注成功"){ + $.toast(msg); + }else{ + $(event.target).parent().children().removeClass("dn"); + $(event.target).addClass("dn"); + reloadMyFocus() + reloadCityPotentialRanking() + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } + //cityDetaiVue.$data.citys.push(city); }).catch(function(error){ console.log(error) @@ -68,11 +74,17 @@ Vue.component('city_increase_ranking',{ }) }else{ axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ - $(event.target).parent().children().removeClass("dn"); - $(event.target).addClass("dn"); - reloadMyFocus() - reloadCityPotentialRanking() - cityDetaiVue.$data.citys.push(city); + var msg = response.data.message; + if(msg != "取消关注成功" && msg != "关注成功"){ + $.toast(msg); + }else{ + $(event.target).parent().children().removeClass("dn"); + $(event.target).addClass("dn"); + reloadMyFocus() + reloadCityPotentialRanking() + cityDetaiVue.$data.citys.push(city); + } + }).catch(function(error){ console.log(error) }) diff --git a/fangija-zsyf/views/component/cityPotentialRankingComponent.js b/fangija-zsyf/views/component/cityPotentialRankingComponent.js index 73c205a..36f2729 100644 --- a/fangija-zsyf/views/component/cityPotentialRankingComponent.js +++ b/fangija-zsyf/views/component/cityPotentialRankingComponent.js @@ -69,16 +69,23 @@ Vue.component('city_potential_ranking',{ 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") == ""){ + alert("rrrr") }else{ 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/house/houseDetail.html').reload(); - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); - reloadMyFocus() - reloadCityIncreaseRanking() - //cityDetaiVue.$data.citys.push(city); + + var msg = response.data.message; + if(msg != "取消关注成功" && msg != "关注成功"){ + $.toast(msg); + }else{ + $(event.target).parent().children().removeClass("dn"); + $(event.target).addClass("dn"); + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + reloadMyFocus() + reloadCityIncreaseRanking() + //cityDetaiVue.$data.citys.push(city); + } }).catch(function(error){ console.log(error) }) @@ -86,12 +93,17 @@ Vue.component('city_potential_ranking',{ }) }else{ axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ - $(event.target).parent().children().removeClass("dn"); - $(event.target).addClass("dn"); - reloadMyFocus() - reloadCityIncreaseRanking() - cityDetaiVue.$data.citys.push(city); - //plus.webview.getWebviewById('views/user/userInfo.html').reload(); + var msg = response.data.message; + if(msg != "取消关注成功" && msg != "关注成功"){ + $.toast(msg); + }else{ + $(event.target).parent().children().removeClass("dn"); + $(event.target).addClass("dn"); + reloadMyFocus() + reloadCityIncreaseRanking() + cityDetaiVue.$data.citys.push(city); + //plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } }).catch(function(error){ console.log(error) }) @@ -141,4 +153,4 @@ function reloadCityPotentialRanking(){ }).catch(function(error){ console.log(error) }) -} +} \ No newline at end of file diff --git a/fangija-zsyf/views/house/cityDetail.html b/fangija-zsyf/views/house/cityDetail.html index d6adbf8..20a2c9d 100644 --- a/fangija-zsyf/views/house/cityDetail.html +++ b/fangija-zsyf/views/house/cityDetail.html @@ -38,7 +38,7 @@
- 取消关注 + 取消关注 关注
diff --git a/fangija-zsyf/views/house/houseList.html b/fangija-zsyf/views/house/houseList.html index 7cc9a1b..02a1b16 100644 --- a/fangija-zsyf/views/house/houseList.html +++ b/fangija-zsyf/views/house/houseList.html @@ -348,7 +348,7 @@ function addItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, xq if(!isNaN(xqPotentialIndexValue)){ //涨跌幅大于零 if(parseInt(xqPotentialIndexValue)>=50){ - html += "
下跌概率: "+xqPotentialIndexValue+"%
"; + html += "
上涨概率: "+xqPotentialIndexValue+"%
"; }else{ html += "
下跌概率: "+(parseInt(100)-parseInt(xqPotentialIndexValue))+"%
"; } diff --git a/fangija-zsyf/views/house/houseManageList.html b/fangija-zsyf/views/house/houseManageList.html index 4d8ffad..7b08e84 100644 --- a/fangija-zsyf/views/house/houseManageList.html +++ b/fangija-zsyf/views/house/houseManageList.html @@ -246,8 +246,8 @@ function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap var cityAvgPriceKey = result.city; //取得对应城市的value var cityAvgPriceValue = cityAvgPriceMap[cityAvgPriceKey]; - if(!isNaN(cityAvgPriceValue)){ - if(parseInt(cityAvgPriceValue)>=parseInt(result.price)){ + if(!isNaN(cityAvgPriceValue) && result.price>0){ + if(parseInt(cityAvgPriceValue)>parseInt(result.price)){ htmlContent = htmlContent + "
相比"+result.city+"均价: 低"+(parseInt(cityAvgPriceValue)-parseInt(result.price))+"元
"; }else{ htmlContent = htmlContent + "
相比"+result.city+"均价: 高"+(parseInt(result.price)-parseInt(cityAvgPriceValue))+"元
"; diff --git a/fangija-zsyf/views/news/newsDetail.html b/fangija-zsyf/views/news/newsDetail.html index ee4962e..bf3ed16 100644 --- a/fangija-zsyf/views/news/newsDetail.html +++ b/fangija-zsyf/views/news/newsDetail.html @@ -291,12 +291,19 @@ function addItems(number, lastIndex) { html = html + "
"; - var name = "游客" + var name = null; if(vo.wxName){ name = vo.wxName - }else if(vo.name){ + } + if(name == null){ name = vo.name } + if(name == null){ + name = vo.mobile + } + if(name == null){ + name = "游客" + } html = html + "
"+ "
"+name+"
"+ "
"+