Commit 91d643a3 authored by 崔佳豪's avatar 崔佳豪

fix: 退出登录重复触发修改

parent 04d65916
Pipeline #47157 skipped with stages
......@@ -29,12 +29,19 @@ const initLocale = () => {
initGlobalConfig();
initLocale();
const unlisten = history.listen(location => {
if(location.pathname.indexOf('/civbase/user/login') > -1) {
console.log('init config')
initGlobalConfig();
}
});
const unlisten = (function() {
let prePathname = '';
return history.listen(location => {
if (
location.pathname.indexOf('/civbase/user/login') > -1 &&
location.pathname !== prePathname
) {
console.log('init config')
initGlobalConfig();
}
prePathname = location.pathname;
});
})();
event.on('event:logout', () => {
store.dispatch(actionCreators.logout())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment