From 0526a1b877642d0bd4926a8ccb5ef9e4ed13e462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E5=90=89=E6=AC=A2?= Date: Fri, 27 Apr 2018 16:11:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=84=E4=BC=B0=E5=AE=A1=E6=A0=B8=E5=B4=A9?= =?UTF-8?q?=E6=BA=83bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/js/district/districtDetail.js | 45 ++++++++++++++----- fangija-zsyf/js/quotations/cityDetail.js | 36 +++++++++++---- fangija-zsyf/js/quotations/collectCity.js | 14 ++++-- fangija-zsyf/manifest.json | 2 +- .../component/cityIncreaseRankingComponent.js | 22 ++++++--- .../cityPotentialRankingComponent.js | 23 +++++++--- .../views/evaluate/evaluateReport.html | 9 +++- fangija-zsyf/views/house/add.html | 28 +++++++++--- fangija-zsyf/views/house/detail.html | 10 +++-- fangija-zsyf/views/house/houseDetail.html | 13 ++++-- fangija-zsyf/views/house/houseManageList.html | 4 +- fangija-zsyf/views/news/newsDetail.html | 14 ++++-- fangija-zsyf/views/setting/setting.html | 14 ++++-- fangija-zsyf/views/user/userInfo.html | 11 +++-- 14 files changed, 186 insertions(+), 59 deletions(-) diff --git a/fangija-zsyf/js/district/districtDetail.js b/fangija-zsyf/js/district/districtDetail.js index dab296b..9064e24 100644 --- a/fangija-zsyf/js/district/districtDetail.js +++ b/fangija-zsyf/js/district/districtDetail.js @@ -12,9 +12,17 @@ var mapLoadCount = 0; function doAddCollect(){ if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { clicked('../user/codeSms.html',true,false,{},{},function(){ - plus.webview.getWebviewById('views/user/userInfo.html').reload(); - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } + + if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) { + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + } + + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } doAddCollect(); }) return; @@ -32,7 +40,9 @@ function addCollect(){ $(".collection01").hide(); $(".collection02").show(); $.toast("随时掌握小区动态"); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } } }) @@ -49,7 +59,9 @@ function doRemoveCollect(){ if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { clicked('../user/codeSms.html',true,false,{},{},function(){ doRemoveCollect(); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } }) return; } else { @@ -67,9 +79,14 @@ function removeCollect(){ $(".collection01").show(); $.toast("取消关注"); } - plus.webview.getWebviewById('views/user/userInfo.html').reload(); + if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) { + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + } + + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } plus.webview.getWebviewById('yfindex.html').reload(); - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); }) .catch(function (error) { console.log(error); @@ -313,9 +330,17 @@ function showTrends(v){ 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(); - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } + + if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) { + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + } + + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } }) return; } else { diff --git a/fangija-zsyf/js/quotations/cityDetail.js b/fangija-zsyf/js/quotations/cityDetail.js index 3fb27b6..2ba1351 100644 --- a/fangija-zsyf/js/quotations/cityDetail.js +++ b/fangija-zsyf/js/quotations/cityDetail.js @@ -198,9 +198,17 @@ function clickTrend(city, type){ if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { clicked('../user/codeSms.html',true,false,{},{},function(){ clickTrend(city, type); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } + + if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) { + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + } + + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } }) return; } else { @@ -543,9 +551,13 @@ function collectCity(city, type){ if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { clicked('../user/codeSms.html',true,false,{},{},function(){ collectCity(city, type) - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); - //plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) { + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + } + + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } }) return; } else { @@ -562,7 +574,9 @@ function collectCity(city, type){ // plus.webview.getWebviewById('views/house/houseDetail.html').reload(); },function(){ - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } //loadMyCollectCity(); }); @@ -602,13 +616,17 @@ function docollectCity(city, type){ //loadMyCollectCity(); $("a[href='#tabQuotation1']").click(); - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } //reloadMyFocus(); //reloadCityPotentialRanking() //reloadCityIncreaseRanking() }else if(msg == "关注成功"){ cityInfoVue.$data.collecd = true; - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } //reloadMyFocus(); //reloadCityPotentialRanking() //reloadCityIncreaseRanking() diff --git a/fangija-zsyf/js/quotations/collectCity.js b/fangija-zsyf/js/quotations/collectCity.js index b8107b0..bd7c6f1 100644 --- a/fangija-zsyf/js/quotations/collectCity.js +++ b/fangija-zsyf/js/quotations/collectCity.js @@ -528,10 +528,18 @@ function showRegionInfo(city){ function collectCity(city, index){ if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { clicked('../user/codeSms.html',true,false,{},{},function(){ - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } collectCity(city) - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); + + if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) { + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + } + + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } }) return; diff --git a/fangija-zsyf/manifest.json b/fangija-zsyf/manifest.json index 4adc425..4a8af33 100644 --- a/fangija-zsyf/manifest.json +++ b/fangija-zsyf/manifest.json @@ -7,7 +7,7 @@ "id": "H5693FF3D",/*应用的标识,创建应用时自动生成,勿手动修改*/ "name": "有房",/*应用名称,程序桌面图标名称*/ "version": { - "name": "1.1.5",/*应用版本名称*/ + "name": "1.1.6",/*应用版本名称*/ "code": "20109" }, "description": "有房,围绕房产提供全方位数据分析的房产及金融服务平台,通过个性化的智能推荐,定制专属的个人投资或购房计划,多维度管理自有房产并提供房产融资通道。",/*应用描述信息*/ diff --git a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js index 09e3987..3f4012b 100644 --- a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js +++ b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js @@ -58,7 +58,9 @@ Vue.component('city_increase_ranking',{ var msg = response.data.message; if(msg != "取消关注成功" && msg != "关注成功"){ $.toast(msg); - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + if (plus.webview.getWebviewById('views/house/houseDetail.html') != null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } }else{ //$(event.target).parent().children().removeClass("dn"); //$(event.target).addClass("dn"); @@ -80,7 +82,9 @@ Vue.component('city_increase_ranking',{ } - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } // loadMyCollectCity() if(type == 0){ @@ -97,11 +101,17 @@ Vue.component('city_increase_ranking',{ console.log(error) }) },function(){ - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + if (plus.webview.getWebviewById('views/house/houseDetail.html') != null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } }); - - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); + if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) { + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + } + if(plus.webview.getWebviewById('views/user/userInfo.html') != null) { + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } + } }) }else{ diff --git a/fangija-zsyf/views/component/cityPotentialRankingComponent.js b/fangija-zsyf/views/component/cityPotentialRankingComponent.js index ac9161c..54d9ae3 100644 --- a/fangija-zsyf/views/component/cityPotentialRankingComponent.js +++ b/fangija-zsyf/views/component/cityPotentialRankingComponent.js @@ -77,7 +77,10 @@ Vue.component('city_potential_ranking',{ var msg = response.data.message; if(msg != "取消关注成功" && msg != "关注成功"){ $.toast(msg); - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } + }else{ //$(event.target).parent().children().removeClass("dn"); //$(event.target).addClass("dn"); @@ -96,7 +99,10 @@ Vue.component('city_potential_ranking',{ } } } - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } + reloadMyFocus() reloadCityIncreaseRanking() @@ -106,11 +112,16 @@ Vue.component('city_potential_ranking',{ console.log(error) }) },function(){ - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } }); - - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); + if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) { + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + } + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } } }) }else{ diff --git a/fangija-zsyf/views/evaluate/evaluateReport.html b/fangija-zsyf/views/evaluate/evaluateReport.html index 09d9cdd..757272b 100644 --- a/fangija-zsyf/views/evaluate/evaluateReport.html +++ b/fangija-zsyf/views/evaluate/evaluateReport.html @@ -344,8 +344,13 @@ function addManagement(id, houseStatus, liveStatus){ var status = response.data.status; if(status){ $.toast(response.data.data); - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); + if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) { + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + } + + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } }else{ $.toast(response.data.message); } diff --git a/fangija-zsyf/views/house/add.html b/fangija-zsyf/views/house/add.html index 5643018..90ebf56 100644 --- a/fangija-zsyf/views/house/add.html +++ b/fangija-zsyf/views/house/add.html @@ -1845,9 +1845,17 @@ function checkIsLogin(){ }else{ addEvaluation(); - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } + + if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) { + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + } + + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } } }) }else{ @@ -1891,15 +1899,23 @@ function addEvaluation(){ if(response.data.data!=null && response.data.data.success){ $("#evaluation_btn").removeAttr("disabled"); var id = response.data.data.id; - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); + + if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) { + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + } + + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } clicked('/views/evaluate/evaluateReport.html',true,false,{},{hid:id},function(){ getRequestId(); }) }else{ $("#evaluation_btn").removeAttr("disabled"); $.toast(response.data.message); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } } }) .catch(function (error) { diff --git a/fangija-zsyf/views/house/detail.html b/fangija-zsyf/views/house/detail.html index cb77dfb..c956c10 100644 --- a/fangija-zsyf/views/house/detail.html +++ b/fangija-zsyf/views/house/detail.html @@ -529,10 +529,14 @@ 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(); + if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) { + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + } + + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } $.toast("修改状态成功!"); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); }else{ $.toast(response.data.message); } diff --git a/fangija-zsyf/views/house/houseDetail.html b/fangija-zsyf/views/house/houseDetail.html index 75d3004..f7f9b3f 100644 --- a/fangija-zsyf/views/house/houseDetail.html +++ b/fangija-zsyf/views/house/houseDetail.html @@ -1557,10 +1557,17 @@ function addFocus(city){ reloadMyFocus() reloadCityIncreaseRanking() 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(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } + if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) { + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + } + + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } var curDatas = response.data.data if(curDatas && curDatas.length>=0){ if(!IsInArray(curDatas, city)){ diff --git a/fangija-zsyf/views/house/houseManageList.html b/fangija-zsyf/views/house/houseManageList.html index 9bef9ff..51d3e59 100644 --- a/fangija-zsyf/views/house/houseManageList.html +++ b/fangija-zsyf/views/house/houseManageList.html @@ -155,7 +155,9 @@ function addManagement(id, houseStatus, liveStatus){ $.toast(response.data.data); $('.loadingBgDiv').show(); checkIsLogin(); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } //plus.webview.getWebviewById('yfindex.html').reload(); }else{ $.toast(response.data.message); diff --git a/fangija-zsyf/views/news/newsDetail.html b/fangija-zsyf/views/news/newsDetail.html index af169c1..57dcf61 100644 --- a/fangija-zsyf/views/news/newsDetail.html +++ b/fangija-zsyf/views/news/newsDetail.html @@ -504,9 +504,17 @@ $(".collection").on("click", function () { function doCollect() { if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { clicked('../user/codeSms.html',true,false,{},{},function(){ - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); - plus.webview.getWebviewById('views/user/userInfo.html').reload() - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } + + if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) { + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + } + + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } doCollect(); }) return; diff --git a/fangija-zsyf/views/setting/setting.html b/fangija-zsyf/views/setting/setting.html index d0fad15..8c62336 100644 --- a/fangija-zsyf/views/setting/setting.html +++ b/fangija-zsyf/views/setting/setting.html @@ -110,9 +110,17 @@ function logout() { localStorage.removeItem("user_token"); localStorage.removeItem("user_token_add_time"); //退出登录之前loading下个人中心 - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } + + if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) { + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + } + + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } timer.start(); } diff --git a/fangija-zsyf/views/user/userInfo.html b/fangija-zsyf/views/user/userInfo.html index 030e992..53320e6 100644 --- a/fangija-zsyf/views/user/userInfo.html +++ b/fangija-zsyf/views/user/userInfo.html @@ -289,9 +289,14 @@ function checkIsLogin(){ //跳转登录方法, 考虑回调 function gotoLogin(){ clicked('/views/user/codeSms.html',true,false,{},{},function(){ - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); - //plus.webview.getWebviewById('yfindex.html').reload(); - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } + + if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) { + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + } + checkIsLogin(); }) }