DengBiao преди 1 година
родител
ревизия
458cbbd530
променени са 2 файла, в които са добавени 4 реда и са изтрити 6 реда
  1. +1
    -3
      app/customer/hdl/hdl_login.go
  2. +3
    -3
      go.mod

+ 1
- 3
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())


+ 3
- 3
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


Зареждане…
Отказ
Запис