diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 88532229..309e96e2 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -141,8 +141,15 @@ export default { }) return; } - setToken(res.data); - this.$router.push({ path: '/' }) + Message({ + message: '登录成功', + type: 'success', + duration: 1 * 1000, + onClose: () => { + setToken(res.data); + this.$router.push({ path: '/' }) + } + }) }).catch((err) => { console.log(err); this.loading = false