htController.go 765 B

1234567891011121314151617181920212223242526272829303132333435
  1. package controllers
  2. import (
  3. "eta/eta_mini_crm_ht/models"
  4. "eta/eta_mini_crm_ht/services"
  5. )
  6. type HTController struct {
  7. BaseAuthController
  8. }
  9. // GetIndexInfo
  10. // @Title 获取一期指标信息
  11. // @Description 获取一期指标信息
  12. // @Success 200 {object} models.LoginResp
  13. // @router /getIndexInfo [get]
  14. func (this *HTController) GetIndexInfo(IndexCode string) {
  15. br := new(models.BaseResponse).Init()
  16. defer func() {
  17. this.Data["json"] = br
  18. this.ServeJSON()
  19. }()
  20. IndexInfo, err := services.GetIndexInfo(IndexCode)
  21. if err != nil {
  22. br.Msg = "分类列表获取失败"
  23. br.ErrMsg = "分类列表获取失败,系统错误,Err:" + err.Error()
  24. return
  25. }
  26. br.Data = IndexInfo
  27. br.Ret = 200
  28. br.Msg = "指标信息获取成功"
  29. br.Success = true
  30. }