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