b-count
v1.0.0
Published
用户行为计数器
Downloads
2
Readme
b-count
一个监听用户行为的计数器 主要应用场景-用户长时间停留页面不操作,将调用callback,实现锁屏或者重新登陆等操作
<script>
import bCount from 'bcount'
/*!
* 四个参数,分别是
* callback 回调 必须
* second 默认24小时 非必须
* interval 间隔1秒 非必须
* needConsole 是否需要打印日志console,默认否 非必须
*/
bCount(() => {
//在这进行锁屏或者推出登陆等操作
}, 24, 10000, true);
</script>