fix:修复bug;新增订单列表页面订单监控
This commit is contained in:
@@ -173,15 +173,15 @@ class OrderMonitor {
|
||||
|
||||
// 如果时间差超过1分钟,不进行提醒
|
||||
if (timeDiff > 3) {
|
||||
console.log(`订单 ${orderId} 完成时间与当前时间相差${timeDiff.toFixed(2)}分钟,超过3分钟,不进行提醒`);
|
||||
console.log(`订单 ${orderId} 完成时间与当前时间相差${timeDiff.toFixed(2)}分钟,超过3分钟,不进行弹窗提醒`);
|
||||
shouldNotify = false;
|
||||
}
|
||||
}
|
||||
|
||||
// 无论是否需要弹窗提醒,都要触发全局订单完成事件(用于订单列表、详情等页面刷新)
|
||||
uni.$emit('orderCompleted', orderData)
|
||||
|
||||
if (shouldNotify) {
|
||||
// 触发全局事件(订单详情页会监听此事件自动刷新)
|
||||
uni.$emit('orderCompleted', orderData)
|
||||
|
||||
// 显示全局通知
|
||||
uni.showToast({
|
||||
title: '风扇归还成功',
|
||||
|
||||
Reference in New Issue
Block a user