You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
640 B

package user
import (
"github.com/gin-gonic/gin"
"live/app/lib/back"
"live/app/lib/tools"
"live/app/logic/user"
)
type User struct {
}
type argsUserinfo struct {
FindUserId uint `json:"findUserId" form:"findUserId"`
}
// @Title 获取会员基础信息
func (u *User) BaseInfo(c *gin.Context) {
args := argsUserinfo{}
if err := tools.ParseParams(&args, c); err != nil {
back.Fail(c, err.Error())
return
}
if args.FindUserId <= 0 {
back.Fail(c, "参数错误")
return
}
info, err := (&user.User{}).BaseInfo(args.FindUserId)
if err != nil {
back.Fail(c, err.Error())
return
}
back.Suc(c, "操作成功", info)
}