diff --git a/mt/auto-meal-complete.user.js b/mt/auto-meal-complete.user.js index 76bee79..db9b5dc 100644 --- a/mt/auto-meal-complete.user.js +++ b/mt/auto-meal-complete.user.js @@ -85,13 +85,13 @@ let wmOrderViewId = order.wmOrderViewIdStr let daySeq = order.daySeq let result = await request('/v2/common/w/reported/completeMealTime', { - wmPoiId: mt.wmPoiId, - wmOrderViewId: wmOrderViewId + wmPoiId: cookies.wmPoiId, + wmOrderViewId }) debug('订单 #' + daySeq + ' 上报出餐结束.') mt.submitOrders.push({ completeTime: new Date().toLocaleTimeString(), - daySn: daySeq, orderId: wmOrderViewId, tip, cookTime + daySn: daySeq, orderId: wmOrderViewId, tip, cookTime, result }) if (mt.submitOrders.length > mt.maxLogOrderLength) { mt.submitOrders = mt.submitOrders.slice(mt.submitOrders.length - mt.maxLogOrderLength) @@ -204,10 +204,11 @@ } else { updateInfo() } + heartbeat() } function printOrderInfo(order) { let leftTime = order.submitCanClickLimitTime < Date.now() / 1000 - ? order.submitLeft : order.submitCanClickLimitTime - Date.now() / 1000 + ? order.submitLeft : Date.now() / 1000 - order.submitCanClickLimitTime return `订单: #${order.daySeq} ${order.wordLogo} 出餐状态 ${order.isFoodDone ? '已出餐' : `未出餐(${leftTime.toFixed(0)}s)`} 配送状态 ${order.logisticsStatus}` @@ -234,8 +235,8 @@