axiosNotice.ts 430 B

123456789101112131415161718
  1. import { throttle } from "lodash-es";
  2. import { message } from "ant-design-vue";
  3. // import { doLogout } from "@/api/markPage";
  4. export const notifyInvalidTokenThrottled = throttle(
  5. () => {
  6. void message.error({
  7. content: "登录失效,请重新登录!",
  8. duration: 10,
  9. });
  10. // setTimeout(() => {
  11. // doLogout();
  12. // }, 3000);
  13. console.log("登录失效");
  14. },
  15. 1000,
  16. { trailing: false }
  17. );