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 后自动上报.')