🐞 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);
|
const head = tokenString.substring(tokenString.indexOf('&') + 6);
|
||||||
/* 判断是否有token */
|
/* 判断是否有token */
|
||||||
if (tokenString && tokenString.indexOf('=') > -1) {
|
if (tokenString && tokenString.indexOf('=') > -1) {
|
||||||
|
sessionStorage.setItem('authorization', token);
|
||||||
this.onSubmit(token, head);
|
this.onSubmit(token, head);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -59,7 +60,6 @@ export default class App extends Component {
|
||||||
handelResponse(
|
handelResponse(
|
||||||
res,
|
res,
|
||||||
(response, msg) => {
|
(response, msg) => {
|
||||||
sessionStorage.setItem('authorization', authorization);
|
|
||||||
getAllEnum().then((res) => {
|
getAllEnum().then((res) => {
|
||||||
handelResponse(res, (response, msg) => {
|
handelResponse(res, (response, msg) => {
|
||||||
sessionStorage.setItem('enmu', JSON.stringify(response));
|
sessionStorage.setItem('enmu', JSON.stringify(response));
|
||||||
|
|
Loading…
Reference in New Issue