修复验证码cookie

pull/79/head
zhangchenhao 2025-05-15 15:01:19 +08:00
parent 1b8994a63c
commit 8573cd2dbf
1 changed files with 11 additions and 11 deletions

View File

@ -99,7 +99,7 @@ func Sign(c *gin.Context) {
_ = session.Save()
// c.JSON(http.StatusBadRequest, public.ResERR("用户不存在"))
// 设置cookie
c.SetCookie("must_code", "1", 0, "/", "", false, true)
c.SetCookie("must_code", "1", 0, "/", "", false, false)
public.FailMsg(c, "用户不存在")
return
}
@ -137,7 +137,7 @@ func Sign(c *gin.Context) {
_ = session.Save()
// c.JSON(http.StatusOK, public.ResOK(0, nil, "登录成功"))
// 设置cookie
c.SetCookie("must_code", "1", -1, "/", "", false, true)
c.SetCookie("must_code", "1", 0, "/", "", false, false)
public.SuccessMsg(c, "登录成功")
return
}