This commit is contained in:
suyl
2021-07-15 17:43:18 +08:00
parent 9a5e3d19ae
commit 046dd17de4

View File

@@ -62,9 +62,10 @@ func Login(c *gin.Context) {
err error err error
user = &UserParam{} user = &UserParam{}
) )
//data, _ := ioutil.ReadAll(c.Request.Body) err = c.Bind(&user)
globals.SugarLogger.Debugf("Begin API :%s params: %v ip: %s", c.Request.URL, c.Request.PostForm, c.ClientIP()) data, _ := ioutil.ReadAll(c.Request.Body)
if err = c.Bind(&user); err != nil { globals.SugarLogger.Debugf("Begin API :%s params: %v ip: %s", c.Request.URL, string(data), c.ClientIP())
if err != nil {
c.JSON(http.StatusOK, &CallBack{ c.JSON(http.StatusOK, &CallBack{
Code: model.ErrCodeNormal, Code: model.ErrCodeNormal,
Desc: err.Error(), Desc: err.Error(),