From 9d5c2db6a455248e52981ee74b38ae41ecc778f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E5=90=89=E6=AC=A2?= Date: Wed, 11 Apr 2018 13:46:47 +0800 Subject: [PATCH] =?UTF-8?q?pv=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/js/log/log_stat.js | 41 +++++++++++++++++++ fangija-zsyf/views/district/aroundDetail.html | 2 +- fangija-zsyf/views/district/arround.html | 1 + fangija-zsyf/views/district/detail.html | 2 +- fangija-zsyf/views/evaluate/evaluateList.html | 2 +- .../views/evaluate/evaluateReport.html | 1 + fangija-zsyf/views/house/add.html | 1 + fangija-zsyf/views/house/detail.html | 1 + fangija-zsyf/views/house/houseDetail.html | 1 + fangija-zsyf/views/house/houseList.html | 2 +- fangija-zsyf/views/house/houseManageList.html | 2 +- .../views/intelligentHouse/aroundDetail.html | 2 +- .../views/intelligentHouse/index.html | 1 + .../views/intelligentHouse/mapDetail.html | 2 +- fangija-zsyf/views/news/newsCollectList.html | 2 +- fangija-zsyf/views/news/newsDetail.html | 1 + fangija-zsyf/views/rent/rent.html | 2 +- fangija-zsyf/views/rent/rentManager.html | 1 + fangija-zsyf/views/user/bindingMobile.html | 1 + fangija-zsyf/views/user/codeSms.html | 1 + fangija-zsyf/views/user/passLogin.html | 1 + fangija-zsyf/views/user/updatePass.html | 2 +- fangija-zsyf/views/user/userInfo.html | 2 +- fangija-zsyf/yfindex.html | 2 +- 24 files changed, 64 insertions(+), 12 deletions(-) create mode 100644 fangija-zsyf/js/log/log_stat.js diff --git a/fangija-zsyf/js/log/log_stat.js b/fangija-zsyf/js/log/log_stat.js new file mode 100644 index 0000000..e09e2e0 --- /dev/null +++ b/fangija-zsyf/js/log/log_stat.js @@ -0,0 +1,41 @@ +/** + * 日志记录,依赖于axios.min.js,axiosPlugin.js + * @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; + plus.geolocation.getCurrentPosition(function(p){ + province = p.address.province; + city = p.address.city; + region = p.address.district; + lng = p.coords.longitude; + lat = p.coords.latitude; + address = p.address.street; + doSavePageLog({page:page, lng:lng, lat:lat, province:province, city:city, region:region, address:address, device:device, model:model}); + }, function(e){ + doSavePageLog({page:page, device:device, model:model}); + }, + { + 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/views/district/aroundDetail.html b/fangija-zsyf/views/district/aroundDetail.html index c083884..dbaee06 100644 --- a/fangija-zsyf/views/district/aroundDetail.html +++ b/fangija-zsyf/views/district/aroundDetail.html @@ -82,7 +82,7 @@ $.config = {router: false} - + + - + - + + + + + - + - + - + + - + - + + - + + + + + - + - + diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html index 746dfa2..ad60cd9 100644 --- a/fangija-zsyf/yfindex.html +++ b/fangija-zsyf/yfindex.html @@ -1182,7 +1182,7 @@ $.config = {router: false} - +