Browse Source

修复快速点击导览崩溃问题

shaogen1995 3 years ago
parent
commit
e77b938ea9
1 changed files with 20 additions and 7 deletions
  1. 20 7
      SuperTwo762/js/main_2020_show.js

+ 20 - 7
SuperTwo762/js/main_2020_show.js

@@ -10,6 +10,7 @@ window.lerp = null
 window.transitions = null
 window.browser = null
 window.momentTourBlackNewType = 0//true
+window.myTimer = null;
 
 g_playAudio = null
 
@@ -7207,15 +7208,27 @@ window.Modernizr = function(n, e, t) {
                 $(".thumbImg").on("mouseout", function() {
                     t.clearPath()
                 }),
+
+
+                //节流处理
                 $(".thumbImg").on("click", function(e) {
-                    l(e);
-                    var i = $(this);
-                    J.updateInteraction(Se.InteractionGui, "thumbnail"),
-                    J.trackAlways("showcase_gui", {
-                        gui_action: "click_highlight"
-                    }),
-                    t.goToHighlight([i.data("index"),0])//改
+                    if(window.myTimer!==null) return;
+                    window.myTimer = setTimeout(() => {
+
+                        l(e);
+                        var i = $(this);
+                        J.updateInteraction(Se.InteractionGui, "thumbnail"),
+                        J.trackAlways("showcase_gui", {
+                            gui_action: "click_highlight"
+                        }),
+                        t.goToHighlight([i.data("index"),0])//改
+
+                        //当定时器执行完毕,重新发开节流阀
+                        window.myTimer =null;
+                      },1000);
                 }),
+
+
                 $(".previous").find("a").on("click", function(e) {
                     l(e),
                     J.trackAlways("showcase_gui", {