From 3767a086b9e54e333f0742800968700702d9c396 Mon Sep 17 00:00:00 2001 From: youmengting <2080639302@qq.com> Date: Tue, 13 Jun 2023 17:49:30 +0800 Subject: [PATCH] share-17:49 --- common/share.js | 5 ++++- pages/welcome/welcome.vue | 6 ++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/common/share.js b/common/share.js index 4392651..37d2f57 100644 --- a/common/share.js +++ b/common/share.js @@ -143,6 +143,7 @@ export default { }, /* 小程序分享 */ + // #ifdef MP-WEIXIN onShareAppMessage(res) { this.share.path = this.getCurrentRouteYm(); // console.log(this.share.path, "this.share.path", res); @@ -164,5 +165,7 @@ export default { }) } } - } + }, + // #endif + } diff --git a/pages/welcome/welcome.vue b/pages/welcome/welcome.vue index 947c2f7..d255150 100644 --- a/pages/welcome/welcome.vue +++ b/pages/welcome/welcome.vue @@ -107,18 +107,16 @@ value = value.slice(0,value.lastIndexOf("#")); if(value == "/pages/tabBar/home/home" || value == "/pages/tabBar/category/category" || value == "/pages/tabBar/user/user"){ - uni.switchTab({ + uni.reLaunch({ url: value }) return } - if(value != "/"){ - uni.navigateTo({ + uni.reLaunch({ url: value }) return; - } }