瀏覽代碼

修复长按识别添加企业微信返回后不是到专业支持页面而是跳转到首页的问题

htc 21 小時之前
父節點
當前提交
8185455a5b
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      App.vue

+ 6 - 2
App.vue

@@ -2,7 +2,7 @@
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
-				
+				isFirstLaunch: true
 			}
 			}
 		},
 		},
 		onLaunch: function(options) {
 		onLaunch: function(options) {
@@ -10,7 +10,10 @@
 		},
 		},
 		onShow: function(options) {
 		onShow: function(options) {
 			this.autoUpdate();
 			this.autoUpdate();
-			this.handleLaunchOrShow(options);
+			if (this.isFirstLaunch) {
+				this.handleLaunchOrShow(options);
+				this.isFirstLaunch = false;
+			}
 			
 			
 			//通过 URL Scheme 唤醒小程序,传递的参数 query
 			//通过 URL Scheme 唤醒小程序,传递的参数 query
 			if (options.scene === 1065 && options.query) {
 			if (options.scene === 1065 && options.query) {
@@ -20,6 +23,7 @@
 					uni.reLaunch({
 					uni.reLaunch({
 						url: `/pages/home?shareTQId=${shareTQId}&shareUserId=${shareUserId}&from=urlScheme`
 						url: `/pages/home?shareTQId=${shareTQId}&shareUserId=${shareUserId}&from=urlScheme`
 					});
 					});
+					this.isFirstLaunch = false;
 				}
 				}
 			}
 			}
 		},
 		},