srv-ijustjump/handler/loop-handler.go

59 lines
1.2 KiB
Go
Raw Normal View History

2021-08-18 01:00:13 +00:00
package handler
2021-08-18 01:34:51 +00:00
import (
"io/ioutil"
"github.com/gin-gonic/gin"
log "github.com/sirupsen/logrus"
)
2021-08-18 01:00:13 +00:00
// LoopVerify 验证服务
func LoopVerify(c *gin.Context) {
2021-08-18 01:34:51 +00:00
bodystring, _ := ioutil.ReadAll(c.Request.Body)
log.WithFields(log.Fields{
"func": "LoopVerify",
}).Infof("%s", string(bodystring))
2021-08-18 01:00:13 +00:00
c.JSON(200, gin.H{
"code": 200,
"msg": "success",
})
}
// LoopLogin 登录服务
func LoopLogin(c *gin.Context) {
2021-08-18 01:34:51 +00:00
bodystring, _ := ioutil.ReadAll(c.Request.Body)
log.WithFields(log.Fields{
"func": "LoopVerify",
}).Infof("%s", string(bodystring))
2021-08-18 01:00:13 +00:00
c.JSON(200, gin.H{
"code": 200,
"msg": "success",
"token": "Bg7HqMnMU7z",
"id": 1,
})
}
// LoopActivity 活动创建
func LoopActivity(c *gin.Context) {
2021-08-18 01:34:51 +00:00
bodystring, _ := ioutil.ReadAll(c.Request.Body)
log.WithFields(log.Fields{
"func": "LoopVerify",
}).Infof("%s", string(bodystring))
2021-08-18 01:00:13 +00:00
c.JSON(200, gin.H{
"code": 200,
"msg": "success",
})
}
// LoopScore 打分
func LoopScore(c *gin.Context) {
2021-08-18 01:34:51 +00:00
bodystring, _ := ioutil.ReadAll(c.Request.Body)
log.WithFields(log.Fields{
"func": "LoopVerify",
}).Infof("%s", string(bodystring))
2021-08-18 01:00:13 +00:00
c.JSON(200, gin.H{
"code": 200,
"msg": "success",
})
}