From 30e858fa504b268b9b436afca0a1259cf6e8c488 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 19 八月 2025 11:01:40 +0800
Subject: [PATCH] 优化
---
h5/App.vue | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/h5/App.vue b/h5/App.vue
index f037b3a..9225f1e 100644
--- a/h5/App.vue
+++ b/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)
--
Gitblit v1.9.3