This commit is contained in:
2018-04-17 18:52:59 +08:00
parent 653d640b5f
commit f57dfbdd91
3 changed files with 99 additions and 15 deletions
@@ -27,8 +27,8 @@ Vue.component('city_increase_ranking',{
'<em class="up">{{!ci.oneMonthUpDownRange||ci.oneMonthUpDownRange==""?"暂无":Math.abs(100*ci.oneMonthUpDownRange).toFixed(2)+"%"}}<i class="icon" v-bind:class="[ci.oneMonthUpDownRange>0?&quot;icon-arrow-red&quot;:&quot;&quot;,ci.oneMonthUpDownRange<0?&quot;icon-arrow-green&quot;:&quot;&quot;]"></i></em>'+
'</div>'+
'<div class="col-20">'+
'<i class="button theme collection collection01 confirm-ok" v-bind:class="{dn:ci.follow}" v-on:click="follow(ci.city,$event, 0)" >关注</i>'+
'<i class="button collection collection02 confirm-ok" v-bind:class="{dn:!ci.follow}" v-on:click="abolish(ci.city,$event, 1)">取消</i>'+
'<i class="button collection collection02 confirm-ok" v-on:click="abolish(ci.city,$event, 1)" v-if="ci.follow">取消</i>'+
'<i class="button theme collection collection01 confirm-ok" v-on:click="follow(ci.city,$event, 0)" v-else>关注</i>'+
'</div>'+
'</div>'+
'</div>'+
@@ -63,8 +63,25 @@ Vue.component('city_increase_ranking',{
if(msg != "取消关注成功" && msg != "关注成功"){
$.toast(msg);
}else{
$(event.target).parent().children().removeClass("dn");
$(event.target).addClass("dn");
//$(event.target).parent().children().removeClass("dn");
//$(event.target).addClass("dn");
var increaseList = cityIncreaseRankingData.cityIncreaseRankingList
if(increaseList && increaseList.length>0){
for(var i in increaseList){
var dd = increaseList[i];
if(dd.city == city){
if(type == 0){
dd.follow = true;
}else{
dd.follow = false;
}
break;
}
}
}
reloadMyFocus()
reloadCityPotentialRanking()
if(type == 0){
@@ -97,8 +114,25 @@ Vue.component('city_increase_ranking',{
$.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");
//$(event.target).parent().children().removeClass("dn");
//$(event.target).addClass("dn");
var increaseList = cityIncreaseRankingData.cityIncreaseRankingList
if(increaseList && increaseList.length>0){
for(var i in increaseList){
var dd = increaseList[i];
if(dd.city == city){
if(type == 0){
dd.follow = true;
}else{
dd.follow = false;
}
break;
}
}
}
reloadMyFocus();
reloadCityPotentialRanking()
//plus.webview.getWebviewById('views/user/userInfo.html').reload()