$ (document). Ready (function () {
SetInterval ("Startrequest ()", 300 * 1000);//5 minute call
});
function Startrequest () {
$.post ("/admin/orderinfo/getmessage", function (data) {
Console.info (data);
if (Data.uroleid = = 3)
{
if (Data.untreatedsum > 0 | | data.abnormalsum > 0 | | finishorder>0) {
Alert ("Hello, you have:" + data.untreatedsum + "The order is not processed, and" +data.abnormalsum+ "abnormal orders, and" +data.finishorder+ "the return of the order, please timely processing! ");
}
}
if (Data.uroleid = = 2)
{
if (Data.nopicksum > 0 | | data.nosendsum > 0 | | data.sendsum) {
Alert ("Hello, you have:" + data.nopicksum + "does not assign the pickup member's order, and" + Data.nosendsum + "is not assigned to the sender's order, and" +data.sendsum+ "order is being dispatched, please deal with it in time!) ");
}
}
});
}
A simple loop-by-time call method for Js,jquery