From 87459fa2170995066beb6ddc29846c2c831333af Mon Sep 17 00:00:00 2001 From: dengbiao Date: Thu, 17 Oct 2024 14:25:40 +0800 Subject: [PATCH] update --- app/customer/hdl/hdl_login.go | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/app/customer/hdl/hdl_login.go b/app/customer/hdl/hdl_login.go index b4043bf..f6dae98 100644 --- a/app/customer/hdl/hdl_login.go +++ b/app/customer/hdl/hdl_login.go @@ -47,11 +47,11 @@ func WxAppletLogin(c *gin.Context) { return } if !cacheKeyExist { // 如果是首次设置 设置过期时间 - //_, err := cache.Expire(cacheKey, md.CfgCacheTime) - //if err != nil { + // _, err := cache.Expire(cacheKey, md.CfgCacheTime) + // if err != nil { // _ = logx.Error(err) // return "" - //} + // } } e.OutSuc(c, md.WxAppletLoginResponse{ @@ -82,7 +82,7 @@ func WxDecryptUserInfo(c *gin.Context) { return } - //获取sessionKey + // 获取sessionKey get, err := cache.HGetString(md.WxSessionCacheKey, req.OpenId) if err != nil { e.OutErr(c, e.ERR, err.Error()) @@ -113,7 +113,7 @@ func WxDecryptMobile(c *gin.Context) { return } - //获取sessionKey + // 获取sessionKey get, err := cache.HGetString(md.WxSessionCacheKey, req.OpenId) if err != nil { e.OutErr(c, e.ERR, err.Error()) @@ -172,13 +172,14 @@ func Register(c *gin.Context) { var req md.RegisterReq err := c.ShouldBindJSON(&req) if err != nil { + utils.FilePutContents("Register_ERR", utils.SerializeStr(req)) err = svc2.HandleValidateErr(err) err1 := err.(e.E) e.OutErr(c, err1.Code, err1.Error()) return } - //TODO::解密 + // TODO::解密 phone := utils.Base64StdDecode(req.Phone) if phone == "" { e.OutErr(c, e.ERR, "非法/恶意 参数!!!") @@ -234,10 +235,10 @@ func Register(c *gin.Context) { } if req.UserId != "" { - //支付宝 + // 支付宝 user.UserId = req.UserId } else { - //微信 + // 微信 user.OpenId = req.OpenId user.UnionId = req.UnionId } @@ -307,10 +308,10 @@ func UpdateUser(c *gin.Context) { } if req.UserId != "" { - //支付宝 + // 支付宝 user.UserId = req.UserId } else { - //微信 + // 微信 user.OpenId = req.OpenId user.UnionId = req.UnionId }