diff --git a/fs_template/reset_confirm.tpl b/fs_template/reset_confirm.tpl index 3af017d2..f07376de 100644 --- a/fs_template/reset_confirm.tpl +++ b/fs_template/reset_confirm.tpl @@ -144,6 +144,7 @@ function resetPassword() { .then(data => { if (data.code == 200 ) { alert(data.msg); + window.location.href = {{.HomePage}}; } else { alert(data.msg); } diff --git a/server/auth/internal/logic/userresetpasswordhtmllogic.go b/server/auth/internal/logic/userresetpasswordhtmllogic.go index af83f80f..50496ebe 100644 --- a/server/auth/internal/logic/userresetpasswordhtmllogic.go +++ b/server/auth/internal/logic/userresetpasswordhtmllogic.go @@ -50,9 +50,11 @@ func (l *UserResetPasswordHtmlLogic) UserResetPasswordHtml(req *types.RequestUse func (l *UserResetPasswordHtmlLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) { err := tpls.ExecuteTemplate(w, "reset_confirm.tpl", map[string]string{ + "HomePage": "http://www.fusen.3718.cn", "ResetToken": l.ResetToken, "ResetPasswordLink": l.svcCtx.Config.MainAddress + "/api/auth/reset/password", }) + if err != nil { httpx.OkJsonCtx(l.ctx, w, resp.SetStatusWithMessage(basic.CodeTemplateErr, err.Error())) } else {