| 123456789101112131415161718192021222324252627282930313233 |
- package controller
- import (
- "github.com/sirupsen/logrus"
- "net/http"
- )
- type Auth struct {
- BaseController
- }
- // SignUp godoc
- // @Summary 用户添加
- // @tags Auth
- // @Description 用户添加
- // @Accept x-www-form-urlencoded
- // @Produce json
- // @Param userCode formData string true "用户名"
- // @Param password formData string true "密码"
- // @Param email formData string false "邮箱"
- // @Param phone formData string false "手机号"
- // @Param name formData string false "姓名"
- // @Success 200 {object} controller.ResponseBase
- // @Router /Auth/SignUp [post]
- func (a *Auth) HttpPostSignUp() (err error) {
- userCode := a.Ctx().PostForm("userCode")
- test := a.PostFromInt("test")
- test2 := a.PostFromIntPtr("test2")
- logrus.Info(userCode, test, test2)
- a.Ctx().JSON(http.StatusOK, newResponseBase())
- return
- }
|