Merge branch 'YOUFANGAPP1.1.5' of http://gitlab.fangjia.com/dev0/youfang-app into xh-YOUFANGAPP1.1.5

This commit is contained in:
xuhe@fangjia.com
2018-07-09 13:29:40 +08:00
4 changed files with 31 additions and 41 deletions
+4
View File
@@ -4,6 +4,10 @@ function add_imgage(imageId,adPosition,device){
}).then(function(response){ }).then(function(response){
if(response.data.status){ if(response.data.status){
var h = response.data.data; var h = response.data.data;
if (h == "" || h == null) {
return;
}
console.log(h);
if(typeof(h.imgUrl)!="undefined"&&h.imgUrl!=null&&$.trim(h.imgUrl)!=""){ if(typeof(h.imgUrl)!="undefined"&&h.imgUrl!=null&&$.trim(h.imgUrl)!=""){
$("#"+imageId).attr("src",h.imgUrl); $("#"+imageId).attr("src",h.imgUrl);
} }
+18 -13
View File
@@ -164,21 +164,26 @@ document.addEventListener("plusready", function() {
} else if (payload.type == "2") { } else if (payload.type == "2") {
plus.nativeUI.confirm(content, function(e){ plus.nativeUI.confirm(content, function(e){
if (e.index==0) { if (e.index==0) {
var url = payload.url; if (payload.url.startWith("http")) {
var sindex = url.indexOf('?') == -1 ? url.length : url.indexOf('?'); clicked('views/webview_embed.html', true,false,{},{url:payload.url})
var openUrl = url.substring(0, sindex); } else {
var paramStr = url.substring(sindex+1); var url = payload.url;
var jsonData = {}; var sindex = url.indexOf('?') == -1 ? url.length : url.indexOf('?');
var parray = paramStr.split('&') var openUrl = url.substring(0, sindex);
for(var i=0;i<parray.length;i++){ var paramStr = url.substring(sindex+1);
var subArray = parray[i].split('=') var jsonData = {};
if(parray[i] != ""){ var parray = paramStr.split('&')
if(subArray.length > 0) { for(var i=0;i<parray.length;i++){
jsonData[subArray[0]] = subArray[1]; var subArray = parray[i].split('=')
if(parray[i] != ""){
if(subArray.length > 0) {
jsonData[subArray[0]] = subArray[1];
}
} }
} }
} clicked(openUrl,true,false,{},jsonData)
clicked(openUrl,true,false,{},jsonData) }
} }
}, title, ["查看","忽略"] ); }, title, ["查看","忽略"] );
+5 -24
View File
@@ -100,29 +100,11 @@
plus.navigator.setFullscreen(false); plus.navigator.setFullscreen(false);
} else { } else {
plus.geolocation.getCurrentPosition( var city = localStorage.getItem("init_city");
function(p){ if (city == null || city == "") {
try { city = "全国";
city = p.address.city; }
if(city){ loadStartPage(city);
city = formatBaiduCity(city);
}
} catch(e){
city = "上海";
}
loadStartPage(city);
}, function(e){
city = "上海";
loadStartPage(city);
},
{
provider:'baidu',
enableHighAccuracy:true,
coordsType:'bd09ll'
}
);
//显示启动导航 //显示启动导航
mui.openWindow({ mui.openWindow({
id: 'guide', id: 'guide',
@@ -334,7 +316,6 @@
}; };
} else { } else {
var imei = plus.device.imei; var imei = plus.device.imei;
alert(imei);
data = { data = {
"account_id":8008196, "account_id":8008196,
"user_action_set_id":1106980650, "user_action_set_id":1106980650,
+4 -4
View File
@@ -1741,13 +1741,13 @@ function addFocus(city){
}else{ }else{
axios.get("/rest/quotations/collectCity",{params:{city:city,type:0}}).then(function(response){ axios.get("/rest/quotations/collectCity",{params:{city:city,type:0}}).then(function(response){
reloadMyFocus()
reloadCityIncreaseRanking()
reloadCityPotentialRanking()
if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) {
plus.webview.getWebviewById('views/house/houseDetail.html').reload(); plus.webview.getWebviewById('views/house/houseDetail.html').reload();
} }
/*reloadMyFocus()
reloadCityIncreaseRanking()
reloadCityPotentialRanking()*/
if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) { if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) {
plus.webview.getWebviewById('views/house/houseManageList.html').reload(); plus.webview.getWebviewById('views/house/houseManageList.html').reload();
} }