xui_controller.go 529 B

12345678910111213141516171819202122232425262728293031
  1. package controller
  2. import (
  3. "github.com/gin-gonic/gin"
  4. )
  5. type XUIController struct {
  6. BaseController
  7. }
  8. func NewXUIController(g *gin.RouterGroup) *XUIController {
  9. a := &XUIController{}
  10. a.initRouter(g)
  11. return a
  12. }
  13. func (a *XUIController) initRouter(g *gin.RouterGroup) {
  14. g = g.Group("/xui")
  15. g.GET("/", a.index)
  16. g.GET("/accounts", a.index)
  17. g.GET("/setting", a.setting)
  18. }
  19. func (a *XUIController) index(c *gin.Context) {
  20. html(c, "index.html", "系统状态", nil)
  21. }
  22. func (a *XUIController) setting(c *gin.Context) {
  23. }