feat:完善项目
This commit is contained in:
@ -53,6 +53,70 @@ func (*User) Info(c *gin.Context) {
|
||||
APIResponse(nil, data)(c)
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} /api/v1/user/select 用户Select信息
|
||||
* @apiVersion 1.0.0
|
||||
* @apiName UserSelect
|
||||
* @apiGroup User
|
||||
*
|
||||
* @apiHeader {string} x-token token
|
||||
*
|
||||
* @apiSuccess (200) {Object} data 数据信息
|
||||
* @apiSuccess (200) {String} data.id ID-即uuid
|
||||
* @apiSuccess (200) {String} data.name 用户名
|
||||
* @apiSuccess (200) {Number} code 成功响应状态码!
|
||||
* @apiSuccess (200) {String} msg 成功提示
|
||||
*
|
||||
* @apiSuccessExample {json} Success response:
|
||||
* HTTPS 200 OK
|
||||
* {
|
||||
* "code": 200
|
||||
* "msg": "ok"
|
||||
* "data": [
|
||||
* {
|
||||
* "id": "2098151543063711744",
|
||||
* "name": "超级管理员",
|
||||
* }
|
||||
* ]
|
||||
* }
|
||||
*/
|
||||
func (*User) Select(c *gin.Context) {
|
||||
data, err := user.NewInstance()(getSession()(c).(*service.Session)).Select()
|
||||
APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} /api/v1/user/menu 用户菜单信息
|
||||
* @apiVersion 1.0.0
|
||||
* @apiName UserMenu
|
||||
* @apiGroup User
|
||||
*
|
||||
* @apiHeader {string} x-token token
|
||||
*
|
||||
* @apiSuccess (200) {Object} data 数据信息-参考菜单信息
|
||||
* @apiSuccess (200) {Number} code 成功响应状态码!
|
||||
* @apiSuccess (200) {String} msg 成功提示
|
||||
*
|
||||
* @apiSuccessExample {json} Success response:
|
||||
* HTTPS 200 OK
|
||||
* {
|
||||
* "code": 200
|
||||
* "msg": "ok"
|
||||
* "data": [
|
||||
* {
|
||||
* "id": "7X2JlBVknr",
|
||||
* "name": "装备维修",
|
||||
* "kind": 1,
|
||||
* "link": "",
|
||||
* "component": "",
|
||||
* "icon": "",
|
||||
* "parent_id": "0",
|
||||
* "checked": true,
|
||||
* "checked": [],
|
||||
* }
|
||||
* ]
|
||||
* }
|
||||
*/
|
||||
func (*User) Menu(c *gin.Context) {
|
||||
data, err := user.NewMenu()(getSession()(c).(*service.Session)).Menu()
|
||||
APIResponse(err, data)(c)
|
||||
|
Reference in New Issue
Block a user