|
@@ -24,7 +24,7 @@ var cmSysVitaMixins = function () {
|
|
if(GLOBAL_TOKEN){ this.cmSysParams.userId = GLOBAL_USER_ID; }
|
|
if(GLOBAL_TOKEN){ this.cmSysParams.userId = GLOBAL_USER_ID; }
|
|
this.cmSysParams.pagePath = window.location.href;
|
|
this.cmSysParams.pagePath = window.location.href;
|
|
this.clearTimeSet = setInterval(() => {
|
|
this.clearTimeSet = setInterval(() => {
|
|
- _self.cmSysParams.accessDuration++;
|
|
|
|
|
|
+ _self.browseTime++;
|
|
}, 1000);
|
|
}, 1000);
|
|
},
|
|
},
|
|
userRecordStatistics(url,data) {// navigator.sendBeacon 方式 发送统计数据
|
|
userRecordStatistics(url,data) {// navigator.sendBeacon 方式 发送统计数据
|
|
@@ -34,6 +34,7 @@ var cmSysVitaMixins = function () {
|
|
navigator.sendBeacon(url, blob);
|
|
navigator.sendBeacon(url, blob);
|
|
},
|
|
},
|
|
beforeunloadHandler(e) {
|
|
beforeunloadHandler(e) {
|
|
|
|
+ this.cmSysParams.accessDuration = this.browseTime*1000
|
|
console.log(`页面路径:${this.cmSysParams.pagePath}`,`停留:${this.cmSysParams.accessDuration}s`,`标签:${this.cmSysParams.pageLabel}`)
|
|
console.log(`页面路径:${this.cmSysParams.pagePath}`,`停留:${this.cmSysParams.accessDuration}s`,`标签:${this.cmSysParams.pageLabel}`)
|
|
var NODE_ENV_BASE_URL = $("#coreServer").val();
|
|
var NODE_ENV_BASE_URL = $("#coreServer").val();
|
|
var url = `${NODE_ENV_BASE_URL}/user/record/StatisticsPc`
|
|
var url = `${NODE_ENV_BASE_URL}/user/record/StatisticsPc`
|