|
|
|
|
|
|
|
|
this.$message({type: 'success', message: '登录成功'}); |
|
|
this.$message({type: 'success', message: '登录成功'}); |
|
|
this.$store.dispatch('user/setToken', res.data.data.access_token).then(() => { |
|
|
this.$store.dispatch('user/setToken', res.data.data.access_token).then(() => { |
|
|
this.$router.push(this.$route.query.from || '/').catch(() => { |
|
|
this.$router.push(this.$route.query.from || '/').catch(() => { |
|
|
}); |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
}); |
|
|
|
|
|
window.location.reload(); |
|
|
} else { |
|
|
} else { |
|
|
this.$message.error(res.data.msg); |
|
|
this.$message.error(res.data.msg); |
|
|
} |
|
|
} |