新增:半自动履约工作台与虎牙客户授权流程
- 新增 153 半自动履约迁移、后台任务接口与客户履约接口 - 接入虎牙 Connector 登录会话、绑定与一次性 CK 注入票据 - 新增后台半自动履约页面和客户履约入口 - 完善手工履约配置、成本确认事务与运行时连接器配置 - 同步权威文档、环境示例、部署脚本和迁移展示逻辑
This commit is contained in:
@@ -31,6 +31,7 @@ import {
|
||||
Row,
|
||||
Select,
|
||||
Space,
|
||||
Switch,
|
||||
Statistic,
|
||||
Tag,
|
||||
Typography,
|
||||
@@ -65,6 +66,14 @@ type ConfigFormValues = {
|
||||
creditQuantity: number
|
||||
}>
|
||||
note?: string
|
||||
semiAutoEnabled?: boolean
|
||||
semiAutoPlatform?: '' | 'huya' | 'weibo'
|
||||
semiAutoConfig?: {
|
||||
pageTitle?: string
|
||||
pageDescription?: string
|
||||
loginInstructions?: string
|
||||
bindingInstructions?: string
|
||||
}
|
||||
}
|
||||
|
||||
const PLATFORM_TAG_COLORS: Record<string, string> = {
|
||||
@@ -142,6 +151,9 @@ export function ManualSkuConfigPanel() {
|
||||
creditQuantity: Number(channel.creditQuantity || 0),
|
||||
})),
|
||||
note: values.note || '',
|
||||
semiAutoEnabled: values.semiAutoEnabled === true,
|
||||
semiAutoPlatform: values.semiAutoEnabled ? values.semiAutoPlatform || '' : '',
|
||||
semiAutoConfig: values.semiAutoConfig || {},
|
||||
}),
|
||||
onSuccess: (response) => {
|
||||
const summary = response.data.syncSummary
|
||||
@@ -201,6 +213,9 @@ export function ManualSkuConfigPanel() {
|
||||
creditQuantity: channel.creditQuantity,
|
||||
})),
|
||||
note: item.config?.note || '',
|
||||
semiAutoEnabled: item.config?.semiAutoEnabled === true,
|
||||
semiAutoPlatform: item.config?.semiAutoPlatform || '',
|
||||
semiAutoConfig: item.config?.semiAutoConfig || {},
|
||||
})
|
||||
setModalOpen(true)
|
||||
}
|
||||
@@ -212,6 +227,9 @@ export function ManualSkuConfigPanel() {
|
||||
skuKey: skuKey.trim(),
|
||||
channels: [{ platformKey: '', creditQuantity: 0 }],
|
||||
note: '',
|
||||
semiAutoEnabled: false,
|
||||
semiAutoPlatform: '',
|
||||
semiAutoConfig: {},
|
||||
})
|
||||
setModalOpen(true)
|
||||
}
|
||||
@@ -636,6 +654,54 @@ export function ManualSkuConfigPanel() {
|
||||
</Space>
|
||||
)}
|
||||
</Form.List>
|
||||
<Card size="small" title="半自动履约(可选)" style={{ marginTop: 14 }}>
|
||||
<Form.Item
|
||||
name="semiAutoEnabled"
|
||||
label="启用半自动履约"
|
||||
valuePropName="checked"
|
||||
extra="订单进入人工渠道后,客户可通过 /c/订单号 登录平台并完成绑定。"
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<Form.Item noStyle shouldUpdate>
|
||||
{() =>
|
||||
form.getFieldValue('semiAutoEnabled') ? (
|
||||
<>
|
||||
<Form.Item
|
||||
name="semiAutoPlatform"
|
||||
label="目标平台"
|
||||
rules={[{ required: true, message: '请选择目标平台' }]}
|
||||
>
|
||||
<Select
|
||||
options={[
|
||||
{ value: 'huya', label: '虎牙' },
|
||||
{ value: 'weibo', label: '微博(预留)' },
|
||||
]}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Row gutter={12}>
|
||||
<Col span={12}>
|
||||
<Form.Item name={['semiAutoConfig', 'pageTitle']} label="客户页标题">
|
||||
<Input maxLength={60} placeholder="例如:虎牙账号授权" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item name={['semiAutoConfig', 'pageDescription']} label="客户页说明">
|
||||
<Input maxLength={500} placeholder="展示在客户链接顶部" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
<Form.Item name={['semiAutoConfig', 'loginInstructions']} label="登录指引">
|
||||
<Input.TextArea rows={2} maxLength={1000} showCount />
|
||||
</Form.Item>
|
||||
<Form.Item name={['semiAutoConfig', 'bindingInstructions']} label="绑定指引">
|
||||
<Input.TextArea rows={2} maxLength={1000} showCount />
|
||||
</Form.Item>
|
||||
</>
|
||||
) : null
|
||||
}
|
||||
</Form.Item>
|
||||
</Card>
|
||||
<Form.Item name="note" label="备注">
|
||||
<Input.TextArea rows={2} maxLength={300} showCount />
|
||||
</Form.Item>
|
||||
|
||||
Reference in New Issue
Block a user