提交 38c82bdc authored 作者: lihuihui's avatar lihuihui

修改登录页面报错

上级 a3a562ab
...@@ -10,7 +10,7 @@ export default class Before { ...@@ -10,7 +10,7 @@ export default class Before {
async update (to, from, next) { async update (to, from, next) {
if (to.name === 'studentHelp' || to.name === 'teacherHelp') { if (to.name === 'studentHelp' || to.name === 'teacherHelp') {
next() next()
} else if (to.name !== 'login-normal' && to.name !== 'login-code' && to.name !== 'login-forget') { // 所有登录页 不进行登录校验 } else if (to.name !== 'login-normal' && to.name !== 'login-code' && to.name !== 'login-forget' && to.name) { // 所有登录页 不进行登录校验
const isLogin = await this.isLogin() const isLogin = await this.isLogin()
if (isLogin) { if (isLogin) {
next() next()
...@@ -25,6 +25,7 @@ export default class Before { ...@@ -25,6 +25,7 @@ export default class Before {
/* 获取用户信息 */ /* 获取用户信息 */
isLogin () { isLogin () {
if (window.G.UserInfo) return true if (window.G.UserInfo) return true
debugger
return cAction.Other.getInfo().then(res => { return cAction.Other.getInfo().then(res => {
window.G.UserInfo = res window.G.UserInfo = res
return true return true
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论