From 0949a298c99d787e6369cac348cb5fcc29ad044e Mon Sep 17 00:00:00 2001 From: Baorong Li Date: Wed, 12 Dec 2018 06:53:26 +0800 Subject: [PATCH] fix #924 404 Not Found after router change --- src/utils/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils/index.js b/src/utils/index.js index 097502a..33bd195 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -246,9 +246,8 @@ export function getLocale() { export function setLocale(language) { if (getLocale() !== language) { umiRouter.push({ - pathname: `/${language}${deLangPrefix(window.location.pathname)}${ - window.location.search - }`, + pathname: `/${language}${deLangPrefix(window.location.pathname)}`, + search: window.location.search, }) } }