This commit is contained in:
eson 2023-09-05 17:40:34 +08:00
parent 1d9b70aa18
commit e0f561c8b8
2 changed files with 3 additions and 0 deletions

View File

@ -144,6 +144,7 @@ function resetPassword() {
.then(data => {
if (data.code == 200 ) {
alert(data.msg);
window.location.href = {{.HomePage}};
} else {
alert(data.msg);
}

View File

@ -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 {