This commit is contained in:
2018-04-14 18:19:11 +08:00
parent d31c572ccd
commit 7d0b7a6f32
3 changed files with 24 additions and 7 deletions
@@ -51,7 +51,6 @@ Vue.component('city_increase_ranking',{
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
clicked('/views/user/passLogin.html',true,false,{},{},function(){ clicked('/views/user/passLogin.html',true,false,{},{},function(){
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
}else{ }else{
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
$(event.target).parent().children().removeClass("dn"); $(event.target).parent().children().removeClass("dn");
@@ -60,6 +59,7 @@ Vue.component('city_increase_ranking',{
plus.webview.getWebviewById('views/house/houseDetail.html').reload(); plus.webview.getWebviewById('views/house/houseDetail.html').reload();
plus.webview.getWebviewById('views/house/houseManageList.html').reload(); plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload(); plus.webview.getWebviewById('views/user/userInfo.html').reload();
//cityDetaiVue.$data.citys.push(city);
}).catch(function(error){ }).catch(function(error){
console.log(error) console.log(error)
}) })
@@ -70,6 +70,7 @@ Vue.component('city_increase_ranking',{
$(event.target).parent().children().removeClass("dn"); $(event.target).parent().children().removeClass("dn");
$(event.target).addClass("dn"); $(event.target).addClass("dn");
reloadMyFocus() reloadMyFocus()
cityDetaiVue.$data.citys.push(city);
}).catch(function(error){ }).catch(function(error){
console.log(error) console.log(error)
}) })
@@ -91,6 +92,14 @@ Vue.component('city_increase_ranking',{
$(event.target).addClass("dn"); $(event.target).addClass("dn");
reloadMyFocus(); reloadMyFocus();
//plus.webview.getWebviewById('views/user/userInfo.html').reload() //plus.webview.getWebviewById('views/user/userInfo.html').reload()
var da = cityDetaiVue.$data.citys
if(da && da.length>0){
var index = da.indexOf(city)
if(index>0){
da.splice(index, 1)
cityDetaiVue.$data.citys = da;
}
}
}).catch(function(error){ }).catch(function(error){
console.log(error) console.log(error)
}) })
@@ -66,20 +66,20 @@ Vue.component('city_potential_ranking',{
}) })
}, },
follow:function(city,event){ follow:function(city,event){
alert("wwww")
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
clicked('/views/user/passLogin.html',true,false,{},{},function(){ clicked('/views/user/passLogin.html',true,false,{},{},function(){
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
alert("rrrr")
}else{ }else{
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
$(event.target).parent().children().removeClass("dn"); $(event.target).parent().children().removeClass("dn");
$(event.target).addClass("dn"); $(event.target).addClass("dn");
// plus.webview.getWebviewById('views/house/houseDetail.html').reload(); alert(city)
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
plus.webview.getWebviewById('views/house/houseManageList.html').reload(); plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload(); plus.webview.getWebviewById('views/user/userInfo.html').reload();
reloadMyFocus() reloadMyFocus()
cityDetaiVue.$data.citys.push(city); //cityDetaiVue.$data.citys.push(city);
}).catch(function(error){ }).catch(function(error){
console.log(error) console.log(error)
}) })
@@ -103,6 +103,15 @@ Vue.component('city_potential_ranking',{
$(event.target).parent().children().removeClass("dn"); $(event.target).parent().children().removeClass("dn");
$(event.target).addClass("dn"); $(event.target).addClass("dn");
reloadMyFocus() reloadMyFocus()
var da = cityDetaiVue.$data.citys
if(da && da.length>0){
var index = da.indexOf(city)
if(index>0){
da.splice(index, 1)
cityDetaiVue.$data.citys = da;
}
}
//plus.webview.getWebviewById('views/user/userInfo.html').reload(); //plus.webview.getWebviewById('views/user/userInfo.html').reload();
}).catch(function(error){ }).catch(function(error){
console.log(error) console.log(error)
@@ -1525,7 +1525,6 @@ function addFocus(city){
}else{ }else{
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
reloadMyFocus() reloadMyFocus()
alert("wqqqq")
cityDetaiVue.$data.citys.push(city); cityDetaiVue.$data.citys.push(city);
}).catch(function(error){ }).catch(function(error){
console.log(error) console.log(error)