From 458cbbd530da6cf258c47cefbeb80c95f5519b4c Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Tue, 26 Sep 2023 14:44:33 +0800 Subject: [PATCH] update --- app/customer/hdl/hdl_login.go | 4 +--- go.mod | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/customer/hdl/hdl_login.go b/app/customer/hdl/hdl_login.go index 2615efc..3c20ed5 100644 --- a/app/customer/hdl/hdl_login.go +++ b/app/customer/hdl/hdl_login.go @@ -23,7 +23,6 @@ func WxAppletLogin(c *gin.Context) { sysCfgDb := db.SysCfgDb{} sysCfgDb.Set() cfg := sysCfgDb.SysCfgFindWithDb(enum.WxAppletAppId, enum.WxAppletAppSecret) - req, err := weapp.Login(cfg[enum.WxAppletAppId], cfg[enum.WxAppletAppSecret], code) if err != nil { err = validate.HandleValidateErr(err) @@ -93,7 +92,7 @@ func WxDecryptUserInfo(c *gin.Context) { return } - res, err := weapp.DecryptUserInfo(get, req.RawData, req.EncryptedData, req.Signature, req.Signature) + res, err := weapp.DecryptUserInfo(get, req.RawData, req.EncryptedData, req.Signature, req.IV) if err != nil { e.OutErr(c, e.ERR, err.Error()) return @@ -123,7 +122,6 @@ func WxDecryptMobile(c *gin.Context) { e.OutErr(c, e.ERR_NO_DATA, "请先完成微信登录流程") return } - res, err := weapp.DecryptMobile(get, req.EncryptedData, req.IV) if err != nil { e.OutErr(c, e.ERR, err.Error()) diff --git a/go.mod b/go.mod index b31d556..94aeb9d 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,6 @@ require ( github.com/gomodule/redigo v2.0.0+incompatible github.com/makiuchi-d/gozxing v0.0.0-20210324052758-57132e828831 github.com/mcuadros/go-defaults v1.2.0 - github.com/medivhzhan/weapp/v2 v2.5.0 github.com/qiniu/api.v7/v7 v7.8.2 github.com/robfig/cron/v3 v3.0.1 github.com/sony/sonyflake v1.0.0 @@ -45,7 +44,8 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.2.1 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/mattn/go-isatty v0.0.12 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect + github.com/medivhzhan/weapp/v2 v2.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect @@ -60,7 +60,7 @@ require ( golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect golang.org/x/net v0.7.0 // indirect golang.org/x/sync v0.0.0-20201207232520-09787c993a3a // indirect - golang.org/x/sys v0.6.0 // indirect + golang.org/x/sys v0.12.0 // indirect golang.org/x/text v0.7.0 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/protobuf v1.26.0 // indirect