This commit is contained in:
eson 2023-08-29 16:24:20 +08:00
parent ff7bbe66a7
commit 631a87abf1

View File

@ -6,6 +6,7 @@ import (
"fusenapi/utils/auth"
"fusenapi/utils/basic"
"fusenapi/utils/wevent"
"net/http"
"time"
"context"
@ -15,6 +16,7 @@ import (
"github.com/474420502/requests"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/rest/httpx"
"gorm.io/gorm"
)
@ -140,6 +142,24 @@ func (l *UserEmailConfirmationLogic) UserEmailConfirmation(req *types.RequestEma
}
// 处理逻辑后 w,r 如:重定向, resp 必须重新处理
// func (l *UserEmailConfirmationLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) {
// // httpx.OkJsonCtx(r.Context(), w, resp)
// }
func (l *UserEmailConfirmationLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) {
successHtml := `<!DOCTYPE html>
<html>
<head>
<title>注册成功</title>
</head>
<body>
<h1>恭喜!您的注册成功</h1>
<p>感谢您在我们网站进行注册您的账号已经激活</p>
<p>您现在可以使用您的邮箱地址和密码登录我们的网站,享受完整的服务和功能</p>
<p>再次感谢您的信任和支持如果您有任何问题,请随时联系我们</p>
<p>祝您使用愉快!</p>
</body>
</html>`
w.Write([]byte(successHtml))
httpx.OkJsonCtx(r.Context(), w, nil)
}