统一发货口径并保护结果数据
This commit is contained in:
@@ -27,7 +27,7 @@ import { formatDateTime } from '../utils/time'
|
||||
|
||||
const statusMap: Record<string, { color: string; text: string }> = {
|
||||
paid: { color: 'orange', text: '待发货' },
|
||||
delivering: { color: 'blue', text: '履约中' },
|
||||
delivering: { color: 'blue', text: '发货中' },
|
||||
delivered: { color: 'green', text: '已交付' },
|
||||
ship_failed: { color: 'red', text: '发货失败' },
|
||||
cancelled: { color: 'default', text: '已取消' },
|
||||
|
||||
@@ -61,13 +61,13 @@ const scopeOptions = [
|
||||
{ value: 'products:read', label: '商品读取' },
|
||||
{ value: 'orders:read', label: '订单读取' },
|
||||
{ value: 'orders:write', label: '订单写入' },
|
||||
{ value: 'fulfillment:read', label: '履约读取' },
|
||||
{ value: 'fulfillment:read', label: '发货读取' },
|
||||
{ value: 'wallet:read', label: '钱包读取' },
|
||||
]
|
||||
|
||||
const eventOptions = [
|
||||
{ value: 'order.created', label: '订单创建' },
|
||||
{ value: 'order.fulfillment.updated', label: '履约更新' },
|
||||
{ value: 'order.fulfillment.updated', label: '发货更新' },
|
||||
{ value: 'order.cancelled', label: '订单取消' },
|
||||
]
|
||||
|
||||
@@ -689,7 +689,7 @@ export default function MerchantCenter({ fixedTab, title = '商户中心' }: Mer
|
||||
|
||||
const tabItems = [
|
||||
{ key: 'products', label: '商品', disabled: !hasFeature('products'), children: productContent },
|
||||
{ key: 'orders', label: '履约订单', disabled: !hasFeature('orders'), children: orderContent },
|
||||
{ key: 'orders', label: '发货订单', disabled: !hasFeature('orders'), children: orderContent },
|
||||
{ key: 'wallet', label: '钱包', disabled: !hasFeature('wallet'), children: walletContent },
|
||||
{ key: 'api', label: 'API 密钥', disabled: !hasFeature('api'), children: apiKeyContent },
|
||||
{ key: 'callbacks', label: '回调', disabled: !hasFeature('callbacks'), children: callbackContent },
|
||||
@@ -765,7 +765,7 @@ export default function MerchantCenter({ fixedTab, title = '商户中心' }: Mer
|
||||
</Form.Item>
|
||||
)}
|
||||
</Space>
|
||||
<Form.Item name="fulfillment_config" label="履约配置">
|
||||
<Form.Item name="fulfillment_config" label="发货配置">
|
||||
<Input.TextArea rows={3} placeholder='{"provider":"manual"}' />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
|
||||
@@ -452,7 +452,7 @@ function EndpointSection({ spec }: { spec: EndpointSpec }) {
|
||||
function StatusSection() {
|
||||
return (
|
||||
<SectionWrap id="status" title="状态说明">
|
||||
<Card className="api-docs__card" size="small" title="订单状态 order_status 与 can_fulfill">
|
||||
<Card className="api-docs__card" size="small" title="订单状态 order_status 与 can_ship">
|
||||
<Table
|
||||
className="api-docs__table"
|
||||
size="small"
|
||||
@@ -462,11 +462,11 @@ function StatusSection() {
|
||||
columns={[
|
||||
{ title: '状态', dataIndex: 'name', width: 140, render: (v) => <Text code>{v}</Text> },
|
||||
{
|
||||
title: 'can_fulfill',
|
||||
title: 'can_ship',
|
||||
dataIndex: 'example',
|
||||
width: 160,
|
||||
render: (v: string) =>
|
||||
v === 'can_fulfill=true' ? <Tag color="green">true</Tag> : <Tag>false</Tag>,
|
||||
v === 'can_ship=true' ? <Tag color="green">true</Tag> : <Tag>false</Tag>,
|
||||
},
|
||||
{ title: '说明', dataIndex: 'desc' },
|
||||
]}
|
||||
|
||||
Reference in New Issue
Block a user