From 9725b146261489cfb3b6e0b4eafc0701a42d7ce9 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Tue, 12 Aug 2025 17:58:08 +0800 Subject: [PATCH] =?UTF-8?q?refactor(router):=20=E7=A7=BB=E9=99=A4H5?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E4=B8=8B=E7=9A=84hashchange=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E7=9B=91=E5=90=AC=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/interceptor.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/router/interceptor.ts b/src/router/interceptor.ts index dc6ca40..14c5535 100644 --- a/src/router/interceptor.ts +++ b/src/router/interceptor.ts @@ -63,15 +63,5 @@ export const routeInterceptor = { uni.addInterceptor('reLaunch', navigateToInterceptor) uni.addInterceptor('redirectTo', navigateToInterceptor) uni.addInterceptor('switchTab', navigateToInterceptor) - - // // #ifdef H5 - // // 一个粗糙的实现方式,不满意可以自行修改:https://github.com/unibest-tech/unibest/issues/192 - // // H5环境路由拦截,监听hashchange事件 - // window.addEventListener('hashchange', () => { - // // 获取当前路径 - // const currentPath = `/${window.location.hash.split('#/')[1]?.split('?')[0]}` - // navigateToInterceptor.invoke({ url: currentPath }) - // }) - // // #endif }, }