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