Commit 27484d0a authored by baixian's avatar baixian

优化

parents 75492193 ab321e6b
......@@ -58,6 +58,36 @@ export default {
return history.listen(({
pathname, search, query,
}) => {
if (queryString.parse(search).adminrootMap) {
LocalStorage.setItem('rootMap', JSON.parse(queryString.parse(search).adminrootMap));
}
if (queryString.parse(search).adminsid) {
LocalStorage.setItem('sid', JSON.parse(queryString.parse(search).adminsid));
dispatch({
type: 'updateState',
payload: {
sid: JSON.parse(queryString.parse(search).adminsid),
},
});
}
if (queryString.parse(search).adminuser) {
LocalStorage.setItem('user', JSON.parse(queryString.parse(search).adminuser));
dispatch({
type: 'updateState',
payload: {
userInfo: JSON.parse(queryString.parse(search).adminuser),
},
});
}
if (queryString.parse(search).admminrole) {
LocalStorage.setItem('role', JSON.parse(queryString.parse(search).admminrole));
dispatch({
type: 'updateState',
payload: {
userInfo: JSON.parse(queryString.parse(search).admminrole),
},
});
}
dispatch({
type: 'updateState',
payload: {
......
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