优化领取结果和CloudTentacles平台兑换购买记录
This commit is contained in:
@@ -305,6 +305,10 @@ export function mapClaimKuaishouCloudFulfillment(task: TaskRow, order: OrderRow)
|
||||
dispatch: {
|
||||
status: String(dispatch.status || 'pending').trim() || 'pending',
|
||||
dispatchAt: dispatch.dispatchAt || null,
|
||||
failedAt: dispatch.failedAt || null,
|
||||
failedStage: String(dispatch.failedStage || '').trim(),
|
||||
errorCode: String(dispatch.errorCode || '').trim(),
|
||||
errorMessage: String(dispatch.errorMessage || '').trim(),
|
||||
note: String(dispatch.note || '').trim(),
|
||||
},
|
||||
returnNumber: {
|
||||
|
||||
@@ -549,8 +549,17 @@ export async function redeemKuaishouCloudClaim(token: unknown) {
|
||||
})
|
||||
} catch (error) {
|
||||
const latestTask = await getTaskById(lockedTask.id)
|
||||
if (latestTask && normalizeTaskStatus(latestTask.task_status) !== TASK_STATUS.REDEEMING) {
|
||||
return getKuaishouCloudClaimDetail(token)
|
||||
const latestStatus = latestTask ? normalizeTaskStatus(latestTask.task_status) : ''
|
||||
if (latestTask && latestStatus !== TASK_STATUS.REDEEMING) {
|
||||
if (
|
||||
latestStatus === TASK_STATUS.DISPATCHED_PENDING_RETURN ||
|
||||
latestStatus === TASK_STATUS.COMPLETED ||
|
||||
latestStatus === TASK_STATUS.REDEEMED
|
||||
) {
|
||||
return getKuaishouCloudClaimDetail(token)
|
||||
}
|
||||
|
||||
throw error
|
||||
}
|
||||
|
||||
const message = error instanceof Error ? error.message : '兑换请求提交失败,请联系客服处理'
|
||||
|
||||
Reference in New Issue
Block a user