diff --git a/fangija-zsyf/js/common.js b/fangija-zsyf/js/common.js index 8863d6a..ad0e8ac 100644 --- a/fangija-zsyf/js/common.js +++ b/fangija-zsyf/js/common.js @@ -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){ diff --git a/fangija-zsyf/js/log/log_stat.js b/fangija-zsyf/js/log/log_stat.js index d306cc5..d09f422 100644 --- a/fangija-zsyf/js/log/log_stat.js +++ b/fangija-zsyf/js/log/log_stat.js @@ -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); - }); -} /** diff --git a/fangija-zsyf/js/user/myHouse.js b/fangija-zsyf/js/user/myHouse.js index 352406d..6c7f117 100644 --- a/fangija-zsyf/js/user/myHouse.js +++ b/fangija-zsyf/js/user/myHouse.js @@ -116,7 +116,9 @@ function mhAddItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, }else{ html += "
下跌概率: 暂无
"; } - + if(localStorage.getItem("showLoanMenu")!=null && localStorage.getItem("showLoanMenu")=="true"){ + html += "
抵押可贷额度: "+tempTotalPricePercent+"
"; + } html += ""; //调整最新的等级显示(其它等级不显示start) diff --git a/fangija-zsyf/main.html b/fangija-zsyf/main.html index 83561f7..35625f9 100644 --- a/fangija-zsyf/main.html +++ b/fangija-zsyf/main.html @@ -58,6 +58,7 @@ + - + diff --git a/fangija-zsyf/views/setting/about.html b/fangija-zsyf/views/setting/about.html index 6cc3e1a..832a612 100644 --- a/fangija-zsyf/views/setting/about.html +++ b/fangija-zsyf/views/setting/about.html @@ -84,6 +84,9 @@ $.config = {router: false} + + + - +