mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-03 13:44:47 +08:00
fix: update
This commit is contained in:
@@ -2,6 +2,7 @@ import { defineStore } from "pinia";
|
||||
import { store } from "/@/store";
|
||||
import { isUrl } from "/@/utils/is";
|
||||
import { isEqual } from "lodash-unified";
|
||||
import { routerArrays } from "/@/layout/types";
|
||||
import { storageLocal } from "/@/utils/storage";
|
||||
import { multiType, positionType } from "./types";
|
||||
|
||||
@@ -11,16 +12,7 @@ export const useMultiTagsStore = defineStore({
|
||||
// 存储标签页信息(路由信息)
|
||||
multiTags: storageLocal.getItem("responsive-configure").multiTagsCache
|
||||
? storageLocal.getItem("responsive-tags")
|
||||
: [
|
||||
{
|
||||
path: "/welcome",
|
||||
parentPath: "/",
|
||||
meta: {
|
||||
title: "menus.hshome",
|
||||
icon: "home-filled"
|
||||
}
|
||||
}
|
||||
],
|
||||
: routerArrays,
|
||||
multiTagsCache: storageLocal.getItem("responsive-configure").multiTagsCache
|
||||
}),
|
||||
getters: {
|
||||
|
||||
@@ -2,6 +2,7 @@ import { defineStore } from "pinia";
|
||||
import { store } from "/@/store";
|
||||
import { userType } from "./types";
|
||||
import { router } from "/@/router";
|
||||
import { routerArrays } from "/@/layout/types";
|
||||
import { storageSession } from "/@/utils/storage";
|
||||
import { getLogin, refreshToken } from "/@/api/user";
|
||||
import { getToken, setToken, removeToken } from "/@/utils/auth";
|
||||
@@ -62,16 +63,7 @@ export const useUserStore = defineStore({
|
||||
this.name = "";
|
||||
removeToken();
|
||||
storageSession.clear();
|
||||
useMultiTagsStoreHook().handleTags("equal", [
|
||||
{
|
||||
path: "/welcome",
|
||||
parentPath: "/",
|
||||
meta: {
|
||||
title: "menus.hshome",
|
||||
icon: "home-filled"
|
||||
}
|
||||
}
|
||||
]);
|
||||
useMultiTagsStoreHook().handleTags("equal", routerArrays);
|
||||
router.push("/login");
|
||||
},
|
||||
// 刷新token
|
||||
|
||||
Reference in New Issue
Block a user