diff --git a/fangija-zsyf/js/user/myFocus.js b/fangija-zsyf/js/user/myFocus.js index 910426c..9b6b414 100644 --- a/fangija-zsyf/js/user/myFocus.js +++ b/fangija-zsyf/js/user/myFocus.js @@ -12,15 +12,15 @@ var mf_totalCount = 0; function addEstate(number, lastIndex) { mf_curpage = mf_lastIndex/mf_itemsPerLoad + 1; axios.get("/rest/myCollection/loadCollections",{params:{pageSize:mf_itemsPerLoad,page:mf_curpage}}).then(function(response){ + data = response.data; - //data = eval( '(' + data + ')' ); + if(data['results']==null || data['results'].length==0) { $('#loadTip2').remove(); //$('.infinite-scroll-bottom #tab1').html("

您还没有关注小区

"); return; } mf_totalCount = data.totalCount; -// tab.mf_num = mf_totalCount; $("#mf_num").html("关注("+mf_totalCount+")") // 生成新条目的HTML var html = ''; @@ -71,7 +71,7 @@ function addEstate(number, lastIndex) { ''+ '
'+tagStr+'
'+ ''+ - ''+ + '取消关注'+ ''; }); // 添加新条目 @@ -89,4 +89,25 @@ function addEstate(number, lastIndex) { }).catch(function(error){ console.log(error) }); +} + +// 取消关注 +function removeCollect(city,region,name,obj){ + axios.post("/rest/districts/removeCollect",{city:city,region:region,name:name}).then(function (response) { + var msg = response.data.message + if(msg){ + $.toast(msg); + } else { + $.toast("取消关注"); + } + /*mf_curpage = 1; + $("#mf_ul").html(""); + addEstate(mf_itemsPerLoad, 0);*/ + $(obj).parent().remove(); + mf_totalCount = mf_totalCount - 1; + $("#mf_num").html("关注("+mf_totalCount+")") + }) + .catch(function (error) { + console.log(error); + }); } \ No newline at end of file diff --git a/fangija-zsyf/views/user/userInfo.html b/fangija-zsyf/views/user/userInfo.html index 0a754bb..4248f55 100644 --- a/fangija-zsyf/views/user/userInfo.html +++ b/fangija-zsyf/views/user/userInfo.html @@ -30,6 +30,8 @@ .buttons-tab .button{font-size:0.75rem;color:#999;line-height:2.5rem;height:2.5rem;} .list-block ul:before{height:0;} .cardInfo:first-child{border-top:none;} + + #tabList2 .collection02{top:inherit;bottom:0.75rem;}