From 1e9b31421e70fb5aedb9b52bafdf9c131210a859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E5=90=89=E6=AC=A2?= Date: Tue, 22 May 2018 11:11:38 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E7=BD=91=E7=BB=9C=E5=BC=82=E5=B8=B8=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E9=9A=90=E8=97=8F=E8=BF=94=E5=9B=9E=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E6=8C=89=E9=92=AE=EF=BC=8C=E5=8F=AA=E6=9C=89=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E7=BD=91=E7=BB=9C=E5=BC=82=E5=B8=B8=E6=89=8D?= =?UTF-8?q?=E4=BC=9A=E5=87=BA=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/error.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fangija-zsyf/error.html b/fangija-zsyf/error.html index 8d0905d..a45d5dc 100644 --- a/fangija-zsyf/error.html +++ b/fangija-zsyf/error.html @@ -38,7 +38,7 @@

重启应用 - 返回刷新 + 返回刷新

@@ -50,8 +50,11 @@ document.addEventListener('plusready', onPlusReady, false); function onPlusReady() { var self = plus.webview.currentWebview(); - flag = self.flag; - plus.nativeUI.closeWaiting(); + flag = self.flag; + if(flag == null) { + document.getElementById("bakBtn").setAttribute("style", "display: none;") + } + plus.nativeUI.closeWaiting(); } function again(){ From 3406e7cc804563816018d903238b953e59da3796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E5=90=89=E6=AC=A2?= Date: Tue, 22 May 2018 11:45:22 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=AE=89=E5=8D=93=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E6=89=93=E5=BC=80=E4=BA=8C=E7=BA=A7=E9=A1=B5=E9=9D=A2=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/js/push-common.js | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/fangija-zsyf/js/push-common.js b/fangija-zsyf/js/push-common.js index f5a5c82..f67f1be 100644 --- a/fangija-zsyf/js/push-common.js +++ b/fangija-zsyf/js/push-common.js @@ -50,9 +50,31 @@ document.addEventListener("plusready", function() { } }); } else if (payload.type == "2") { - plus.ui.alert(title+"\n"+content,function(){ - clicked('views/webview_embed.html', true,false,{},{url:payload.url}) - }); + if (payload.url.startWith("http")) { + plus.ui.alert(title+"\n"+content,function(){ + clicked('views/webview_embed.html', true,false,{},{url:payload.url}) + }); + } else { + // 处理打开app中的二级页面,一级页面在type=1中已经处理了,如果有http的地址就是打开外部页面 + // 否则就是打开app内部页面 + plus.ui.alert(content,function(){ + var url = payload.url; + var sindex = url.indexOf('?') == -1 ? url.length : url.indexOf('?'); + var openUrl = url.substring(0, sindex); + var paramStr = url.substring(sindex+1); + var jsonData = {}; + var parray = paramStr.split('&') + for(var i=0;i 0) { + jsonData[subArray[0]] = subArray[1]; + } + } + } + clicked(openUrl,true,false,{},jsonData) + }); + } } } else { if (payload.type == "0") { From 97274ce7b24ca78c999563a1c96bce27d3f9fd8c Mon Sep 17 00:00:00 2001 From: "xuhe@fangjia.com" Date: Tue, 22 May 2018 14:33:00 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=AE=9A=E4=BD=8D?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/yfindex.html | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html index 06dc959..47dbcac 100644 --- a/fangija-zsyf/yfindex.html +++ b/fangija-zsyf/yfindex.html @@ -1255,26 +1255,26 @@ function getPosition(){ if(city){ city = formatBaiduCity(city); } + region = p.address.district; + if(region.endWith("区") || region.endWith("市") ){ + region = region.substring(0, region.length-1); + } axios.get("/rest/index/isChinaCity", { params: { - city: city + city: city, + region: region } }) .then(function (response) { - if(response.data.data.status==1){ + if(response.data.data.status==1 && (response.data.data.region!="" || response.data.data.region!=undefined)){ address = p.address.street; province = p.address.province; - - region = p.address.district; + region = response.data.data.region lng = p.coords.longitude;//获取到当前位置的经度 lat = p.coords.latitude;//获取到当前位置的纬度; oriLng = p.coords.longitude; oriLat = p.coords.latitude; - - if(region.endWith("区") || region.endWith("市") ){ - region = region.substring(0, region.length-1); - } oriRegion = region; oriCity = city; }else{ @@ -1282,7 +1282,6 @@ function getPosition(){ $("#input_city").text(city); initRegionSelect(city); localStorage.setItem("init_city", city); - //addLocation(lat,lng); initBaseInfo(city,"","",0,0); $("#ShangHaiDiv").show(); $("#otherCityDiv").hide(); @@ -1303,7 +1302,18 @@ function getPosition(){ console.log(error); }); } + /*} + city = "嘉兴"; + province = "浙江"; + region = "秀洲" + lng = 120.6845052002997;//获取到当前位置的经度 + lat = 30.62661481274257;//获取到当前位置的纬度; + oriLng = 120.6845052002997; + oriLat = 30.62661481274257; + oriRegion = "秀洲"; + oriCity = "嘉兴"; + initData();*/ }, function(e){ city = "上海"; $("#input_city").text(city); @@ -2693,6 +2703,7 @@ function getCityPriceLevel(cityParam){ } html += '
  • 自定义: - 万确定
  • '; $("#select_price").html(html); + getDistrictList(cityParam,lat,lng,"",6,0,0,""); $("#select_price li").on("click", function () { $(this).parents("#select_price").find(".item-title").removeClass("active"); From 6935210868940ac9ad23fe91dfe9025cb9ddf0d0 Mon Sep 17 00:00:00 2001 From: "xuhe@fangjia.com" Date: Tue, 22 May 2018 15:14:17 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=9F=8E=E5=B8=82?= =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/yfindex.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html index 47dbcac..181f546 100644 --- a/fangija-zsyf/yfindex.html +++ b/fangija-zsyf/yfindex.html @@ -2375,6 +2375,7 @@ function changeCity(cityStr){ getDistrictList(cityStr,lat,lng,"",sort,0,0,""); } + if(oriCity== cityStr){ if(oriRegion!=""){ setTimeout(function(){ @@ -2383,7 +2384,7 @@ function changeCity(cityStr){ //changeRegion(); },1000) } - initBaseInfo(cityStr,oriRegion,"",0,0); + initBaseInfo(cityStr,oriRegion,address,lat,lng); }else{ initBaseInfo(cityStr,"","",0,0); }