feat:完善项目
This commit is contained in:
@ -8,6 +8,35 @@ import (
|
||||
|
||||
type User struct{}
|
||||
|
||||
/**
|
||||
* @apiDefine User 用户管理
|
||||
*/
|
||||
|
||||
/**
|
||||
* @api {get} /api/v1/user/info 用户信息
|
||||
* @apiVersion 1.0.0
|
||||
* @apiName UserInfo
|
||||
* @apiGroup User
|
||||
*
|
||||
* @apiHeader {string} x-token token
|
||||
*
|
||||
* @apiSuccess (200) {Number} code 成功响应状态码!
|
||||
* @apiSuccess (200) {String} msg 成功提示
|
||||
* @apiSuccess (200) {Json} data 数据信息
|
||||
* @apiSuccess (200) {String} data.name 用户名
|
||||
* @apiSuccess (200) {String} data.avatar 用户头像
|
||||
*
|
||||
* @apiSuccessExample {json} Success response:
|
||||
* HTTPS 200 OK
|
||||
* {
|
||||
* "code": 200
|
||||
* "msg": "ok"
|
||||
* "data": {
|
||||
* "name": "商挈智能",
|
||||
* "avatar": "",
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
func (*User) Info(c *gin.Context) {
|
||||
data := user.NewInstance()(getSession()(c).(*service.Session)).Info()
|
||||
APIResponse(nil, data)(c)
|
||||
|
||||
Reference in New Issue
Block a user