🔨 加密参数.

This commit is contained in:
lijiahang
2025-01-13 15:48:33 +08:00
parent c481cb0ae4
commit f65aa89421
17 changed files with 138 additions and 44 deletions

View File

@@ -2,8 +2,6 @@ import type { CacheState, CacheType } from './types';
import type { AxiosResponse } from 'axios';
import type { TagType } from '@/api/meta/tag';
import { getTagList } from '@/api/meta/tag';
import type { SystemSettingType } from '@/api/system/setting';
import { getSystemSetting } from '@/api/system/setting';
import type { HostType } from '@/api/asset/host';
import { getHostList } from '@/api/asset/host';
import type { PreferenceType } from '@/api/user/preference';
@@ -23,6 +21,7 @@ import { getExecJobList } from '@/api/exec/exec-job';
import { getPathBookmarkGroupList } from '@/api/asset/path-bookmark-group';
import { getCommandSnippetList } from '@/api/asset/command-snippet';
import { getPathBookmarkList } from '@/api/asset/path-bookmark';
import { getSystemAggregateSetting } from '@/api/system/setting';
export default defineStore('cache', {
state: (): CacheState => ({}),
@@ -170,8 +169,8 @@ export default defineStore('cache', {
},
// 加载系统配置
async loadSystemSetting<T>(type: SystemSettingType, force = false) {
return await this.load(`system_setting_${type}`, () => getSystemSetting<T>(type), undefined, force, {});
async loadSystemSetting(force = false) {
return await this.load(`system_setting`, getSystemAggregateSetting, undefined, force, {});
},
}

View File

@@ -6,7 +6,7 @@ export type CacheType = 'users' | 'menus' | 'roles'
| 'authorizedHostKeys' | 'authorizedHostIdentities'
| 'commandSnippetGroups' | 'pathBookmarkGroups'
| 'commandSnippets' | 'pathBookmarks'
| '*_Tags' | 'preference_*' | 'system_setting_*' | 'footer_setting'
| '*_Tags' | 'preference_*' | 'system_setting'
| string
export interface CacheState {