更新 ele/auto-meal-complete.user.js
This commit is contained in:
parent
fd4c405d20
commit
9b38968350
@ -123,7 +123,8 @@
|
||||
return mealComplete(cook, cookTime, '骑手未到店')
|
||||
}
|
||||
debug('订单 #' + daySn + ' 还剩 ' + leftTime + 's 上报超时 将于 '
|
||||
+ (leftTime - (deliveOnShop ? ele.autoSubmitLeftTimeWhenOnShop : ele.autoSubmitLeftTime)) + 's 后自动上报.')
|
||||
+ (Math.max(cook.mealPreparationInfo.minMealCompleteTimeCount,
|
||||
leftTime - (deliveOnShop ? ele.autoSubmitLeftTimeWhenOnShop : ele.autoSubmitLeftTime))) + 's 后自动上报.')
|
||||
cook.mealPreparationInfo.minMealCompleteTimeCount -= 5
|
||||
cook.mealPreparationInfo.commonShowTime -= 5
|
||||
}
|
||||
@ -158,6 +159,7 @@
|
||||
${ele.processOrders.length
|
||||
? ele.processOrders.map(o => ' 订单: #' + o.header.daySn
|
||||
+ ' 出餐状态 ' + (o.mealPreparationInfo.mealComplete ? '已出餐' : '未出餐')
|
||||
+ (o.mealPreparationInfo.minMealCompleteTimeCount > 0 ? `(${o.mealPreparationInfo.minMealCompleteTimeCount}s)` : '')
|
||||
+ ' 配送状态 ' + o.deliveryInfo.distTraceView.traceView.status + ''
|
||||
+ (o.deliveryInfo.deliveryDistance ? ' ' + o.deliveryInfo.deliveryDistance : '')).join('</br>')
|
||||
: '当前没有进行中的订单.'}
|
||||
@ -189,21 +191,19 @@
|
||||
}
|
||||
}
|
||||
async function scheduleCheck() {
|
||||
await sleep(ele.checkInterval * 1000)
|
||||
await checkCooking()
|
||||
scheduleCheck()
|
||||
}
|
||||
async function scheduleSync() {
|
||||
await sleep(ele.syncInterval * 1000)
|
||||
await syncOrders()
|
||||
await sleep(ele.checkInterval * 1000)
|
||||
scheduleCheck()
|
||||
}
|
||||
async function main() {
|
||||
setTimeout(async () => {
|
||||
while (!document.getElementById('app-container-notice-bar')) {
|
||||
await sleep(300)
|
||||
}
|
||||
window.appContainerNoticeBar = document.getElementById('app-container-notice-bar')
|
||||
await scheduleSync()
|
||||
await scheduleCheck()
|
||||
}, 3000)
|
||||
debug('页面注入成功 开始运行...')
|
||||
syncOrders()
|
||||
scheduleCheck()
|
||||
setInterval(() => syncOrders(), ele.syncInterval * 1000)
|
||||
}
|
||||
var SubmitOrdersKey = 'AutoMealComplete:SubmitOrders'
|
||||
var ele = {
|
||||
|
Loading…
Reference in New Issue
Block a user