feat: 支持多标签页打开已经登录的系统后无需再登录并添加7天内免登录功能 (#747)

* feat: 支持多标签页打开已经登录的系统后无需再登录

* feat: 添加`7`天内免登录功能
This commit is contained in:
xiaoming
2023-10-07 15:00:03 +08:00
committed by GitHub
parent be2de405ab
commit 7e7b6fee7a
12 changed files with 131 additions and 93 deletions

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import { initRouter } from "@/router/utils";
import { storageSession } from "@pureadmin/utils";
import { storageLocal } from "@pureadmin/utils";
import { type CSSProperties, ref, computed } from "vue";
import { useUserStoreHook } from "@/store/modules/user";
import { usePermissionStoreHook } from "@/store/modules/permission";
@@ -34,7 +34,7 @@ function onChange() {
.loginByUsername({ username: username.value, password: "admin123" })
.then(res => {
if (res.success) {
storageSession().removeItem("async-routes");
storageLocal().removeItem("async-routes");
usePermissionStoreHook().clearAllCachePage();
initRouter();
}