|
@@ -1,13 +1,12 @@
|
|
//计算账号累计活跃时长
|
|
//计算账号累计活跃时长
|
|
import global from '@/config/setting';
|
|
import global from '@/config/setting';
|
|
import {timeOnPage} from '@/api/api.js';
|
|
import {timeOnPage} from '@/api/api.js';
|
|
|
|
+
|
|
//活跃时间间隔 (s)
|
|
//活跃时间间隔 (s)
|
|
const TimeInterval = 60*10
|
|
const TimeInterval = 60*10
|
|
//页面停留时间 (s)
|
|
//页面停留时间 (s)
|
|
let stayTime = 0
|
|
let stayTime = 0
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
let timer = null
|
|
let timer = null
|
|
|
|
|
|
//打开计时器
|
|
//打开计时器
|
|
@@ -38,7 +37,7 @@ export const endCalc = (type,intervalT)=>{
|
|
//console.log('关闭计时器')
|
|
//console.log('关闭计时器')
|
|
clearInterval(timer)
|
|
clearInterval(timer)
|
|
const IsActive = sessionStorage.getItem('IsActive')
|
|
const IsActive = sessionStorage.getItem('IsActive')
|
|
- if(Number(IsActive)){
|
|
|
|
|
|
+ if(Number(IsActive) && localStorage.getItem('auth')){
|
|
sendTOPInfo(type,intervalT)
|
|
sendTOPInfo(type,intervalT)
|
|
}
|
|
}
|
|
stayTime = 0
|
|
stayTime = 0
|