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(){
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") {
diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html
index 06dc959..181f546 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);
@@ -2365,6 +2375,7 @@ function changeCity(cityStr){
getDistrictList(cityStr,lat,lng,"",sort,0,0,"");
}
+
if(oriCity== cityStr){
if(oriRegion!=""){
setTimeout(function(){
@@ -2373,7 +2384,7 @@ function changeCity(cityStr){
//changeRegion();
},1000)
}
- initBaseInfo(cityStr,oriRegion,"",0,0);
+ initBaseInfo(cityStr,oriRegion,address,lat,lng);
}else{
initBaseInfo(cityStr,"","",0,0);
}
@@ -2693,6 +2704,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");