liuxiaolong
2019-07-04 d21de749cc7028a802ec413f47e866b1e13f033e
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,"用户名或密码错误")
   }
}