diff --git a/src/apis/common/common.ts b/src/apis/common/common.ts index b6960295..0c588df2 100644 --- a/src/apis/common/common.ts +++ b/src/apis/common/common.ts @@ -1,7 +1,6 @@ import type { TreeNodeData } from '@arco-design/web-vue' import http from '@/utils/http' import type { LabelValueState } from '@/types/global' -import type { OptionQuery } from '@/apis' const BASE_URL = '/common' @@ -30,9 +29,9 @@ export function listCommonDict(code: string) { return http.get(`${BASE_URL}/dict/${code}`) } -/** @desc 查询参数列表 */ -export function listOptionDict(query: OptionQuery) { - return http.get(`${BASE_URL}/dict/option`, query) +/** @desc 查询系统配置参数 */ +export function listSiteOptionDict() { + return http.get(`${BASE_URL}/dict/option/site`) } /** @desc 上传文件 */ diff --git a/src/stores/modules/app.ts b/src/stores/modules/app.ts index a97c0b59..1d5c13b7 100644 --- a/src/stores/modules/app.ts +++ b/src/stores/modules/app.ts @@ -1,7 +1,7 @@ import { defineStore } from 'pinia' import { computed, reactive, toRefs } from 'vue' import { generate, getRgbStr } from '@arco-design/color' -import { type BasicConfig, listOptionDict } from '@/apis' +import { type BasicConfig, listSiteOptionDict } from '@/apis' import defaultSettings from '@/config/setting.json' const storeSetup = () => { @@ -58,9 +58,7 @@ const storeSetup = () => { const siteConfig = reactive({}) as BasicConfig // 初始化系统配置 const initSiteConfig = () => { - listOptionDict({ - category: 'SITE', - }).then((res) => { + listSiteOptionDict().then((res) => { const resMap = new Map() res.data.forEach((item) => { resMap.set(item.label, item.value)