|
@@ -31,14 +31,28 @@ if (location.search.includes('zlb_token')) {
|
|
|
location.href = './index.html';
|
|
|
}, 500)
|
|
|
} else if(res.code === '501'){
|
|
|
- window.alert(res.msg);
|
|
|
- localStorage.setItem('userInfo', JSON.stringify(res.data));
|
|
|
- setCookie('token', res.data.token, 30, '/');
|
|
|
- setTimeout(() => {
|
|
|
- location.href = './index.html';
|
|
|
- }, 500)
|
|
|
+ this.$message({
|
|
|
+ message:res.msg,
|
|
|
+ type: 'warning',
|
|
|
+ showClose: true,
|
|
|
+ duration: '1500',
|
|
|
+ onClose:()=>{
|
|
|
+ localStorage.setItem('userInfo', JSON.stringify(res.data));
|
|
|
+ setCookie('token', res.data.token, 30, '/');
|
|
|
+ setTimeout(() => {
|
|
|
+ location.href = './index.html';
|
|
|
+ }, 500)
|
|
|
+ },
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
} else {
|
|
|
- window.alert(res.msg);
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error',
|
|
|
+ showClose: true,
|
|
|
+ duration: '1500'
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
});
|