user.go
787 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package v1
import (
"gitlab.fjmaimaimai.com/mmm-go/gocomm/pkg/mybeego"
)
type UserController struct {
mybeego.BaseController
}
//匹配的是路由
// 127.0.0.1:8080/user/login/*
//127.0.0.1:8080/user/logout/*
func (this *UserController) URLMapping() {
//this.Mapping("/v1/user/login",this.Login)
//this.Mapping("/v1/user/select",this.SelectUser)
}
// Login
// @Title Login
// @Description 登录
// @Param body body string true "body"
// @router /v1/user/login [post]
func (this *UserController) Login() {
var msg *mybeego.Message
defer func() {
this.Resp(msg)
}()
msg = mybeego.NewErrMessage(0, "login success")
}
func (this *UserController) Logout() {
var msg *mybeego.Message
defer func() {
this.Resp(msg)
}()
msg = mybeego.NewErrMessage(0, "logout success")
}