diff --git a/apps/backend/src/services/douyu-fulfillment/douyu-fulfillment-service.ts b/apps/backend/src/services/douyu-fulfillment/douyu-fulfillment-service.ts index 0b3e83ae..b4db027c 100644 --- a/apps/backend/src/services/douyu-fulfillment/douyu-fulfillment-service.ts +++ b/apps/backend/src/services/douyu-fulfillment/douyu-fulfillment-service.ts @@ -978,6 +978,12 @@ export async function saveDouyuCustomerProfile( export async function startDouyuCustomerBinding(orderNo: string, forceRefresh = false) { let task = await loadTaskByOrderNo(orderNo) + if (!hasDouyuCustomerProfile(task)) { + throw createHttpError('请先提交游戏角色和游戏主页截图,再开始绑定', { + statusCode: 409, + errorCode: 'douyu_customer_profile_required', + }) + } if (!task.live_session_id) { const session = await ensureLiveSession(task) task = session.task diff --git a/apps/frontend/src/pages/douyu-fulfillment/DouyuFulfillmentPage.tsx b/apps/frontend/src/pages/douyu-fulfillment/DouyuFulfillmentPage.tsx index 17a3390d..a0316c63 100644 --- a/apps/frontend/src/pages/douyu-fulfillment/DouyuFulfillmentPage.tsx +++ b/apps/frontend/src/pages/douyu-fulfillment/DouyuFulfillmentPage.tsx @@ -155,7 +155,14 @@ export default function DouyuFulfillmentPage() { const task = data?.task const live = data?.live - const needsProfile = Boolean(task && !task.customer_role_name) + const hasCustomerProfile = Boolean( + task?.customer_role_name?.trim() && + ['wechat', 'qq'].includes(task.customer_platform) && + ['ios', 'android'].includes(task.customer_system) && + task.customer_homepage_screenshot_object_key?.trim() && + task.customer_homepage_screenshot_url?.trim(), + ) + const needsProfile = Boolean(task && !hasCustomerProfile) const bindingFailed = Boolean(live && BINDING_FAILURE_ISSUES.has(live.issueCode)) const bindingFailureRetryable = Boolean(live?.issueCode === 'binding_failed' && live.accountReady)