The h5 page determines whether app is installed, but after opening app, it will jump to the download page. How to solve this problem?

get down on your knees and beg the boss for help


openAPP(e) {
      var ua = window.navigator.userAgent.toLowerCase();
      console.log(ua)
      //
      if (ua.match(/MicroMessenger/i) == "micromessenger") {
        // window.location.href = "downLoadForPhone";
        
      } else {
        //
        if (navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)) {
            window.location.href = "app://";
          var loadDateTime = new Date();
          window.setTimeout(function() {
            var timeOutDateTime = new Date();
            if (timeOutDateTime - loadDateTime < 5000) {
              window.location.href = ""; //ios
            } else {
              window.close();
            }
          }, 3000);
          
        } else if (navigator.userAgent.match(/android/i)) {
        window.location.href = "app://";
            window.setTimeout(function() {
              
              window.location.href = ""; //
            }, 2000)
            return


        }
      }
    }
Jul.23,2021

window.close () can only close pages opened by window.open. To close the current page using window.close, you need to use the open method:

  

ask the landlord whether he has solved the problem

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-1ebf850-2a5a.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-1ebf850-2a5a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?