修改tpl的参数传入问题
This commit is contained in:
@@ -25,6 +25,8 @@ type UserGoogleLoginLogic struct {
|
||||
logx.Logger
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
|
||||
redirectUrl string
|
||||
}
|
||||
|
||||
func NewUserGoogleLoginLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserGoogleLoginLogic {
|
||||
@@ -39,8 +41,10 @@ func (l *UserGoogleLoginLogic) BeforeLogic(w http.ResponseWriter, r *http.Reques
|
||||
log.Println(r, w)
|
||||
}
|
||||
|
||||
func (l *UserGoogleLoginLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) {
|
||||
http.Redirect(w, r, "http://localhost:9900/redirect?uri=%s", http.StatusFound)
|
||||
func (l *UserGoogleLoginLogic) AfterLogic(w http.ResponseWriter, r *http.Request) {
|
||||
if l.redirectUrl != "" {
|
||||
http.Redirect(w, r, "http://localhost:9900/assistant/redirect?url="+url.QueryEscape(l.redirectUrl), http.StatusFound)
|
||||
}
|
||||
}
|
||||
|
||||
func (l *UserGoogleLoginLogic) UserGoogleLogin(req *types.RequestGoogleLogin, userinfo *auth.UserInfo) (resp *basic.Response) {
|
||||
|
||||
Reference in New Issue
Block a user