first commit

This commit is contained in:
sprov
2021-05-18 12:59:22 +08:00
parent bc6a518c9a
commit 56ed8f355c
62 changed files with 63166 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package controller
import (
"github.com/gin-gonic/gin"
"x-ui/web/session"
)
type BaseController struct {
}
func NewBaseController(g *gin.RouterGroup) *BaseController {
return &BaseController{}
}
func (a *BaseController) before(c *gin.Context) {
if !session.IsLogin(c) {
pureJsonMsg(c, false, "登录时效已过,请重新登录")
c.Abort()
} else {
c.Next()
}
}