feat(semi-auto): 重构客户资料收集与虎牙绑定确认流程
- 客户资料页按设计稿重构,区服固定四项下拉,游戏编号/角色名校验 - 虎牙登录与绑定页统一深色样式,扫码页新增改用手机号登录 - 待确认角色 UID 改用 huyaUid,不再展示虎牙加密 roleId - 绑定确认新增两侧角色比对,不一致禁止确认,会话过期引导重新登录 - 新增迁移 168/169 与角色绑定单测,脚本换行符固定为 LF
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import { apiGet, apiPost } from '@/lib/http'
|
||||
import type { CustomerLoginInfo, CustomerSemiAutoTask } from '@/types/customer-fulfillment'
|
||||
import type {
|
||||
CustomerBindingInfo,
|
||||
CustomerLoginInfo,
|
||||
CustomerSemiAutoTask,
|
||||
} from '@/types/customer-fulfillment'
|
||||
|
||||
export function fetchCustomerFulfillment(orderNo: string) {
|
||||
return apiGet<CustomerSemiAutoTask[]>(
|
||||
@@ -14,6 +18,17 @@ export function markCustomerFulfillmentOpened(orderNo: string, taskId: number) {
|
||||
)
|
||||
}
|
||||
|
||||
export function saveCustomerTaskProfile(
|
||||
orderNo: string,
|
||||
taskId: number,
|
||||
input: { roleName: string; roleId: string; serverZone: string },
|
||||
) {
|
||||
return apiPost<{ task: CustomerSemiAutoTask }>(
|
||||
`/api/v1/customer-fulfillment/${encodeURIComponent(orderNo)}/tasks/${taskId}/profile`,
|
||||
input,
|
||||
)
|
||||
}
|
||||
|
||||
export function startCustomerLogin(orderNo: string, taskId: number) {
|
||||
return apiPost<{ task: CustomerSemiAutoTask; login: CustomerLoginInfo }>(
|
||||
`/api/v1/customer-fulfillment/${encodeURIComponent(orderNo)}/tasks/${taskId}/login/start`,
|
||||
@@ -27,6 +42,30 @@ export function pollCustomerLogin(orderNo: string, taskId: number) {
|
||||
)
|
||||
}
|
||||
|
||||
export function startCustomerBinding(
|
||||
orderNo: string,
|
||||
taskId: number,
|
||||
options: { forceRebind?: boolean } = {},
|
||||
) {
|
||||
return apiPost<{ task: CustomerSemiAutoTask; binding: CustomerBindingInfo }>(
|
||||
`/api/v1/customer-fulfillment/${encodeURIComponent(orderNo)}/tasks/${taskId}/binding/start`,
|
||||
options.forceRebind ? { forceRebind: true } : {},
|
||||
)
|
||||
}
|
||||
|
||||
export function pollCustomerBinding(orderNo: string, taskId: number) {
|
||||
return apiGet<{ task: CustomerSemiAutoTask; binding: CustomerBindingInfo | null }>(
|
||||
`/api/v1/customer-fulfillment/${encodeURIComponent(orderNo)}/tasks/${taskId}/binding/status`,
|
||||
)
|
||||
}
|
||||
|
||||
export function confirmCustomerBinding(orderNo: string, taskId: number) {
|
||||
return apiPost<{ task: CustomerSemiAutoTask; binding: CustomerBindingInfo }>(
|
||||
`/api/v1/customer-fulfillment/${encodeURIComponent(orderNo)}/tasks/${taskId}/binding/confirm`,
|
||||
{},
|
||||
)
|
||||
}
|
||||
|
||||
type CustomerHuyaChallengeBase = {
|
||||
image: string
|
||||
width: number
|
||||
|
||||
Reference in New Issue
Block a user