Parcourir la source

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

htc il y a 13 heures
Parent
commit
8185455a5b
1 fichiers modifiés avec 6 ajouts et 2 suppressions
  1. 6 2
      App.vue

+ 6 - 2
App.vue

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