From 3eda178c366e91eb682015da2c541e87a182d1dd Mon Sep 17 00:00:00 2001 From: zongzhimin Date: Sat, 14 Apr 2018 11:43:10 +0800 Subject: [PATCH] YOUFANG --- .../views/component/cityIncreaseRankingComponent.js | 12 ++++++++++-- .../views/component/cityPotentialRankingComponent.js | 11 ++++++++++- fangija-zsyf/views/house/houseDetail.html | 11 +++++++++-- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js index 53c55ff..ae6f51f 100644 --- a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js +++ b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js @@ -49,11 +49,20 @@ Vue.component('city_increase_ranking',{ }, follow:function(city,event){ 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{ + 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(); + }).catch(function(error){ + console.log(error) + }) } }) }else{ @@ -61,7 +70,6 @@ Vue.component('city_increase_ranking',{ $(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) }) diff --git a/fangija-zsyf/views/component/cityPotentialRankingComponent.js b/fangija-zsyf/views/component/cityPotentialRankingComponent.js index 5acd4f8..d754df3 100644 --- a/fangija-zsyf/views/component/cityPotentialRankingComponent.js +++ b/fangija-zsyf/views/component/cityPotentialRankingComponent.js @@ -67,11 +67,20 @@ Vue.component('city_potential_ranking',{ }, follow:function(city,event){ 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{ + 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() + }).catch(function(error){ + console.log(error) + }) } }) }else{ diff --git a/fangija-zsyf/views/house/houseDetail.html b/fangija-zsyf/views/house/houseDetail.html index 33acfc3..ed82840 100644 --- a/fangija-zsyf/views/house/houseDetail.html +++ b/fangija-zsyf/views/house/houseDetail.html @@ -1472,12 +1472,19 @@ function markFocus(){ function addFocus(city){ 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{ - + axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ + reloadMyFocus() + createData(city, myDatasVue.$data.cityDatas.length); + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + }).catch(function(error){ + console.log(error) + }) } }) }else{