diff --git a/src/pages/login/login.js b/src/pages/login/login.js index bc1a2703..11a25064 100644 --- a/src/pages/login/login.js +++ b/src/pages/login/login.js @@ -26,6 +26,7 @@ export default class App extends Component { const head = tokenString.substring(tokenString.indexOf('&') + 6); /* 判断是否有token */ if (tokenString && tokenString.indexOf('=') > -1) { + sessionStorage.setItem('authorization', token); this.onSubmit(token, head); return; } @@ -59,7 +60,6 @@ export default class App extends Component { handelResponse( res, (response, msg) => { - sessionStorage.setItem('authorization', authorization); getAllEnum().then((res) => { handelResponse(res, (response, msg) => { sessionStorage.setItem('enmu', JSON.stringify(response));