From c4e62f5e5ee0839882258f25af6f99a5ad8fd776 Mon Sep 17 00:00:00 2001 From: gaojuan Date: Mon, 16 Apr 2018 14:44:41 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=9F=8E=E5=B8=82?= =?UTF-8?q?=E8=BF=87=E5=A4=9A=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/cityIncreaseRankingComponent.js | 32 +++++++++++----- .../cityPotentialRankingComponent.js | 37 ++++++++++++------- fangija-zsyf/views/house/cityDetail.html | 2 +- 3 files changed, 47 insertions(+), 24 deletions(-) diff --git a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js index de7e321..231c4c6 100644 --- a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js +++ b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js @@ -53,12 +53,18 @@ 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() - 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() + 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) @@ -67,10 +73,16 @@ 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() - 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() + 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 8875151..5965026 100644 --- a/fangija-zsyf/views/component/cityPotentialRankingComponent.js +++ b/fangija-zsyf/views/component/cityPotentialRankingComponent.js @@ -72,14 +72,20 @@ Vue.component('city_potential_ranking',{ alert("rrrr") }else{ axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ - $(event.target).parent().children().removeClass("dn"); - $(event.target).addClass("dn"); - alert(city) - 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() - //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"); + alert(city) + 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() + //cityDetaiVue.$data.citys.push(city); + } }).catch(function(error){ console.log(error) }) @@ -87,11 +93,16 @@ 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() - 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() + cityDetaiVue.$data.citys.push(city); + //plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } }).catch(function(error){ console.log(error) }) diff --git a/fangija-zsyf/views/house/cityDetail.html b/fangija-zsyf/views/house/cityDetail.html index 9ad380c..dac5cf0 100644 --- a/fangija-zsyf/views/house/cityDetail.html +++ b/fangija-zsyf/views/house/cityDetail.html @@ -38,7 +38,7 @@
- 取消关注 + 取消关注 关注
From 52d5e2443a8631d9d1883ab4d625f859dc910f39 Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Mon, 16 Apr 2018 15:20:14 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E8=B0=83=E6=95=B4=20=E4=B8=8A=E6=B6=A8?= =?UTF-8?q?=E6=A6=82=E7=8E=87=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/js/user/myHouse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))+"%
"; } From f1abdebe90dd9dbfd1a8e5aa1f841d6a78ebf565 Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Mon, 16 Apr 2018 15:20:37 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E8=B0=83=E6=95=B4=20=E4=B8=8A=E6=B6=A8?= =?UTF-8?q?=E6=A6=82=E7=8E=87=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/views/house/houseList.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))+"%
"; } From 2fc1970d6896fe1b31599f786f90fdaa75313476 Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Mon, 16 Apr 2018 15:24:59 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=9D=87=E4=BB=B7?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/views/house/houseManageList.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fangija-zsyf/views/house/houseManageList.html b/fangija-zsyf/views/house/houseManageList.html index 4d8ffad..3948832 100644 --- a/fangija-zsyf/views/house/houseManageList.html +++ b/fangija-zsyf/views/house/houseManageList.html @@ -246,7 +246,7 @@ function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap var cityAvgPriceKey = result.city; //取得对应城市的value var cityAvgPriceValue = cityAvgPriceMap[cityAvgPriceKey]; - if(!isNaN(cityAvgPriceValue)){ + if(!isNaN(cityAvgPriceValue) && result.price>0){ if(parseInt(cityAvgPriceValue)>=parseInt(result.price)){ htmlContent = htmlContent + "
相比"+result.city+"均价: 低"+(parseInt(cityAvgPriceValue)-parseInt(result.price))+"元
"; }else{ From 3d8e7fe2200dfb971700eb7d8f950e0eefd259bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E5=90=89=E6=AC=A2?= Date: Mon, 16 Apr 2018 15:35:00 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=96=B0=E9=97=BB=E8=AF=84=E6=98=B5?= =?UTF-8?q?=E7=A7=B0=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/views/news/newsDetail.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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+"
"+ "
"+ From c616419ca41855492379331bf4a1a0d2a3ce1456 Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Mon, 16 Apr 2018 15:36:35 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E6=8F=90=E4=BA=A4=20=E5=9D=87=E4=BB=B7=20?= =?UTF-8?q?=20=20=E5=92=8C=20=E5=BD=93=E5=89=8D=E5=9F=8E=E5=B8=82=E7=9B=B8?= =?UTF-8?q?=E7=AD=89=20=E6=98=BE=E7=A4=BA=E9=AB=98=E9=9B=B6=E5=85=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/views/house/houseManageList.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fangija-zsyf/views/house/houseManageList.html b/fangija-zsyf/views/house/houseManageList.html index 3948832..7b08e84 100644 --- a/fangija-zsyf/views/house/houseManageList.html +++ b/fangija-zsyf/views/house/houseManageList.html @@ -247,7 +247,7 @@ function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap //取得对应城市的value var cityAvgPriceValue = cityAvgPriceMap[cityAvgPriceKey]; if(!isNaN(cityAvgPriceValue) && result.price>0){ - if(parseInt(cityAvgPriceValue)>=parseInt(result.price)){ + 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))+"元
";