添加城市过多提示

This commit is contained in:
2018-04-16 14:44:41 +08:00
parent 7cdce5b146
commit c4e62f5e5e
3 changed files with 47 additions and 24 deletions
@@ -53,12 +53,18 @@ 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") == ""){
}else{ }else{
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
var msg = response.data.message;
if(msg != "取消关注成功" && msg != "关注成功"){
$.toast(msg);
}else{
$(event.target).parent().children().removeClass("dn"); $(event.target).parent().children().removeClass("dn");
$(event.target).addClass("dn"); $(event.target).addClass("dn");
reloadMyFocus() reloadMyFocus()
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); //cityDetaiVue.$data.citys.push(city);
}).catch(function(error){ }).catch(function(error){
console.log(error) console.log(error)
@@ -67,10 +73,16 @@ Vue.component('city_increase_ranking',{
}) })
}else{ }else{
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
var msg = response.data.message;
if(msg != "取消关注成功" && msg != "关注成功"){
$.toast(msg);
}else{
$(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); cityDetaiVue.$data.citys.push(city);
}
}).catch(function(error){ }).catch(function(error){
console.log(error) console.log(error)
}) })
@@ -72,6 +72,11 @@ Vue.component('city_potential_ranking',{
alert("rrrr") 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){
var msg = response.data.message;
if(msg != "取消关注成功" && msg != "关注成功"){
$.toast(msg);
}else{
$(event.target).parent().children().removeClass("dn"); $(event.target).parent().children().removeClass("dn");
$(event.target).addClass("dn"); $(event.target).addClass("dn");
alert(city) alert(city)
@@ -80,6 +85,7 @@ Vue.component('city_potential_ranking',{
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)
}) })
@@ -87,11 +93,16 @@ Vue.component('city_potential_ranking',{
}) })
}else{ }else{
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
var msg = response.data.message;
if(msg != "取消关注成功" && msg != "关注成功"){
$.toast(msg);
}else{
$(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); cityDetaiVue.$data.citys.push(city);
//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)
}) })