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
+1 -1
View File
@@ -521,7 +521,7 @@ function docollectCity(city, type){
if(index>=0){
da.splice(index, 1)
cityDetaiVue.$data.citys = da;
if(da.length>0){
if(da.length==0){
$("a[href='#tabQuotation0']").click();
}
}
@@ -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()
@@ -33,8 +33,8 @@ Vue.component('city_potential_ranking',{
'</span>'+
'</div>'+
'<div class="col-20">'+
'<i class="button theme collection collection01" v-bind:class="{dn:cp.follow}" v-on:click="follow(cp.city,$event,0)">关注</i>'+
'<i class="button collection collection02" v-bind:class="{dn:!cp.follow}" v-on:click="abolish(cp.city,$event,1)">取消</i>'+
'<i class="button collection collection02 confirm-ok" v-on:click="abolish(cp.city,$event,1)" v-if="cp.follow" >取消</i>'+
'<i class="button theme collection collection01 confirm-ok" v-on:click="follow(cp.city,$event,0)" v-else>关注</i>'+
'</div>'+
'</div>'+
'</div>'+
@@ -78,8 +78,23 @@ Vue.component('city_potential_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 rankList = cityPotentialRankingData.cityPotentialRankingList
if(rankList && rankList.length>0){
for(var i in rankList){
var dd = rankList[i];
if(dd.city == city){
if(type == 0){
dd.follow = true;
}else{
dd.follow = false;
}
break;
}
}
}
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
@@ -100,8 +115,26 @@ Vue.component('city_potential_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 rankList = cityPotentialRankingData.cityPotentialRankingList
if(rankList && rankList.length>0){
for(var i in rankList){
var dd = rankList[i];
if(dd.city == city){
if(type == 0){
dd.follow = true;
}else{
dd.follow = false;
}
break;
}
}
}
reloadMyFocus()
reloadCityIncreaseRanking()
if(type == 0){
@@ -124,8 +157,25 @@ Vue.component('city_potential_ranking',{
abolish:function(city,event,type){
$.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 rankList = cityPotentialRankingData.cityPotentialRankingList
if(rankList && rankList.length>0){
for(var i in rankList){
var dd = rankList[i];
if(dd.city == city){
if(type == 0){
dd.follow = true;
}else{
dd.follow = false;
}
break;
}
}
}
reloadMyFocus()
reloadCityIncreaseRanking()
var da = cityDetaiVue.$data.citys