How to monitor the return event of Wechat browser in the H5 page?

$(function () {

    pushHistory();  
    var bool=false;  
    setTimeout(function(){  
          bool=true;  
    },1500);  
    window.addEventListener("popstate", function(e) {  
      if(bool)  
        {  
                alert("");//  
        }  
        pushHistory();  
          
}, false);  

});
when using this code to listen, click once or on this interface, and you need to click twice to return to the corresponding interface. How to solve this problem?

Mar.05,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea7827-47c26.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea7827-47c26.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?