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

登录提示问题

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