diff --git a/fangija-zsyf/js/axiosPlugin.js b/fangija-zsyf/js/axiosPlugin.js index b3f4b53..39e6d98 100644 --- a/fangija-zsyf/js/axiosPlugin.js +++ b/fangija-zsyf/js/axiosPlugin.js @@ -14,6 +14,14 @@ axios.interceptors.request.use(function (config) { axios.interceptors.response.use(function (response) { return response; }, function (error) { - clicked('error.html',true,false,{},{},function(){}) + if(error=="Error: Network Error"){ + if(plus.webview.getWebviewById('error.html')==null){ + clicked('error.html',true,false,{},{},function(){ + window.location.reload(); + }) + }else{ + plus.webview.getWebviewById("error.html").show(); + } + } return Promise.reject(error); }); \ No newline at end of file diff --git a/fangija-zsyf/js/district/districtDetail.js b/fangija-zsyf/js/district/districtDetail.js index 00f2244..e70cffb 100644 --- a/fangija-zsyf/js/district/districtDetail.js +++ b/fangija-zsyf/js/district/districtDetail.js @@ -9,10 +9,6 @@ var mapLoadCount = 0; /* 关注&已关注切换 */ -$(".collection01").on("click", function () { - doAddCollect() -}); - function doAddCollect(){ if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { clicked('../user/codeSms.html',true,false,{},{},function(){ @@ -34,7 +30,6 @@ function addCollect(){ $(".collection02").show(); $.toast("随时掌握小区动态"); } - alert(12) plus.webview.getWebviewById('views/user/userInfo.html').reload(); plus.webview.getWebviewById('yfindex.html').reload(); plus.webview.getWebviewById('views/house/houseManageList.html').reload(); @@ -79,22 +74,22 @@ function removeCollect(){ } /* button状态切换 */ -$("#trendTabDiv .button").on("click", function () { +/*$("#trendTabDiv .button").on("click", function () { $(this).parent().children().removeClass("active"); $(this).addClass("active"); }); - +*/ /* 图表切换 */ -$("#tabAvgDiv").on("click", function () { +/*$("#tabAvgDiv").on("click", function () { $("#tabChart1").css("z-index","1"); $("#tabChart2").css("z-index","-1"); }); $("#tabRentDiv").on("click", function () { $("#tabChart2").css("z-index","1"); $("#tabChart1").css("z-index","-1"); -}); +});*/ -var t1 = window.setInterval(loadMap,1000); +/*var t1 = window.setInterval(loadMap,1000); function loadMap(){ mapLoadCount++; if(lng && lat){ @@ -109,6 +104,17 @@ function loadMap(){ $("#mapDiv").hide(); } } +}*/ +function showLoadRentTrends(type) { + if(type == 3) { + document.getElementById("trendDivTab3").setAttribute("class","tab-link button active"); + document.getElementById("trendDivTab2").setAttribute("class","tab-link button"); + } else { + document.getElementById("trendDivTab3").setAttribute("class","tab-link button"); + document.getElementById("trendDivTab2").setAttribute("class","tab-link button active"); + } + + loadRentTrends(city, region, name,type); } //小区详情 @@ -213,7 +219,6 @@ function loadDistrictInfo(){ } }).catch(function (error) { - alert(error) console.log(error); }); } @@ -247,7 +252,6 @@ function loadDistrictInfo(){ } }).catch(function (error) { - alert(error) console.log(error); }); }*/ @@ -296,22 +300,17 @@ function loadKLineData(city, region, name){ } }).catch(function (error) { - alert(error) console.log(error); }); } -$("#trendDiv1 a").click(function(){ - //showTrends(); - var v = $(this).attr("t-v"); - showTrends(v) -}); function showTrends(v){ if(v == "36"){ if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { clicked('../user/codeSms.html',true,false,{},{},function(){ showTrends(v); + plus.webview.getWebviewById('views/user/userInfo.html').reload(); }) return; } else { @@ -383,7 +382,7 @@ var option01 = { type: 'slider', xAxisIndex: [0, 1], realtime: false, - start: 50, + start: 0, end: 100, top: 65, height: 20, @@ -534,8 +533,8 @@ $("#trendDiv2 a").click(function(){ /* 小区租金走势 */ -function loadRentTrends(city, region, name){ - var type = $("#trendDiv2 a.active").attr("t-v") +function loadRentTrends(city, region, name, type){ + if(type == undefined) type= 2; axios.get("/rest/trend/distRentTrends", { params: { city: city, @@ -583,7 +582,6 @@ function loadRentTrends(city, region, name){ $("#tabRentDiv").addClass("dn") } }).catch(function (error) { - alert(error) console.log(error); }); } diff --git a/fangija-zsyf/js/quotations/cityDetail.js b/fangija-zsyf/js/quotations/cityDetail.js index 8c27744..a97034f 100644 --- a/fangija-zsyf/js/quotations/cityDetail.js +++ b/fangija-zsyf/js/quotations/cityDetail.js @@ -1,9 +1,9 @@ var ret = [] -function loadMyCollectCity(){ +function loadCurCity(city){ axios.get("/rest/quotations/userCollectCitys",{}).then(function (response) { var curDatas = response.data.data - if(curDatas){ + if(curDatas && curDatas.length>0){ if(IsInArray(curDatas, city)){ cityInfoVue.$data.collecd = true; }else{ @@ -12,7 +12,6 @@ function loadMyCollectCity(){ } }).catch(function (error) { - alert(error) console.log(error); }); } @@ -39,7 +38,6 @@ function loadCityPriceInfo(city){ cityInfoVue.$data.myCityMap = cityObj; } }).catch(function (error) { - alert(error) console.log(error); }); @@ -56,7 +54,6 @@ function loadUpOrDown(city){ loadUpOrDownChart(data2.downRate, data2.upRate); } }).catch(function (error) { - alert(error) console.log(error); }); } @@ -73,7 +70,6 @@ function loadCityPricesAndCounts(city){ loadTrends(data3.times, data3.cityPriceMap , data3.countMap); } }).catch(function (error) { - alert(error) console.log(error); }); } @@ -102,7 +98,6 @@ function loadHotDistrict(city){ cityInfoVue.$data.nears = nears; } }).catch(function (error) { - alert(error) console.log(error); }); } @@ -163,7 +158,6 @@ function startingLoadCharts(city, type){ showChart("price_chart", times, prices, counts) }).catch(function (error) { - alert(error) console.log(error); }); } @@ -183,6 +177,7 @@ function loadUpOrDownChart(downRate, upRate){ dataUp = [cityObj1, cityObj2] addUpChart(dataUp) + $("#up_chart").parent().parent().show(); }else{ $("#up_chart").parent().parent().hide() } @@ -198,6 +193,7 @@ function loadUpOrDownChart(downRate, upRate){ dataDown = [cityObj3, cityObj4] addDownChart(dataDown) + $("#down_chart").parent().parent().show(); }else{ $("#down_chart").parent().parent().hide() } @@ -464,9 +460,29 @@ function docollectCity(city){ var msg = response.data.message; if(msg){ if(msg == "取消关注成功"){ - cityInfoVue.$data.collecd = false; + try{ + cityInfoVue.$data.collecd = false; + + 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; + if(da.length>0){ + $("a[href='#tabQuotation0']").click(); + } + } + } + }catch(e){ + + } + + + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); }else if(msg == "关注成功"){ cityInfoVue.$data.collecd = true; + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); }else{ $.toast(msg); } @@ -478,3 +494,4 @@ function docollectCity(city){ }); } + diff --git a/fangija-zsyf/js/quotations/collectCity.js b/fangija-zsyf/js/quotations/collectCity.js index 1e51f55..b8107b0 100644 --- a/fangija-zsyf/js/quotations/collectCity.js +++ b/fangija-zsyf/js/quotations/collectCity.js @@ -157,7 +157,6 @@ function loadMyCollectCity(){ }).catch(function (error) { - alert(error) console.log(error); }); } @@ -307,7 +306,6 @@ function startingLoadCharts(city, type, num){ showChart(num+"_price_chart", times, prices, counts) }).catch(function (error) { - alert(error) console.log(error); }); } diff --git a/fangija-zsyf/js/searchDistrict-add.js b/fangija-zsyf/js/searchDistrict-add.js index ea3df37..7405e61 100644 --- a/fangija-zsyf/js/searchDistrict-add.js +++ b/fangija-zsyf/js/searchDistrict-add.js @@ -56,7 +56,6 @@ $("#districtName").bind("input propertychange keyup" , function () { $('.searchList').show(); } }).catch(function (error) { - alert(error) console.log(error); }); @@ -144,7 +143,6 @@ function addHotDistricts(cityParam){ } }).catch(function (error) { - alert(error) console.log(error); }); } diff --git a/fangija-zsyf/js/searchDistrict-app.js b/fangija-zsyf/js/searchDistrict-app.js index 54b3567..fbe4401 100644 --- a/fangija-zsyf/js/searchDistrict-app.js +++ b/fangija-zsyf/js/searchDistrict-app.js @@ -65,7 +65,6 @@ $("#districtName").bind("input propertychange keyup" , function () { $('.searchList').show(); } }).catch(function (error) { - alert(error) console.log(error); }); @@ -150,7 +149,6 @@ function addHotDistricts(cityParam){ } }).catch(function (error) { - alert(error) console.log(error); }); } diff --git a/fangija-zsyf/js/updateVersion/searchDistrict-app.js b/fangija-zsyf/js/updateVersion/searchDistrict-app.js index dab006f..7123fe0 100644 --- a/fangija-zsyf/js/updateVersion/searchDistrict-app.js +++ b/fangija-zsyf/js/updateVersion/searchDistrict-app.js @@ -53,7 +53,6 @@ $("#districtName").bind("input propertychange keyup" , function () { $('.searchList').show(); } }).catch(function (error) { - alert(error) console.log(error); }); @@ -134,7 +133,6 @@ function addHotDistricts(cityParam){ } }).catch(function (error) { - alert(error) console.log(error); }); } diff --git a/fangija-zsyf/manifest.json b/fangija-zsyf/manifest.json index 6bbd6c7..10a872c 100644 --- a/fangija-zsyf/manifest.json +++ b/fangija-zsyf/manifest.json @@ -1620,7 +1620,8 @@ "views/user/passLogin.html", "views/district/detail.html", "views/setting/setting.html", - "views/user/codeSms.html" + "views/user/codeSms.html", + "views/house/detail.html" ], "priority": 0 }, @@ -1668,7 +1669,25 @@ "priority": 0 }, "views/house/houseDetail.html": { - "resources": [], + "resources": [ + "views/component/cityIncreaseRankingComponent.js", + "js/echarts.js", + "css/main.css", + "js/axiosPlugin.js", + "js/quotations/cityDetail.js", + "js/light7.js", + "views/component/cityPotentialRankingComponent.js", + "js/cn.js", + "views/component/myFocusComponent.js", + "js/zepto.js", + "css/city.css", + "js/log/log_stat.js", + "js/common.js", + "js/axios.min.js", + "js/vue.js", + "views/component/cityChooseComponent.js", + "js/highcharts-4.2.3.js" + ], "refer": [ "views/house/regions.html", "views/district/detail.html", diff --git a/fangija-zsyf/views/component/baseInfoComponent.js b/fangija-zsyf/views/component/baseInfoComponent.js index b272aa6..f7ce495 100644 --- a/fangija-zsyf/views/component/baseInfoComponent.js +++ b/fangija-zsyf/views/component/baseInfoComponent.js @@ -33,56 +33,56 @@ Vue.component('base-info-component', {

{{finishBuildingDate}} - 暂无数据 + 暂无

{{cubagePercent}} - 暂无数据 + 暂无

{{virescencePercent}} - 暂无数据 + 暂无

{{moreArea}} - 暂无数据 + 暂无

{{developer}} - 暂无数据 + 暂无

{{estateCompany}} - 暂无数据 + 暂无

{{householdCount}} - 暂无数据 + 暂无

{{carSiteCount}} - 暂无数据 + 暂无

{{estateCharge}}元/㎡/月 - 暂无数据 + 暂无

@@ -215,7 +215,6 @@ Vue.component('base-info-component', { } }).catch(function (error) { - alert(error) console.log(error); }); } diff --git a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js index 53c55ff..ae6f51f 100644 --- a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js +++ b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js @@ -49,11 +49,20 @@ Vue.component('city_increase_ranking',{ }, follow:function(city,event){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ - alert("请先登录") 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"); + $(event.target).addClass("dn"); + reloadMyFocus() + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + }).catch(function(error){ + console.log(error) + }) } }) }else{ @@ -61,7 +70,6 @@ Vue.component('city_increase_ranking',{ $(event.target).parent().children().removeClass("dn"); $(event.target).addClass("dn"); reloadMyFocus() - //plus.webview.getWebviewById('views/user/userInfo.html').reload() }).catch(function(error){ console.log(error) }) diff --git a/fangija-zsyf/views/component/cityPotentialRankingComponent.js b/fangija-zsyf/views/component/cityPotentialRankingComponent.js index 5acd4f8..d754df3 100644 --- a/fangija-zsyf/views/component/cityPotentialRankingComponent.js +++ b/fangija-zsyf/views/component/cityPotentialRankingComponent.js @@ -67,11 +67,20 @@ Vue.component('city_potential_ranking',{ }, follow:function(city,event){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ - alert("请先登录") 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"); + $(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() + }).catch(function(error){ + console.log(error) + }) } }) }else{ diff --git a/fangija-zsyf/views/component/mapComponent.js b/fangija-zsyf/views/component/mapComponent.js index c668508..47a7c8d 100644 --- a/fangija-zsyf/views/component/mapComponent.js +++ b/fangija-zsyf/views/component/mapComponent.js @@ -28,7 +28,6 @@ Vue.component('map-component', { loadMapPoi(); } }).catch(function (error) { - alert(error) console.log(error); }); } diff --git a/fangija-zsyf/views/component/nearDist.js b/fangija-zsyf/views/component/nearDist.js index a955c91..cc18123 100644 --- a/fangija-zsyf/views/component/nearDist.js +++ b/fangija-zsyf/views/component/nearDist.js @@ -10,7 +10,7 @@ Vue.component('near-dist-component', {
{{dist.sname}}
-
{{dist.avgPrice}}元/㎡
+
{{dist.avgPrice?(dist.avgPrice+"元/㎡"):'暂无'}}
@@ -60,7 +60,6 @@ Vue.component('near-dist-component', { } }).catch(function (error) { - alert(error) console.log(error); }); }, diff --git a/fangija-zsyf/views/component/roomRent.js b/fangija-zsyf/views/component/roomRent.js index fcf8574..572f231 100644 --- a/fangija-zsyf/views/component/roomRent.js +++ b/fangija-zsyf/views/component/roomRent.js @@ -36,7 +36,6 @@ Vue.component('room-rent-component', { } }).catch(function (error) { - alert(error) console.log(error); }); } diff --git a/fangija-zsyf/views/component/trends.js b/fangija-zsyf/views/component/trends.js index ce57843..8c86456 100644 --- a/fangija-zsyf/views/component/trends.js +++ b/fangija-zsyf/views/component/trends.js @@ -171,7 +171,6 @@ function loadRentTrends(city, region, name){ $("#tabRentDiv").addClass("dn"); } }).catch(function (error) { - alert(error) console.log(error); }); } diff --git a/fangija-zsyf/views/district/detail.html b/fangija-zsyf/views/district/detail.html index 562d89e..0b3a0d8 100644 --- a/fangija-zsyf/views/district/detail.html +++ b/fangija-zsyf/views/district/detail.html @@ -70,8 +70,8 @@
{{city}}{{region}}{{address}}
- 关注 - 取消关注 + 关注 + 取消关注
@@ -114,17 +114,17 @@
@@ -132,8 +132,8 @@
@@ -165,7 +165,7 @@
-
+
位置及周边