This commit is contained in:
yml
2026-04-08 16:30:42 +08:00
commit 313c036845
131 changed files with 22393 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
import { formatStatusWithRaw } from '@/utils/admin-display'
export function formatAdminWebhookEventType(eventType: string) {
const normalized = String(eventType || '').trim()
if (!normalized) {
return '-'
}
const labelMap: Record<string, string> = {
payment_success: '支付成功',
trade_create: '订单创建',
trade_closed: '订单关闭',
buyer_confirm_goods: '确认收货',
auto_delivery_done: '自动发货完成',
auto_delivery_confirmed: '自动发货确认完成',
refund_apply: '买家申请退款',
trade_event: '交易事件',
}
return formatStatusWithRaw(normalized, labelMap)
}