Merge branch 'feat-hjj-QuestionnaireSurvey' into dev

This commit is contained in:
jiaji.H 2026-03-11 20:19:58 +08:00
commit 443bb161fc
2 changed files with 57 additions and 8 deletions

View File

@ -68,14 +68,15 @@ func NewRouter() *gin.Engine {
}
//账号模块
{
privateGroup.POST("user/register", account.UserRegister) //h5注册登录
privateGroup.POST("user/login", account.UserLogin) //后台登录
privateGroup.POST("user/send", account.SendMsg) //发送验证码
privateGroup.POST("user/logout", account.UserLogout) //登出
privateGroup.POST("user/check/msg", account.CheckMsg) //校验验证码
privateGroup.POST("generate/captcha", account.GenerateCaptcha) //生成滑块验证码
privateGroup.POST("validate/captcha", account.ValidateCaptcha) //验证滑块验证码
privateGroup.POST("check/register", account.CheckRegister) //校验是否注册
privateGroup.POST("user/register", account.UserRegister) //h5注册登录
privateGroup.POST("user/login", account.UserLogin) //后台登录
privateGroup.POST("user/send", account.SendMsg) //发送验证码
privateGroup.POST("user/send/no-slider", account.SendMsgNoSlider) //发送验证码(不验证滑块)
privateGroup.POST("user/logout", account.UserLogout) //登出
privateGroup.POST("user/check/msg", account.CheckMsg) //校验验证码
privateGroup.POST("generate/captcha", account.GenerateCaptcha) //生成滑块验证码
privateGroup.POST("validate/captcha", account.ValidateCaptcha) //验证滑块验证码
privateGroup.POST("check/register", account.CheckRegister) //校验是否注册
acRoute := privateGroup.Group("/user")
acRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
{

View File

@ -413,6 +413,54 @@ func SendMsg(c *gin.Context) {
//}
}
// 用户发送验证码(不验证滑块)
func SendMsgNoSlider(c *gin.Context) {
var req account.SendMsgRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
req.Project = "fiee"
req.TelNum = req.Zone + req.TelNum
//todo 审核使用账号
if req.TelNum == "8618888888888" {
service.Success1(c, "发送成功", &account.SendMsgStatusResponse{})
return
}
if req.Zone != e.ZoneCn && req.Zone != "" {
// ============================== redis检查ip开始
ip := c.ClientIP()
fmt.Println("当前ip", ip, ";手机号:", req.TelNum, ";domain", req.Domain)
tempReq := &account.SendNationMsgRequest{
Domain: req.Domain,
TelNum: req.TelNum,
Project: req.Project,
SignNo: req.SignNo,
MId: req.MId,
Scope: req.Scope,
}
res, err := service.AccountFieeProvider.SendNationMsg(context.Background(), tempReq)
if err != nil {
service.Error(c, err)
return
}
service.Success1(c, "发送成功", res)
return
} else {
res, err := service.AccountFieeProvider.SendMsg(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success1(c, "发送成功", res)
return
}
}
func RealName(c *gin.Context) {
var req account.RealNameRequest