feat:完善项目
This commit is contained in:
@ -13,12 +13,12 @@ type Account struct{}
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @api {post} /api/account/login 账号登录
|
* @api {post} /api/v1/account/login 账号登录
|
||||||
* @apiVersion 1.0.0
|
* @apiVersion 1.0.0
|
||||||
* @apiName AccountLogin
|
* @apiName AccountLogin
|
||||||
* @apiGroup Account
|
* @apiGroup Account
|
||||||
*
|
*
|
||||||
* @apiHeader {string} x-equipment 设备平台(Web,H5,App)
|
* @apiHeader {string} Content-Type=application/json 传输方式
|
||||||
*
|
*
|
||||||
* @apiParam {String} account 登录账号
|
* @apiParam {String} account 登录账号
|
||||||
* @apiParam {String} password 登录密码
|
* @apiParam {String} password 登录密码
|
||||||
|
@ -5,7 +5,6 @@ import (
|
|||||||
"ArmedPolice/serve/logger"
|
"ArmedPolice/serve/logger"
|
||||||
"ArmedPolice/utils"
|
"ArmedPolice/utils"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin/binding"
|
"github.com/gin-gonic/gin/binding"
|
||||||
@ -26,12 +25,6 @@ type response struct {
|
|||||||
|
|
||||||
type ApiHandle func(c *gin.Context, syslog ...bool) interface{}
|
type ApiHandle func(c *gin.Context, syslog ...bool) interface{}
|
||||||
|
|
||||||
func (c ApiHandle) SysLog() {
|
|
||||||
fmt.Println(123)
|
|
||||||
//service.Publish(config.EventForSysLogProduce, _session.Community, _session.UID, _session.Name, mode, event, content,
|
|
||||||
// c.Get("params"), c.ClientIP())
|
|
||||||
}
|
|
||||||
|
|
||||||
func getSession() ApiHandle {
|
func getSession() ApiHandle {
|
||||||
return func(c *gin.Context, log ...bool) interface{} {
|
return func(c *gin.Context, log ...bool) interface{} {
|
||||||
value, _ := c.Get(config.TokenForSession)
|
value, _ := c.Get(config.TokenForSession)
|
||||||
|
@ -8,6 +8,10 @@ import (
|
|||||||
|
|
||||||
type Config struct{}
|
type Config struct{}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @apiDefine Config 配置管理
|
||||||
|
*/
|
||||||
|
|
||||||
func (*Config) Area(c *gin.Context) {
|
func (*Config) Area(c *gin.Context) {
|
||||||
form := &struct {
|
form := &struct {
|
||||||
Key string `json:"key" form:"key"`
|
Key string `json:"key" form:"key"`
|
||||||
|
@ -16,7 +16,7 @@ type roleForm struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @apiDefine Role 菜单管理
|
* @apiDefine Role 角色管理
|
||||||
*/
|
*/
|
||||||
|
|
||||||
func (*Role) List(c *gin.Context) {
|
func (*Role) List(c *gin.Context) {
|
||||||
@ -64,7 +64,7 @@ func (a *Role) Delete(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @api {post} /api/v1/role/menus 菜单信息
|
* @api {post} /api/v1/role/menus 角色菜单
|
||||||
* @apiVersion 1.0.0
|
* @apiVersion 1.0.0
|
||||||
* @apiName RoleMenu
|
* @apiName RoleMenu
|
||||||
* @apiGroup Role
|
* @apiGroup Role
|
||||||
@ -121,7 +121,7 @@ func (a *Role) Menu(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @api {post} /api/v1/role/menu/bind 菜单绑定
|
* @api {post} /api/v1/role/menu/bind 角色菜单绑定
|
||||||
* @apiVersion 1.0.0
|
* @apiVersion 1.0.0
|
||||||
* @apiName RoleMenuBind
|
* @apiName RoleMenuBind
|
||||||
* @apiGroup Role
|
* @apiGroup Role
|
||||||
|
Reference in New Issue
Block a user