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, }) } }