履约配置页 affiliate-dash 覆盖收尾:preferredMatchEnabled 开关补入平台配置 UI
- 分析结论:履约路由面板已含 affiliate_dash(开关/优先级/规则),职责划分成立 - 缺口修复:指定匹配优先开关此前无 UI 入口,现平台配置 affiliate-dash tab 增加 Switch - 后端 effective 透出 preferredMatchEnabled;前端类型/panel 补齐 - 前后端 typecheck 通过,224 测试全绿
This commit is contained in:
@@ -2300,6 +2300,7 @@ function AffiliateDashPlatformPanel() {
|
||||
const [saving, setSaving] = useState(false)
|
||||
const [errorMessage, setErrorMessage] = useState('')
|
||||
const [enabled, setEnabled] = useState(true)
|
||||
const [preferredMatchEnabled, setPreferredMatchEnabled] = useState(true)
|
||||
const [baseUrl, setBaseUrl] = useState('')
|
||||
const [appKey, setAppKey] = useState('')
|
||||
const [appSecret, setAppSecret] = useState('')
|
||||
@@ -2346,6 +2347,7 @@ function AffiliateDashPlatformPanel() {
|
||||
function hydrateConfig(response: AdminAffiliateDashConfigResponse) {
|
||||
const source = response.source
|
||||
setEnabled(source.enabled !== false)
|
||||
setPreferredMatchEnabled(source.preferredMatchEnabled !== false)
|
||||
setBaseUrl(source.baseUrl || '')
|
||||
setAppKey(source.appKey || '')
|
||||
setAppSecret(source.appSecret || '')
|
||||
@@ -2368,6 +2370,7 @@ function AffiliateDashPlatformPanel() {
|
||||
try {
|
||||
const payload: AdminAffiliateDashConfig = {
|
||||
enabled,
|
||||
preferredMatchEnabled,
|
||||
baseUrl,
|
||||
appKey,
|
||||
appSecret,
|
||||
@@ -2464,6 +2467,8 @@ function AffiliateDashPlatformPanel() {
|
||||
<Space>
|
||||
<Typography.Text>启用</Typography.Text>
|
||||
<Switch checked={enabled} onChange={setEnabled} />
|
||||
<Typography.Text type="secondary">映射命中优先</Typography.Text>
|
||||
<Switch checked={preferredMatchEnabled} onChange={setPreferredMatchEnabled} />
|
||||
</Space>
|
||||
<Space wrap>
|
||||
<span>BASE_URL</span>
|
||||
|
||||
Reference in New Issue
Block a user