base_config.go 848 B

1234567891011121314151617181920212223242526
  1. package controller
  2. import (
  3. "github.com/gin-gonic/gin"
  4. "hongze/hongze_yb/controller/response"
  5. response2 "hongze/hongze_yb/models/response"
  6. "hongze/hongze_yb/services/base_config"
  7. )
  8. // GetBusinessConf
  9. // @Tags 公共模块
  10. // @Summary 获取基本配置信息
  11. // @Description 获取基本配置信息
  12. // @Param Authorization header string true "微信登录后获取到的token"
  13. // @Success 200 {object} []logic.ApplyVariety "获取成功"
  14. // @failure 400 {string} string "获取失败"
  15. // @Router /base/business_conf [get]
  16. func GetBusinessConf(c *gin.Context) {
  17. disclaimer, err := base_config.GetBusinessConfDisclaimer()
  18. if err != nil {
  19. response.FailData("获取失败", "获取配置信息失败,Err:"+err.Error(), c)
  20. return
  21. }
  22. data := response2.BusinessConfResp{Disclaimer: disclaimer}
  23. response.OkData("获取成功", data, c)
  24. }