fix: 搜索路由参数校验 — page>=1、limit 1-500

This commit is contained in:
2026-05-20 02:46:13 +08:00
parent d7b055f88b
commit c4ca8edd58
53 changed files with 855 additions and 21 deletions

View File

@@ -95,7 +95,7 @@
<el-table-column label="转存启用" width="80" align="center">
<template #default="{ row }">
<el-switch
:model-value="row.is_transfer_enabled !== 0"
:model-value="row.is_active !== 0"
size="small"
@change="(val: boolean) => handleToggleTransfer(row, val)"
/>
@@ -105,7 +105,7 @@
<template #default="{ row }">
<el-switch
:model-value="row.is_primary === 1"
:disabled="!row.is_transfer_enabled"
:disabled="!row.is_active"
size="small"
@change="(val: boolean) => handleTogglePrimary(row, val)"
/>
@@ -386,11 +386,10 @@ async function handleToggleTransfer(row: CloudConfig, enabled: boolean) {
cloud_type: row.cloud_type,
nickname: row.nickname || '',
promotion_account: row.promotion_account || '',
is_transfer_enabled: newVal,
is_active: row.is_active,
is_active: newVal,
cookie: undefined, // don't send cookie on toggle-only
})
row.is_transfer_enabled = newVal
row.is_active = newVal
ElMessage.success(enabled ? '转存已开启' : '转存已关闭')
} catch (e: any) {
ElMessage.error(e.response?.data?.error || '操作失败')
@@ -455,7 +454,7 @@ function openDialog(row: CloudConfig | null) {
form.cloud_type = row.cloud_type
form.nickname = row.nickname || ''
form.promotion_account = row.promotion_account || ''
form.is_transfer_enabled = row.is_transfer_enabled !== 0
form.is_transfer_enabled = row.is_active !== 0
form.cookie = row.cookie || ''
form._verifying = false
form._storageUsed = ''
@@ -506,9 +505,8 @@ async function handleSave() {
cloud_type: form.cloud_type as CloudType,
nickname: form.nickname,
promotion_account: form.promotion_account,
is_transfer_enabled: form.is_transfer_enabled ? 1 : 0,
is_active: form.is_transfer_enabled ? 1 : 0,
cookie: form.cookie || undefined,
is_active: 1,
})
ElMessage.success('配置更新成功')
} else {
@@ -516,9 +514,8 @@ async function handleSave() {
cloud_type: form.cloud_type as CloudType,
nickname: form.nickname,
promotion_account: form.promotion_account,
is_transfer_enabled: form.is_transfer_enabled ? 1 : 0,
is_active: form.is_transfer_enabled ? 1 : 0,
cookie: form.cookie,
is_active: 1,
})
ElMessage.success('配置保存成功')
}