Browse Source

超时自动退出

yanghao 1 month ago
parent
commit
54852e1830
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/composable/useAutoLogout.ts

+ 1 - 1
src/composable/useAutoLogout.ts

@@ -7,7 +7,7 @@ import { throttle } from 'lodash-es'
 
 
 // --- 关键修改:将变量移到函数外部,变成全局共享变量 ---
 // --- 关键修改:将变量移到函数外部,变成全局共享变量 ---
 let timer: ReturnType<typeof setTimeout> | null = null
 let timer: ReturnType<typeof setTimeout> | null = null
-const TIMEOUT = 30 * 1000 // 30分钟
+const TIMEOUT = 30 * 60 * 1000 // 30分钟
 const events = ['click', 'mousedown', 'keydown', 'scroll', 'mousemove']
 const events = ['click', 'mousedown', 'keydown', 'scroll', 'mousemove']
 
 
 export function useAutoLogout() {
 export function useAutoLogout() {