提交 8801300d authored 作者: lihuihui's avatar lihuihui

登录提示问题

上级 38c82bdc
...@@ -10,8 +10,9 @@ export default class Before { ...@@ -10,8 +10,9 @@ 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' && to.name) { // 所有登录页 不进行登录校验 } else if (to.name !== 'login-normal' && to.name !== 'login-code' && to.name !== 'login-forget') { // 所有登录页 不进行登录校验
const isLogin = await this.isLogin() let isLogin
to.redirectedFrom ? next({ path: '/login/index?rd=' + encodeURIComponent(to.fullPath) }) : isLogin = await this.isLogin()
if (isLogin) { if (isLogin) {
next() next()
} else { } else {
...@@ -25,7 +26,6 @@ export default class Before { ...@@ -25,7 +26,6 @@ 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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论