Browse Source

#1494

update redirect
tags/v1.22.2.2^2
chenyifan01 3 years ago
parent
commit
6fd60ac8a3
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      routers/authentication/wechat.go

+ 5
- 5
routers/authentication/wechat.go View File

@@ -35,10 +35,7 @@ func GetQRCode4Bind(ctx *context.Context) {
})
return
}
redirectUrl := ctx.Query("redirect_to")
if redirectUrl != "" {
ctx.SetCookie("redirect_to", setting.AppSubURL+redirectUrl, 0, setting.AppSubURL)
}

ctx.JSON(200, map[string]interface{}{
"code": "00",
"msg": "success",
@@ -90,7 +87,10 @@ func GetBindPage(ctx *context.Context) {
if r != nil {
ctx.Data["qrcode"] = r
}

redirectUrl := ctx.Query("redirect_to")
if redirectUrl != "" {
ctx.SetCookie("redirect_to", setting.AppSubURL+redirectUrl, 0, setting.AppSubURL)
}
ctx.HTML(200, tplBindPage)
}



Loading…
Cancel
Save