mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2026-04-25 10:16:56 +08:00
完善生成模版,调整目录
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package commonController
|
||||
|
||||
import (
|
||||
"x_admin/core/response"
|
||||
"x_admin/middleware"
|
||||
"x_admin/service/commonService"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func IndexRoute(rg *gin.RouterGroup) {
|
||||
handle := indexHandler{}
|
||||
|
||||
rg = rg.Group("/common", middleware.TokenAuth())
|
||||
rg.GET("/index/console", handle.console)
|
||||
rg.GET("/index/config", handle.config)
|
||||
|
||||
}
|
||||
|
||||
type indexHandler struct{}
|
||||
|
||||
// console 控制台
|
||||
func (ih indexHandler) console(c *gin.Context) {
|
||||
res, err := commonService.IndexService.Console()
|
||||
response.CheckAndRespWithData(c, res, err)
|
||||
}
|
||||
|
||||
// config 公共配置
|
||||
func (ih indexHandler) config(c *gin.Context) {
|
||||
res, err := commonService.IndexService.Config()
|
||||
response.CheckAndRespWithData(c, res, err)
|
||||
}
|
||||
Reference in New Issue
Block a user