update
This commit is contained in:
@@ -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?"icon-arrow-red":"",ci.oneMonthUpDownRange<0?"icon-arrow-green":""]"></i></em>'+
|
||||
'</div>'+
|
||||
'<div class="col-20">'+
|
||||
'<i class="button theme collection collection01" v-bind:class="{dn:ci.follow}" v-on:click="follow(ci.city,$event, 0)">关注</i>'+
|
||||
'<i class="button collection collection02" v-bind:class="{dn:!ci.follow}" v-on:click="abolish(ci.city,$event, 1)">取消</i>'+
|
||||
'<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>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
@@ -48,53 +48,39 @@ Vue.component('city_increase_ranking',{
|
||||
})
|
||||
},
|
||||
follow:function(city,event, type){
|
||||
|
||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||
clicked('/views/user/passLogin.html',true,false,{},{},function(){
|
||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||
}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()
|
||||
reloadCityPotentialRanking()
|
||||
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
|
||||
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
|
||||
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||
}
|
||||
|
||||
//cityDetaiVue.$data.citys.push(city);
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
}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()
|
||||
reloadCityPotentialRanking()
|
||||
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()
|
||||
reloadCityPotentialRanking()
|
||||
if(type == 0){
|
||||
var curDatas = cityDetaiVue.$data.citys
|
||||
if(curDatas && curDatas.length>0){
|
||||
if(!IsInArray(curDatas, city)){
|
||||
cityDetaiVue.$data.citys.push(city);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
@@ -108,23 +94,26 @@ Vue.component('city_increase_ranking',{
|
||||
}
|
||||
})
|
||||
}else{
|
||||
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
|
||||
$(event.target).parent().children().removeClass("dn");
|
||||
$(event.target).addClass("dn");
|
||||
reloadMyFocus();
|
||||
reloadCityPotentialRanking()
|
||||
//plus.webview.getWebviewById('views/user/userInfo.html').reload()
|
||||
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;
|
||||
}
|
||||
}
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
$.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();
|
||||
reloadCityPotentialRanking()
|
||||
//plus.webview.getWebviewById('views/user/userInfo.html').reload()
|
||||
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;
|
||||
}
|
||||
}
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -71,24 +71,26 @@ Vue.component('city_potential_ranking',{
|
||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||
|
||||
}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");
|
||||
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
|
||||
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
|
||||
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||
reloadMyFocus()
|
||||
reloadCityIncreaseRanking()
|
||||
//cityDetaiVue.$data.citys.push(city);
|
||||
}
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
$.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");
|
||||
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
|
||||
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
|
||||
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||
reloadMyFocus()
|
||||
reloadCityIncreaseRanking()
|
||||
//cityDetaiVue.$data.citys.push(city);
|
||||
}
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
});
|
||||
}
|
||||
})
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user