feat(online): 停留>1min未登录访客计在线(前端60s首发+30s心跳,relay90s内存窗口,Admin usage页30s刷新展示)
This commit is contained in:
1 parent
cd4b324740
commit
c6341ea35b
3 files changed
+52
-1
No files matched your search
+3
-1
@@ -4,7 +4,7 @@ import HomePage from './pages/Home.page.vue';
|
||||
import NotFound from './pages/404.page.vue';
|
||||
import { tools } from './tools';
|
||||
import { config } from './config';
|
||||
import { reportToolUsage } from './tools/license/license';
|
||||
import { reportToolUsage, startOnlineHeartbeat } from './tools/license/license';
|
||||
import { routes as demoRoutes } from './ui/demo/demo.routes';
|
||||
|
||||
const toolsRoutes = tools.map(({ path, name, component, ...config }) => ({
|
||||
@@ -64,6 +64,8 @@ router.afterEach((to) => {
|
||||
if (to.meta?.isTool) {
|
||||
reportToolUsage(String(to.path));
|
||||
}
|
||||
// 全站在线心跳:停留满 1 分钟的未登录访客才计在线(内部 once 保护)
|
||||
startOnlineHeartbeat();
|
||||
});
|
||||
|
||||
export default router;
|
||||
Reference in new issue
Block a user