Merge branch 'dev'
This commit is contained in:
commit
66121e060f
@ -245,7 +245,7 @@ func (b *Public) LoginProgram(c *gin.Context) {
|
|||||||
req := publicRequest.LoginProgram
|
req := publicRequest.LoginProgram
|
||||||
if err := c.ShouldBind(&req); err != nil {
|
if err := c.ShouldBind(&req); err != nil {
|
||||||
c.JSON(http.StatusOK, gin.H{
|
c.JSON(http.StatusOK, gin.H{
|
||||||
"message": "登录失败1",
|
"message": "登录失败",
|
||||||
"code": -2,
|
"code": -2,
|
||||||
"data": gin.H{
|
"data": gin.H{
|
||||||
"source": 2,
|
"source": 2,
|
||||||
@ -258,7 +258,7 @@ func (b *Public) LoginProgram(c *gin.Context) {
|
|||||||
// 参数验证
|
// 参数验证
|
||||||
if err := global.Validate.Struct(req); err != nil {
|
if err := global.Validate.Struct(req); err != nil {
|
||||||
c.JSON(http.StatusOK, gin.H{
|
c.JSON(http.StatusOK, gin.H{
|
||||||
"message": "登录失败2",
|
"message": "登录失败",
|
||||||
"code": -2,
|
"code": -2,
|
||||||
"data": gin.H{
|
"data": gin.H{
|
||||||
"source": 2,
|
"source": 2,
|
||||||
@ -272,7 +272,7 @@ func (b *Public) LoginProgram(c *gin.Context) {
|
|||||||
t, err := utils.ParseJwt(req.Token)
|
t, err := utils.ParseJwt(req.Token)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.JSON(http.StatusOK, gin.H{
|
c.JSON(http.StatusOK, gin.H{
|
||||||
"message": "登录失败3",
|
"message": "登录失败",
|
||||||
"code": -2,
|
"code": -2,
|
||||||
"data": gin.H{
|
"data": gin.H{
|
||||||
"source": 2,
|
"source": 2,
|
||||||
@ -342,7 +342,7 @@ func (b *Public) LoginProgram(c *gin.Context) {
|
|||||||
jwt, err := token.NewJWT()
|
jwt, err := token.NewJWT()
|
||||||
if err != nil || jwt == "" {
|
if err != nil || jwt == "" {
|
||||||
c.JSON(http.StatusOK, gin.H{
|
c.JSON(http.StatusOK, gin.H{
|
||||||
"message": "登陆失败6",
|
"message": "登陆失败",
|
||||||
"code": -1,
|
"code": -1,
|
||||||
"data": gin.H{
|
"data": gin.H{
|
||||||
"source": 2,
|
"source": 2,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user