feat(douyu): 新增客户领取与角色绑定工作台

This commit is contained in:
yml
2026-11-18 11:00:28 +08:00
parent d0ec21ce16
commit 6de129d70a
29 changed files with 2119 additions and 5 deletions
@@ -0,0 +1,46 @@
import { apiGet, apiPost } from '@/lib/http'
import type {
DouyuCustomerFulfillment,
DouyuCustomerPlatform,
DouyuCustomerSystem,
} from '@/types/douyu-fulfillment'
export function fetchDouyuFulfillment(orderNo: string) {
return apiGet<DouyuCustomerFulfillment>(
`/api/v1/douyu-fulfillment/${encodeURIComponent(orderNo)}`,
)
}
export function saveDouyuProfile(
orderNo: string,
input: {
roleName: string
platform: DouyuCustomerPlatform
system: DouyuCustomerSystem
},
) {
return apiPost<DouyuCustomerFulfillment>(
`/api/v1/douyu-fulfillment/${encodeURIComponent(orderNo)}/profile`,
input,
)
}
export function startDouyuBinding(orderNo: string, forceRefresh = false) {
return apiPost<DouyuCustomerFulfillment>(
`/api/v1/douyu-fulfillment/${encodeURIComponent(orderNo)}/binding/start`,
{ forceRefresh },
)
}
export function pollDouyuBinding(orderNo: string) {
return apiGet<DouyuCustomerFulfillment>(
`/api/v1/douyu-fulfillment/${encodeURIComponent(orderNo)}/binding/status`,
)
}
export function confirmDouyuBinding(orderNo: string) {
return apiPost<DouyuCustomerFulfillment>(
`/api/v1/douyu-fulfillment/${encodeURIComponent(orderNo)}/binding/confirm`,
{},
)
}