diff --git a/fangija-zsyf/js/quotations/cityDetail.js b/fangija-zsyf/js/quotations/cityDetail.js index a97034f..12aa4d7 100644 --- a/fangija-zsyf/js/quotations/cityDetail.js +++ b/fangija-zsyf/js/quotations/cityDetail.js @@ -1,6 +1,33 @@ var ret = [] +function loadMyCollectCity(){ + plus.nativeUI.showWaiting(); + axios.get("/rest/quotations/userCollectCitys",{}).then(function (response) { + var curDatas = response.data.data + if(curDatas && curDatas.length>0){ + if(positionCity){ + if(!IsInArray(curDatas, positionCity)){ + curDatas.splice(0,0, positionCity) + } + } + cityDetaiVue.$data.citys = curDatas; + }else{ + if(positionCity){ + cityDetaiVue.$data.citys.push(positionCity); + } + + $("#cityInfo").hide() + } + plus.nativeUI.closeWaiting(); + }).catch(function (error) { + console.log(error); + }); +} + + function loadCurCity(city){ + plus.nativeUI.showWaiting(); + axios.get("/rest/quotations/userCollectCitys",{}).then(function (response) { var curDatas = response.data.data if(curDatas && curDatas.length>0){ @@ -10,7 +37,7 @@ function loadCurCity(city){ cityInfoVue.$data.collecd = false; } } - + plus.nativeUI.closeWaiting(); }).catch(function (error) { console.log(error); }); @@ -478,8 +505,9 @@ function docollectCity(city){ } - - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + //loadMyCollectCity(); + $("a[href='#tabQuotation1']").click(); + //plus.webview.getWebviewById('views/house/houseDetail.html').reload(); }else if(msg == "关注成功"){ cityInfoVue.$data.collecd = true; plus.webview.getWebviewById('views/house/houseDetail.html').reload(); diff --git a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js index ae6f51f..de7e321 100644 --- a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js +++ b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js @@ -51,7 +51,6 @@ Vue.component('city_increase_ranking',{ 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}}).then(function(response){ $(event.target).parent().children().removeClass("dn"); @@ -60,6 +59,7 @@ Vue.component('city_increase_ranking',{ 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) }) @@ -70,6 +70,7 @@ Vue.component('city_increase_ranking',{ $(event.target).parent().children().removeClass("dn"); $(event.target).addClass("dn"); reloadMyFocus() + cityDetaiVue.$data.citys.push(city); }).catch(function(error){ console.log(error) }) @@ -90,7 +91,15 @@ Vue.component('city_increase_ranking',{ $(event.target).parent().children().removeClass("dn"); $(event.target).addClass("dn"); reloadMyFocus(); - //plus.webview.getWebviewById('views/user/userInfo.html').reload() + //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) }) diff --git a/fangija-zsyf/views/component/cityPotentialRankingComponent.js b/fangija-zsyf/views/component/cityPotentialRankingComponent.js index d754df3..8875151 100644 --- a/fangija-zsyf/views/component/cityPotentialRankingComponent.js +++ b/fangija-zsyf/views/component/cityPotentialRankingComponent.js @@ -69,15 +69,17 @@ Vue.component('city_potential_ranking',{ 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") == ""){ - + alert("rrrr") }else{ axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ $(event.target).parent().children().removeClass("dn"); $(event.target).addClass("dn"); + alert(city) 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() + //cityDetaiVue.$data.citys.push(city); }).catch(function(error){ console.log(error) }) @@ -88,6 +90,7 @@ Vue.component('city_potential_ranking',{ $(event.target).parent().children().removeClass("dn"); $(event.target).addClass("dn"); reloadMyFocus() + cityDetaiVue.$data.citys.push(city); //plus.webview.getWebviewById('views/user/userInfo.html').reload(); }).catch(function(error){ console.log(error) @@ -100,6 +103,15 @@ Vue.component('city_potential_ranking',{ $(event.target).parent().children().removeClass("dn"); $(event.target).addClass("dn"); reloadMyFocus() + + 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; + } + } //plus.webview.getWebviewById('views/user/userInfo.html').reload(); }).catch(function(error){ console.log(error) diff --git a/fangija-zsyf/views/district/arround.html b/fangija-zsyf/views/district/arround.html index ced7778..8b233e4 100644 --- a/fangija-zsyf/views/district/arround.html +++ b/fangija-zsyf/views/district/arround.html @@ -47,35 +47,35 @@ diff --git a/fangija-zsyf/views/house/detail.html b/fangija-zsyf/views/house/detail.html index a64d222..39c725e 100644 --- a/fangija-zsyf/views/house/detail.html +++ b/fangija-zsyf/views/house/detail.html @@ -521,6 +521,8 @@ function addManagement(id, houseStatus, liveStatus){ }).then(function (response) { var status = response.data.status; if(status){ + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + plus.webview.getWebviewById('views/user/userInfo.html').reload(); $.toast("修改状态成功!"); plus.webview.getWebviewById('views/user/userInfo.html').reload(); }else{ diff --git a/fangija-zsyf/views/house/houseDetail.html b/fangija-zsyf/views/house/houseDetail.html index f04f162..94d6241 100644 --- a/fangija-zsyf/views/house/houseDetail.html +++ b/fangija-zsyf/views/house/houseDetail.html @@ -1434,8 +1434,13 @@ $("a[href='#tabQuotation1'],a[href='#tabQuotation0']").click(function(){ $("#cityInfo").hide() }) + + function clickCity(val){ + city = val; + + $("#cityInfo").show() $("#tabCityDiv a").removeClass("active"); // $("a[href="+val+"]").addClass("active"); @@ -1535,30 +1540,6 @@ function hotCity(city){ } -function loadMyCollectCity(){ - axios.get("/rest/quotations/userCollectCitys",{}).then(function (response) { - var curDatas = response.data.data - if(curDatas && curDatas.length>0){ - if(positionCity){ - if(!IsInArray(curDatas, positionCity)){ - curDatas.splice(0,0, positionCity) - } - } - cityDetaiVue.$data.citys = curDatas; - }else{ - if(positionCity){ - cityDetaiVue.$data.citys.push(positionCity); - } - - $("#cityInfo").hide() - } - - }).catch(function (error) { - console.log(error); - }); - - -} diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html index 6653128..2525d05 100644 --- a/fangija-zsyf/yfindex.html +++ b/fangija-zsyf/yfindex.html @@ -1740,7 +1740,7 @@ function addItems(number, lastIndex) { ''; } if(dataObj[i].type=="推荐小区"){ - html += '
'+ + html += '
'+ '
'+ '
  • '+ '
    '+ @@ -2622,7 +2622,6 @@ function openIntelligentHouseView() { } function openDistWindow(city, region, name){ clicked('views/district/detail.html',true,false,{},{city:city,region:region,name:name}); - }