@@ -274,8 +274,9 @@ export default {
} else {
console.log('登录成功')
}
- await this.$nextTick()
- this.$router.replace({ path: '/' })
+ await this.$nextTick()
+ const redirectRole = role === 'teacher' ? '/teacher-dashboard' : '/'
+ this.$router.replace({ path: redirectRole })
} catch (e) {
const msg = e && e.message ? e.message : '登录失败,请检查账号密码'
if (this.$message) {