var cityIncreaseRankingData = {cityIncreaseRankingList:[],test:"ttt"}; Vue.component('city_increase_ranking',{ template:'
'+ ''+ '
', data:function(){ return cityIncreaseRankingData; }, methods:{ loadCityIncreaseRanking:function(){ axios.get("/rest/quotations/potentialUpTopInfos").then(function(response){ cityIncreaseRankingData.cityIncreaseRankingList = response.data.data; }).catch(function(error){ console.log(error) }) }, follow:function(city,event){ axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ $(event.target).parent().children().removeClass("dn"); $(event.target).addClass("dn"); }).catch(function(error){ console.log(error) }) }, abolish:function(city,event){ axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ $(event.target).parent().children().removeClass("dn"); $(event.target).addClass("dn"); }).catch(function(error){ console.log(error) }) } }, mounted:function(){ this.loadCityIncreaseRanking(); } })