package config import ( "videoweb/app/api/proto" "videoweb/app/service/configser" "videoweb/pub/common" "videoweb/pub/common/srvdef" "github.com/gin-gonic/gin" ) // FooterInfo 查询APP底部信息 // @Tags app配置相关接口 // @Summary 查询APP底部信息 -- by 王鸣 // @Description 返回APP底部品牌、底部导航和联系方式 // @Accept json // @Produce json // @Success 200 {object} proto.FooterInfoResp "成功" // @Failure 400 {string} string "失败" // @Router /api/app/config/footer/info [get] func FooterInfo(ctx *gin.Context) { resp := &proto.FooterInfoResp{ FooterInfo: configser.GetFooterInfo(), } common.ServerJSON(ctx, srvdef.Success, resp) } // RichTextList 查询APP富文本内容列表 // @Tags app配置相关接口 // @Summary 查询APP富文本内容列表 -- by 王鸣 // @Description 返回启用状态的富文本内容,支持按ids或titles过滤 // @Accept json // @Produce json // @Param ids query string false "富文本ID,多个用英文逗号分隔" // @Param titles query string false "富文本标题,多个用英文逗号分隔" // @Success 200 {object} proto.AppRichTextListResp "成功" // @Failure 400 {string} string "失败" // @Router /api/app/config/richtext/list [get] func RichTextList(ctx *gin.Context) { resp := configser.GetAppRichTextList(ctx.Query("ids"), ctx.Query("titles")) common.ServerJSON(ctx, srvdef.Success, resp) } // ContentTagList 查询APP统一标签列表 // @Tags app配置相关接口 // @Summary 查询APP统一标签列表 -- by 王鸣 // @Description 返回启用且有绑定内容数量的统一标签,contentTagType非必填,按绑定内容数量倒序排序 // @Accept json // @Produce json // @Param params query proto.AppContentTagListReq false "统一标签列表请求" // @Success 200 {object} proto.AppContentTagListResp "成功" // @Failure 400 {string} string "失败" // @Router /api/app/content/tag/list [get] func ContentTagList(ctx *gin.Context) { req := &proto.AppContentTagListReq{} if err := ctx.ShouldBindQuery(req); err != nil { common.ServerJSON(ctx, srvdef.ErrParamError, err.Error()) return } resp, err := configser.AppContentTagList(ctx, req) if err != nil { common.ServerJSON(ctx, err.Code, err.Tips) return } common.ServerJSON(ctx, srvdef.Success, resp) }