更新大量功能

This commit is contained in:
sprov
2021-05-28 17:32:51 +08:00
parent 3cd25ce5ea
commit a66dff6959
41 changed files with 1231 additions and 1009 deletions

View File

@@ -32,6 +32,10 @@ func (a *IndexController) initRouter(g *gin.RouterGroup) {
}
func (a *IndexController) index(c *gin.Context) {
if session.IsLogin(c) {
c.Redirect(http.StatusTemporaryRedirect, "xui/")
return
}
html(c, "login.html", "登录", nil)
}
@@ -68,5 +72,5 @@ func (a *IndexController) logout(c *gin.Context) {
logger.Info("user", user.Id, "logout")
}
session.ClearSession(c)
c.Redirect(http.StatusTemporaryRedirect, "")
c.Redirect(http.StatusTemporaryRedirect, c.GetString("base_path"))
}