Browse Source

登录跳转问题

Signed-off-by: zouap <zouap@pcl.ac.cn>
pull/3499/head
zouap 2 years ago
parent
commit
74b81213eb
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      routers/user/auth.go

+ 3
- 3
routers/user/auth.go View File

@@ -121,7 +121,7 @@ func checkAutoLogin(ctx *context.Context) bool {
ctx.ServerError("AutoSignIn", err)
return true
}
log.Info("here1...")
redirectTo := ctx.Query("redirect_to")
if len(redirectTo) > 0 {
ctx.SetCookie("redirect_to", redirectTo, 0, setting.AppSubURL, "", setting.SessionConfig.Secure, true)
@@ -130,7 +130,7 @@ func checkAutoLogin(ctx *context.Context) bool {
}

if isSucceed {
log.Info("here2...")
isCourse := ctx.QueryBool("course")

if redirectTo == "" && isCourse {
@@ -138,8 +138,8 @@ func checkAutoLogin(ctx *context.Context) bool {
redirectToCourse := setting.AppSubURL + "/" + setting.Course.OrgName
ctx.RedirectToFirst(redirectToCourse)
} else {
log.Info("here3...")
ctx.RedirectToFirst(redirectTo, setting.AppSubURL+string(setting.LandingPageURL))

}
return true
}


Loading…
Cancel
Save