fix: preserve order dispatch mode
This commit is contained in:
@@ -142,6 +142,7 @@
|
||||
const matchStep = computed(() => (matchProgress.value < 35 ? 0 : matchProgress.value < 60 ? 1 : matchProgress.value < 85 ? 2 : 3));
|
||||
const matchSteps = ['正在匹配任务', '获取商品信息', '确认任务内容', '发放任务结果'];
|
||||
const matchingHint = computed(() => {
|
||||
if (order.value?.dispatch_mode === 'manual') return '订单已领取,正在等待后台匹配...';
|
||||
if (matchRemainingSeconds.value > 0) return `系统正在派单... ${formatCountdown(matchRemainingSeconds.value)}`;
|
||||
return pollFinished.value ? '任务仍在匹配,可稍后前往记录查看' : '系统正在为您匹配任务,请稍等...';
|
||||
});
|
||||
@@ -275,7 +276,9 @@
|
||||
if (!order.value?.id) return;
|
||||
if (pollTimer) window.clearTimeout(pollTimer);
|
||||
const scheduledAt = Date.parse(String(order.value?.scheduled_match_at || ''));
|
||||
const wait = Number.isFinite(scheduledAt) && scheduledAt > Date.now()
|
||||
const wait = order.value?.dispatch_mode === 'manual'
|
||||
? 10000
|
||||
: Number.isFinite(scheduledAt) && scheduledAt > Date.now()
|
||||
? scheduledAt - Date.now() + 300
|
||||
: 1200;
|
||||
pollTimer = window.setTimeout(async () => {
|
||||
|
||||
Reference in New Issue
Block a user