Explorar o código

修改提示时间。

GuoRuqiang hai 1 ano
pai
achega
64794630c8
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      web/src/components/fetchTokenKeys.js

+ 3 - 1
web/src/components/fetchTokenKeys.js

@@ -49,7 +49,9 @@ export function useTokenKeys() {
       const fetchedKeys = await fetchTokenKeys();
       if (fetchedKeys.length === 0) {
         showError('当前没有可用的启用令牌,请确认是否有令牌处于启用状态!');
-        window.location.href = '/token';
+        setTimeout(() => {
+          window.location.href = '/token';
+        }, 1500); // 延迟 1.5 秒后跳转
       }
       setKeys(fetchedKeys);
       setIsLoading(false);