base.go 375 B

1234567891011121314151617181920
  1. // Controller基础类,所有Controller会继承此类
  2. package controllers
  3. import (
  4. "github.com/astaxie/beego"
  5. )
  6. // Operations about tokens
  7. type BaseController struct {
  8. beego.Controller
  9. }
  10. //总响应数据及错误信息
  11. type CommonResult struct {
  12. Code int `json:"code"`
  13. Msg string `json:"msg"`
  14. Data struct {
  15. Info interface{} `json:"info"`
  16. } `json:"data"`
  17. }