mirror of https://github.com/certd/certd
fix: 修复商业版退出登录后,丢失站点个性化设置的bug
parent
4f39cb8dfa
commit
d75dd058d6
|
@ -12,6 +12,7 @@ import { utils } from "/@/utils";
|
|||
import { cloneDeep, merge } from "lodash-es";
|
||||
import { useI18n } from "/src/locales";
|
||||
export interface SettingState {
|
||||
skipReset?: boolean; // 注销登录时,不清空此store的状态
|
||||
sysPublic?: SysPublicSetting;
|
||||
installInfo?: {
|
||||
siteId: string;
|
||||
|
@ -64,6 +65,7 @@ const defaultSiteInfo: SiteInfo = {
|
|||
export const useSettingStore = defineStore({
|
||||
id: "app.setting",
|
||||
state: (): SettingState => ({
|
||||
skipReset: true,
|
||||
plusInfo: {
|
||||
isPlus: false,
|
||||
vipType: "free",
|
||||
|
|
|
@ -38,6 +38,9 @@ export function resetAllStores() {
|
|||
}
|
||||
const allStores = (pinia as any)._s;
|
||||
for (const [_key, store] of allStores) {
|
||||
if (store.skipReset) {
|
||||
continue;
|
||||
}
|
||||
store.$reset();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue