refactor: 适配系统参数 API 新的使用方式

This commit is contained in:
2024-05-28 23:12:24 +08:00
parent 45cbabf545
commit 1909b6e907
4 changed files with 8 additions and 6 deletions

View File

@@ -125,7 +125,7 @@ const handleCancel = () => {
}
const queryForm = {
code: Object.keys(mailConfig.value)
category: 'MAIL'
}
// 查询列表数据
const getDataList = async () => {
@@ -143,7 +143,7 @@ const handleSave = async () => {
if (isInvalid) return false
await updateOption(
Object.entries(form).map(([key, value]) => {
return { code: key, value }
return { id: mailConfig.value[key].id, code: key, value }
})
)
await getDataList()

View File

@@ -160,7 +160,7 @@ const handleCancel = () => {
}
const queryForm = {
code: Object.keys(securityConfig.value)
category: 'PASSWORD'
}
// 查询列表数据
const getDataList = async () => {
@@ -178,7 +178,7 @@ const handleSave = async () => {
if (isInvalid) return false
await updateOption(
Object.entries(form).map(([key, value]) => {
return { code: key, value }
return { id: securityConfig.value[key].id, code: key, value }
})
)
await getDataList()