🎈 perf: 优化代码

This commit is contained in:
wangsongsole 2023-03-17 11:06:27 +08:00
parent 95c671173d
commit 065e302f67
1 changed files with 1 additions and 4 deletions

View File

@ -16,7 +16,6 @@ export default class App extends Component {
}
componentWillMount() {
console.log(this.props.location);
const tokenString = this.props.location.search;
const token = tokenString.substring(tokenString.indexOf('=') + 1);
/* 判断是否有token */
@ -32,7 +31,7 @@ export default class App extends Component {
toUnifiedLogin() {
setTimeout(() => {
window.location.href = `http://test.user.1688sup.com/#/login?url=${encodeURIComponent(
'http://192.168.6.75:8088/#/login'
window.location.href
)}`;
}, 1500);
}
@ -118,10 +117,8 @@ export default class App extends Component {
},
(err) => {
if (res.code == -2) {
this.toUnifiedLogin();
Notify.error(res.message);
} else {
this.toUnifiedLogin();
Notify.clear();
Notify.error(res.message);
}