|
@@ -274,8 +274,9 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
console.log('登录成功')
|
|
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) {
|
|
} catch (e) {
|
|
|
const msg = e && e.message ? e.message : '登录失败,请检查账号密码'
|
|
const msg = e && e.message ? e.message : '登录失败,请检查账号密码'
|
|
|
if (this.$message) {
|
|
if (this.$message) {
|