新增登陆接口
This commit is contained in:
parent
32489130d7
commit
b9b5d726e7
@ -6,7 +6,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Response struct {
|
type res struct {
|
||||||
Code int `json:"code"`
|
Code int `json:"code"`
|
||||||
Data interface{} `json:"data"`
|
Data interface{} `json:"data"`
|
||||||
Message string `json:"message"`
|
Message string `json:"message"`
|
||||||
@ -16,7 +16,7 @@ func Result(code int, data interface{}, msg string, c *gin.Context) {
|
|||||||
if data == nil {
|
if data == nil {
|
||||||
data = gin.H{}
|
data = gin.H{}
|
||||||
}
|
}
|
||||||
c.JSON(http.StatusOK, Response{
|
c.JSON(http.StatusOK, res{
|
||||||
code,
|
code,
|
||||||
data,
|
data,
|
||||||
msg,
|
msg,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user