From 0e967084d7262ff0ce08c915b22e6ff6609c6548 Mon Sep 17 00:00:00 2001 From: linju Date: Fri, 20 Dec 2024 16:13:08 +0800 Subject: [PATCH] Update index.vue --- pages/index/index.vue | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index ba9d2ff..dd9d182 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -240,8 +240,7 @@ }) // #ifdef H5 // 去掉链接后面的参数且不刷新 - // console.log('去掉参数之前的href', window.location.href) - history.replaceState(null, '', '/#/') + history.replaceState(null, '', window.location.href.split('?')[0]) // #endif }, onShow(){ @@ -498,10 +497,6 @@ * 比如:http://localhost:8082/#/uni_modules/uni-im/pages/index/index?joinGroup=xxx */ if(joinGroup){ - // #ifdef H5 - //删除URL后面的参数(主要是删除joinGroup=xxx),且不刷新页面 - history.replaceState(null, '', '/#/') - // #endif this.joinGroup(joinGroup) }; }, -- GitLab