update
This commit is contained in:
@@ -94,49 +94,54 @@ Vue.component('city_potential_ranking',{
|
||||
}
|
||||
})
|
||||
}else{
|
||||
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
|
||||
var msg = response.data.message;
|
||||
if(msg != "取消关注成功" && msg != "关注成功"){
|
||||
$.toast(msg);
|
||||
}else{
|
||||
$(event.target).parent().children().removeClass("dn");
|
||||
$(event.target).addClass("dn");
|
||||
reloadMyFocus()
|
||||
reloadCityIncreaseRanking()
|
||||
if(type == 0){
|
||||
var curDatas = cityDetaiVue.$data.citys
|
||||
if(curDatas && curDatas.length>0){
|
||||
if(!IsInArray(curDatas, city)){
|
||||
cityDetaiVue.$data.citys.push(city);
|
||||
$.confirm('您确定要关注'+city+"?", function () {
|
||||
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
|
||||
var msg = response.data.message;
|
||||
if(msg != "取消关注成功" && msg != "关注成功"){
|
||||
$.toast(msg);
|
||||
}else{
|
||||
$(event.target).parent().children().removeClass("dn");
|
||||
$(event.target).addClass("dn");
|
||||
reloadMyFocus()
|
||||
reloadCityIncreaseRanking()
|
||||
if(type == 0){
|
||||
var curDatas = cityDetaiVue.$data.citys
|
||||
if(curDatas && curDatas.length>0){
|
||||
console.log("ddd");
|
||||
if(!IsInArray(curDatas, 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){
|
||||
console.log(error)
|
||||
})
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
abolish:function(city,event,type){
|
||||
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
|
||||
$(event.target).parent().children().removeClass("dn");
|
||||
$(event.target).addClass("dn");
|
||||
reloadMyFocus()
|
||||
reloadCityIncreaseRanking()
|
||||
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;
|
||||
$.confirm("您确定要取消关注?", function () {
|
||||
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
|
||||
$(event.target).parent().children().removeClass("dn");
|
||||
$(event.target).addClass("dn");
|
||||
reloadMyFocus()
|
||||
reloadCityIncreaseRanking()
|
||||
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();
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
//plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted:function(){
|
||||
@@ -159,7 +164,10 @@ function reloadCityPotentialRanking(){
|
||||
})
|
||||
cityPotentialRankingData.cityPotentialRankingList = response.data.data;
|
||||
|
||||
|
||||
|
||||
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user