error.go 355 B

123456789101112131415161718
  1. package controllers
  2. import "eta_gn/eta_report/models"
  3. type ErrorController struct {
  4. BaseCommonController
  5. }
  6. func (c *ErrorController) Error404() {
  7. c.Data["content"] = "很抱歉您访问的地址或者方法不存在"
  8. br := new(models.BaseResponse).Init()
  9. br.Msg = "您访问的资源不存在"
  10. br.Ret = 404
  11. c.Data["json"] = br
  12. c.ServeJSON()
  13. }