From 687503c0be4afd4c8f3b8caf0fb67a2b8bd45810 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期四, 22 十二月 2022 16:58:05 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/index.html |    5 +++++
 src/main/webapp/views/news.html  |    6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index b29b3ea..c8388f0 100644
--- a/src/main/webapp/views/index.html
+++ b/src/main/webapp/views/index.html
@@ -74,6 +74,11 @@
                             $('.layx-min-statu').css("left", "inherit").css("right", "10px")
                         }
                     }
+                    , onrestore:{
+                        after: function () {
+                            top.autoScroll = true;
+                        }
+                    }
                 }
             }
         );
diff --git a/src/main/webapp/views/news.html b/src/main/webapp/views/news.html
index 779e730..23fe3b3 100644
--- a/src/main/webapp/views/news.html
+++ b/src/main/webapp/views/news.html
@@ -42,7 +42,7 @@
 </body>
 <script src="../static/js/jquery/jquery-3.3.1.min.js"></script>
 <script>
-    let autoScroll = true;
+    top.autoScroll = true;
 
     function scrollUp(){
         const scrollUp = document.getElementById('scroll-up');
@@ -56,12 +56,12 @@
     })
 
     $(document).on('click ','body', function () {
-        autoScroll = false;
+        top.autoScroll = false;
     })
 
     setInterval(()=>{
         $("body").append("<h1>Hello World</h1>");
-        if (autoScroll) {
+        if (top.autoScroll) {
             window.scrollTo(0, document.body.scrollHeight)
         }
     }, 500)

--
Gitblit v1.9.1