新增登陆接口

This commit is contained in:
wucongxing 2023-06-08 18:06:00 +08:00
parent 32489130d7
commit b9b5d726e7

View File

@ -6,7 +6,7 @@ import (
"net/http"
)
type Response struct {
type res struct {
Code int `json:"code"`
Data interface{} `json:"data"`
Message string `json:"message"`
@ -16,7 +16,7 @@ func Result(code int, data interface{}, msg string, c *gin.Context) {
if data == nil {
data = gin.H{}
}
c.JSON(http.StatusOK, Response{
c.JSON(http.StatusOK, res{
code,
data,
msg,