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/manifest.json | 4 +- uniapp/App.vue | 56 ++++++++++++++++++---------- uniapp/utils/config.js | 4 +- uniapp/pages/index/index.vue | 12 +++++- 4 files changed, 50 insertions(+), 26 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; diff --git a/uniapp/manifest.json b/uniapp/manifest.json index 26c93e8..2f829fe 100644 --- a/uniapp/manifest.json +++ b/uniapp/manifest.json @@ -2,8 +2,8 @@ "name" : "澶ц繑瀹�", "appid" : "__UNI__FC8858A", "description" : "澶ц繑瀹榓pp", - "versionName" : "1.2.6", - "versionCode" : 126, + "versionName" : "1.2.7", + "versionCode" : 127, "transformPx" : false, /* 5+App鐗规湁鐩稿叧 */ "app-plus" : { diff --git a/uniapp/pages/index/index.vue b/uniapp/pages/index/index.vue index 65d18af..0dcdf83 100644 --- a/uniapp/pages/index/index.vue +++ b/uniapp/pages/index/index.vue @@ -145,7 +145,7 @@ onLoad() { this.getCategoryList(); this.getCusPopupInfo(); - + this.getArgument(); }, onShow() { if (!this.hasshow) { @@ -164,7 +164,15 @@ }, watch: {}, methods: { - + getArgument() + { + var arg=getApp().globalData.argumentStr; + if(arg&&arg.length>0) + { + getApp().targetArgument(arg); + getApp().globalData.argumentStr=""; + } + }, shShow() { var that = this; var istoLogin = true; diff --git a/uniapp/utils/config.js b/uniapp/utils/config.js index 8f94b03..567e57f 100644 --- a/uniapp/utils/config.js +++ b/uniapp/utils/config.js @@ -1,6 +1,6 @@ //const httpUrl = ""; // 鎺ュ彛鍩熷悕 -const httpUrl = "http://appapitest.ushopvip.com"; // 娴嬭瘯鐜鎺ュ彛鍩熷悕 -//const httpUrl = "http://dfgapp.ushopvip.com"; // 鐢熶骇鐜鎺ュ彛鍩熷悕 +//const httpUrl = "http://appapitest.ushopvip.com"; // 娴嬭瘯鐜鎺ュ彛鍩熷悕 +const httpUrl = "http://dfgapp.ushopvip.com"; // 鐢熶骇鐜鎺ュ彛鍩熷悕 const salt = ""; export default { httpUrl:httpUrl, -- Gitblit v1.9.3