From f19be7198186599a61df2baf3d07742c152db568 Mon Sep 17 00:00:00 2001 From: shuixiang Date: Sat, 11 Sep 2021 14:34:53 +0800 Subject: [PATCH] no message --- public/js/workorder-notice.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/public/js/workorder-notice.js b/public/js/workorder-notice.js index bc34a18..2eec9ea 100644 --- a/public/js/workorder-notice.js +++ b/public/js/workorder-notice.js @@ -1,5 +1,5 @@ -const workordertimer = setInterval(function () { - +function workorderNotice() +{ $.ajax({ url: '/'+window.location.pathname.split('/')[1]+'/workorder_notice', type: 'POST', @@ -65,5 +65,12 @@ const workordertimer = setInterval(function () { } }); +} +$(document).ready(function () { + workorderNotice(); +}); + +const workordertimer = setInterval(function () { + workorderNotice() }, 5000);