From a73e863fe7fbc16999af32c5f56fab0cea88bd31 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Wed, 6 Dec 2023 05:45:55 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20ele/auto-meal-complete.use?= =?UTF-8?q?r.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ele/auto-meal-complete.user.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ele/auto-meal-complete.user.js b/ele/auto-meal-complete.user.js index e3091fe..5382075 100644 --- a/ele/auto-meal-complete.user.js +++ b/ele/auto-meal-complete.user.js @@ -107,17 +107,20 @@ let cookTime = (Date.now() - new Date(cook.activeTime).getTime()) / 1000 let leftTime = cook.mealPreparationInfo.commonShowTime let deliveOnShop = cook.deliveryInfo.distTraceView.traceView.status == '骑士已到店' + || (cook.deliveryInfo.deliveryDistance + && cook.deliveryInfo.deliveryDistance.endsWith('m') + && parseInt(cook.deliveryInfo.deliveryDistance) < 100) if (deliveOnShop && cook.mealPreparationInfo.minMealCompleteTimeCount < 0 && leftTime < ele.autoSubmitLeftTimeWhenOnShop) { debug('订单 #' + daySn + ' 骑手已到店.') debug('订单 #' + daySn + ' 剩余出餐时间 ' + leftTime + 's 小于 ' + ele.autoSubmitLeftTimeWhenOnShop + 's 模拟提交出餐.') - return mealComplete(cook, cookTime, '骑手到店出餐') + return mealComplete(cook, cookTime, '骑手已到店') } if (leftTime < ele.autoSubmitLeftTime) { // 大于最小上报时长 并且距离上报超时不足 直接上报出餐 debug('订单 #' + daySn + ' 骑手未到店.') debug('订单 #' + daySn + ' 剩余出餐时间 ' + leftTime + 's 小于 ' + ele.autoSubmitLeftTime + 's 模拟提交出餐.') - return mealComplete(cook, cookTime, '骑手未到店出餐') + return mealComplete(cook, cookTime, '骑手未到店') } debug('订单 #' + daySn + ' 还剩 ' + leftTime + 's 上报超时 将于 ' + (leftTime - (deliveOnShop ? ele.autoSubmitLeftTimeWhenOnShop : ele.autoSubmitLeftTime)) + 's 后自动上报.')