MrShi
2025-08-19 30e858fa504b268b9b436afca0a1259cf6e8c488
h5/App.vue
@@ -2,15 +2,31 @@
   export default {
      onLaunch: function() {
         // this.init()
         this.goException()
         this.initRegister()
      },
      onShow: function() {
         //this.goException()
         console.log('App Show')
      },
      onHide: function() {
         console.log('App Hide')
      },
      methods: {
         goException(){
            try {
              const res = wx.getSystemInfoSync()
              if(!res.environment  || res.environment !=='wxwork' ){
                 uni.reLaunch({
                    url:'/pages/exception/exception'
                 })
              }
            } catch (e) {
              uni.reLaunch({
                 url:'/pages/exception/exception'
              })
            }
         },
         async initRegister() {
            let fullURL = window.location.href.substring(0, window.location.href.lastIndexOf('#'))
            console.log(fullURL)