🐞 fix: 修复token存储先后顺序
This commit is contained in:
parent
e0ba6a5850
commit
a9d8305424
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue