1234567891011121314151617181920212223 |
- package controllers
- import (
- "eta_gn/eta_index_lib/models"
- )
- // ErrorController
- // @Description: 该控制器处理页面错误请求
- type ErrorController struct {
- BaseCommonController
- }
- func (c *ErrorController) Error404() {
- c.Data["content"] = "很抱歉您访问的地址或者方法不存在"
- //c.TplName = "error/404.html"
- br := new(models.BaseResponse).Init()
- br.Msg = "您访问的资源不存在"
- br.Ret = 404
- c.Data["json"] = br
- c.ServeJSON()
- }
|