From d88a5a7ba824740d4bdcafab42c7820fcc689241 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期五, 23 十二月 2022 08:12:55 +0800
Subject: [PATCH] #

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

diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index c8388f0..3c80877 100644
--- a/src/main/webapp/views/index.html
+++ b/src/main/webapp/views/index.html
@@ -76,7 +76,8 @@
                     }
                     , onrestore:{
                         after: function () {
-                            top.autoScroll = true;
+                            let win = layx.getFrameContext('wcs-news');
+                            win.autoScroll = true
                         }
                     }
                 }
diff --git a/src/main/webapp/views/news.html b/src/main/webapp/views/news.html
index 23fe3b3..5d7f9ef 100644
--- a/src/main/webapp/views/news.html
+++ b/src/main/webapp/views/news.html
@@ -42,7 +42,8 @@
 </body>
 <script src="../static/js/jquery/jquery-3.3.1.min.js"></script>
 <script>
-    top.autoScroll = true;
+    var autoScroll = true;
+    var asdsa = '1231';
 
     function scrollUp(){
         const scrollUp = document.getElementById('scroll-up');
@@ -56,12 +57,12 @@
     })
 
     $(document).on('click ','body', function () {
-        top.autoScroll = false;
+        autoScroll = false;
     })
 
     setInterval(()=>{
         $("body").append("<h1>Hello World</h1>");
-        if (top.autoScroll) {
+        if (autoScroll) {
             window.scrollTo(0, document.body.scrollHeight)
         }
     }, 500)

--
Gitblit v1.9.1