🐞 fix: 修复token存储先后顺序

This commit is contained in:
wangsongsole 2023-04-21 11:08:59 +08:00
parent e0ba6a5850
commit a9d8305424
1 changed files with 1 additions and 1 deletions

View File

@ -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));