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

This commit is contained in:
xuhe@fangjia.com
2018-07-02 09:53:32 +08:00
13 changed files with 141 additions and 58 deletions
+42 -1
View File
@@ -84,13 +84,13 @@ w.clicked=function(id,wa,ns,ws, params,callback,callbackParams){
// return null;
// }
if(w.plus){
var startTime = new Date().getTime();
wa&&(waiting=plus.nativeUI.showWaiting());
ws=ws||{};
ws.scrollIndicator||(ws.scrollIndicator='none');
ws.scalable||(ws.scalable=false);
var pre='';//'http://192.168.1.178:8080/h5/';
openw=plus.webview.create(pre+id,id,ws,params);
ns||openw.addEventListener('loaded',function(){//页面加载完成后才显示
// setTimeout(function(){//延后显示可避免低端机上动画时白屏
openw.show(as);
@@ -103,6 +103,8 @@ w.clicked=function(id,wa,ns,ws, params,callback,callbackParams){
callback(callbackParams);
}
openw=null;
var endTime = new Date().getTime();
savePageLog(endTime - startTime, id);
},false);
return openw;
}else{
@@ -110,6 +112,45 @@ w.clicked=function(id,wa,ns,ws, params,callback,callbackParams){
}
return null;
};
/**
* 记录页面访问日志
*/
function savePageLog(residenceTime, page) {
var device = plus.device.uuid;
var model = plus.device.model;
var pushClientId = "";
var info = plus.push.getClientInfo();
if (info != null) {
pushClientId = info.clientid;
}
plus.geolocation.getCurrentPosition(function(p){
baidu_province = p.address.province;
baidu_city = p.address.city;
baidu_region = p.address.district;
baidu_lng = p.coords.longitude;
baidu_lat = p.coords.latitude;
baidu_address = p.address.street;
doSavePageLog({page:page, lng:baidu_lng, lat:baidu_lat, province:baidu_province, city:baidu_city, region:baidu_region, address:baidu_address, device:device, model:model, pushClientId:pushClientId,channel:YOUFANG_CHANNEL,residenceTime:residenceTime});
}, function(e){
doSavePageLog({page:page, device:device, model:model, pushClientId:pushClientId,channel:YOUFANG_CHANNEL,residenceTime:residenceTime});
},
{
provider:'baidu',
enableHighAccuracy:true,
coordsType:'bd09ll'
}
);
}
function doSavePageLog(data) {
axios.post("/rest/log/save", data).then(function (response) {
}).catch(function (error) {
console.log(error);
});
}
w.openDoc=function(t,c){
var d=plus.webview.getWebviewById('document');
if(d){
-40
View File
@@ -3,48 +3,8 @@
* @author yinjihuan
*/
document.addEventListener('plusready', function() {
savePageLog()
}, false);
/**
* 记录页面访问日志
*/
function savePageLog() {
var page = document.getElementsByTagName("title")[0].innerHTML;
var device = plus.device.uuid;
var model = plus.device.model;
var pushClientId = "";
var info = plus.push.getClientInfo();
if (info != null) {
pushClientId = info.clientid;
}
plus.geolocation.getCurrentPosition(function(p){
baidu_province = p.address.province;
baidu_city = p.address.city;
baidu_region = p.address.district;
baidu_lng = p.coords.longitude;
baidu_lat = p.coords.latitude;
baidu_address = p.address.street;
doSavePageLog({page:page, lng:baidu_lng, lat:baidu_lat, province:baidu_province, city:baidu_city, region:baidu_region, address:baidu_address, device:device, model:model, pushClientId:pushClientId,channel:YOUFANG_CHANNEL});
}, function(e){
doSavePageLog({page:page, device:device, model:model, pushClientId:pushClientId,channel:YOUFANG_CHANNEL});
},
{
provider:'baidu',
enableHighAccuracy:true,
coordsType:'bd09ll'
}
);
}
function doSavePageLog(data) {
axios.post("/rest/log/save", data).then(function (response) {
}).catch(function (error) {
console.log(error);
});
}
/**
+3 -1
View File
@@ -116,7 +116,9 @@ function mhAddItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap,
}else{
html += "<div>下跌概率: <em class='down'>暂无<i class='icon'></i></em></div>";
}
if(localStorage.getItem("showLoanMenu")!=null && localStorage.getItem("showLoanMenu")=="true"){
html += "<div>抵押可贷额度: <em style='color:#EB5F34;'>"+tempTotalPricePercent+"</em></div></div></div></a>";
}
html += "</div></div></a>";
//调整最新的等级显示(其它等级不显示start)