From d44598d72c02bc05227b64749ea017c1eb69c6a5 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期六, 06 三月 2021 14:46:46 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/home/console.html |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/main/webapp/views/home/console.html b/src/main/webapp/views/home/console.html
index c8cbda6..cabf101 100644
--- a/src/main/webapp/views/home/console.html
+++ b/src/main/webapp/views/home/console.html
@@ -391,6 +391,15 @@
         var carousel = layui.carousel;
         var device = layui.device();
 
+
+        getHeaderData();
+        getBodyData();
+
+        setInterval(function () {
+            getHeaderData();
+            getBodyData();
+        }, 3000)
+
         // 娓叉煋杞挱
         carousel.render({
             elem: '#workplaceNewsCarousel',
@@ -401,8 +410,6 @@
             trigger: device.ios || device.android ? 'click' : 'hover',
             anim: 'fade'
         });
-
-        getHeaderData();
 
         // 澶�
         function getHeaderData() {
@@ -434,8 +441,6 @@
             })
         }
 
-        getBodyData();
-
         // 澶�
         function getBodyData() {
             $.ajax({
@@ -448,22 +453,22 @@
                         var tpl1 = $('#combTpl').html();
                         var template1 = Handlebars.compile(tpl1);
                         var html1 = template1(res.data);
-                        $('#combList').append(html1);
+                        $('#combList').html(html1);
                         // 璁㈠崟
                         var tpl2 = $('#orderTpl').html();
                         var template2 = Handlebars.compile(tpl2);
                         var html2 = template2(res.data);
-                        $('#pakoutList').append(html2);
+                        $('#pakoutList').html(html2);
                         // 瀹夊叏搴撳瓨
                         var tpl3 = $('#safeQuaTpl').html();
                         var template3 = Handlebars.compile(tpl3);
                         var html3 = template3(res.data);
-                        $('#safeQuaList').append(html3);
+                        $('#safeQuaList').html(html3);
                         // 搴撳瓨婊炵暀
                         var tpl4 = $('#retentionTpl').html();
                         var template4 = Handlebars.compile(tpl4);
                         var html4 = template4(res.data);
-                        $('#retentionList').append(html4);
+                        $('#retentionList').html(html4);
                     } else if (res.code === 403) {
                         top.location.href = baseUrl + "/";
                     } else {

--
Gitblit v1.9.1