|
@@ -3,13 +3,17 @@ import { throttle } from "lodash-es";
|
|
|
import { message } from "ant-design-vue";
|
|
|
import { doLogout } from "@/api/markPage";
|
|
|
|
|
|
-export const notifyInvalidTokenThrottled = throttle(() => {
|
|
|
- message.error({
|
|
|
- content: "登录失效,请重新登录!",
|
|
|
- duration: 10,
|
|
|
- });
|
|
|
- setTimeout(() => {
|
|
|
- doLogout();
|
|
|
- }, 3000);
|
|
|
- console.log("登录失效");
|
|
|
-}, 1000);
|
|
|
+export const notifyInvalidTokenThrottled = throttle(
|
|
|
+ () => {
|
|
|
+ message.error({
|
|
|
+ content: "登录失效,请重新登录!",
|
|
|
+ duration: 10,
|
|
|
+ });
|
|
|
+ setTimeout(() => {
|
|
|
+ doLogout();
|
|
|
+ }, 3000);
|
|
|
+ console.log("登录失效");
|
|
|
+ },
|
|
|
+ 1000,
|
|
|
+ { trailing: false }
|
|
|
+);
|