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