sunty
2019-07-05 84ae2c7481f2c7f3628613f5f3c8d0b60b6bccc0
controllers/user.go
@@ -41,7 +41,7 @@
   if flag {
      authDriver := auth.GenerateAuthDriver()
      tokenStr := (*authDriver).Login(c.Request, c.Writer, util.Struct2Map(userInfo))
      util.ResponseFormat(c,code.LoginSuccess,map[string]interface{}{
      c.JSON(200,map[string]interface{}{
         "userInfo":userInfo,
         "access_token":tokenStr,
         "refresh_token":tokenStr,
@@ -50,7 +50,7 @@
         "expires_in":time.Now().Add(time.Hour * 8).Unix(),
      })
   } else {
      util.ResponseFormat(c,code.SigninInfoError,"用户名或密码错误")
      c.JSON(500,"用户名或密码错误")
   }
}