diff --git a/packages/taro-router/src/router.ts b/packages/taro-router/src/router.ts index 0927d8ecde37..f43827bcb9f4 100644 --- a/packages/taro-router/src/router.ts +++ b/packages/taro-router/src/router.ts @@ -167,7 +167,7 @@ export function createRouter ( } if (history.location.pathname === '/') { - history.replace(routes[0].path as string) + history.replace(routes[0].path as string + history.location.search) } render(history.location, 'PUSH')