From 1d6228281b48be3e0edf9d808b5c743ea24df53a Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期五, 11 八月 2023 16:31:31 +0800
Subject: [PATCH] no message

---
 uniapp/App.vue |   56 ++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 36 insertions(+), 20 deletions(-)

diff --git a/uniapp/App.vue b/uniapp/App.vue
index eb34b83..ac5afb2 100644
--- a/uniapp/App.vue
+++ b/uniapp/App.vue
@@ -130,10 +130,12 @@
 						this.globalData.systemLevel = e.system;
 						this.globalData.equipmentNumber = idfa.value()
 					};
+					this.getArgument(true);
 					// #endif
 				}
 			})
-
+			
+			
 		},
 		globalData: {
 			platform: '',
@@ -149,8 +151,12 @@
 			argumentStr: ''
 
 		},
+		data(){
+			return {
+				
+			}
+		},
 		onShow: function() {
-
 			var that = this;
 			uni.getNetworkType({
 				success: function(res) {
@@ -184,7 +190,7 @@
 				'pages/rankinglist/compareprice') {
 				getClipboard()
 			}
-			this.getArgument();
+			that.getArgument();
 			// #endif
 		},
 		onHide: function() {},
@@ -205,30 +211,39 @@
 					that.globalData.hasbcinit = true;
 				}
 			},
-			getArgument() {
+			targetArgument(args){
+				var toarg = args.replace('dafanguan://', '');
+				var argObj = JSON.parse(decodeURIComponent(toarg));
+				switch (argObj.totype) {
+					case "0": //鍐呴摼
+						if(argObj.url)
+						{
+							uni.navigateTo({
+								url: argObj.url
+							});
+						}
+						break;
+					default:
+						break;
+				}
+			},
+			getArgument(isload=false) {
+				if(this.globalData.argumentStr&&this.globalData.argumentStr.length>0)
+				{
+					return;
+				}
 				try {
 					var args = plus.runtime.arguments;
+					console.log(args);
 					if (args) {
-						/* if (this.globalData.argumentStr == args) {
+						if(isload)
+						{
+							this.globalData.argumentStr = args;
 							return;
 						}
-						this.globalData.argumentStr = args; */
 						plus.runtime.arguments = "";
 						plus.runtime.arguments = null;
-						var toarg = args.replace('dafanguan://', '');
-						var argObj = JSON.parse(decodeURIComponent(toarg));
-						switch (argObj.totype) {
-							case "0": //鍐呴摼
-								if(argObj.url)
-								{
-									uni.navigateTo({
-										url: argObj.url
-									});
-								}
-								break;
-							default:
-								break;
-						}
+						this.targetArgument(args);
 					}
 				} catch (es) {
 					console.log(es)
@@ -299,6 +314,7 @@
 							that.globalData.ifwt = 0
 						}
 					}
+					
 					// #endif
 				}).catch(function(err) {
 					that.globalData.hasinit = false;

--
Gitblit v1.9.3