Use js to write a scheduled task, ajax asynchronous request, and the data returned each time is stored in the client. Then judge. This is a personal opinion. There are many ways,
reply1. Time: Refresh the page every 5 minutes and query the database. If the order status is unprocessed, it will be marked red/a dialog box will pop up/a voice reminder will be triggered.
2 New order After generating a new order, voice reminder
Workerman has a long connection, and the scheduled task checks the database expiration every second and can actively send messages to the front end.
Use js to write a scheduled task, ajax asynchronous request, and the data returned each time is stored in the client. Then judge. This is a personal opinion. There are many ways,
The time interval can be query every 5-10 minutes.