DefaultCtrl.go 458 B

1234567891011121314151617181920212223242526272829
  1. package Controllers
  2. import (
  3. "forward-core/Models"
  4. "forward-server/Controllers/BaseCtrl"
  5. )
  6. type DefaultCtrl struct {
  7. BaseCtrl.WebCtrl
  8. }
  9. // @router / [get]
  10. func (c *DefaultCtrl) Default() {
  11. c.Ctx.Redirect(302, "/login")
  12. //c.Data["currentTime"] = time.Now()
  13. //c.TplName = "index.html"
  14. }
  15. // @router /apiAuthFail [get]
  16. func (c *DefaultCtrl) ApiAuthFail() {
  17. c.Data["json"] = Models.FuncResult{Code: 1, Msg: "ApiAuth鉴权失败"}
  18. c.ServeJSON()
  19. }
粤ICP备19079148号