优化首页公告与轮播图

This commit is contained in:
yml
2026-05-23 01:50:45 +08:00
parent 96d87483b0
commit c9db34ddda
14 changed files with 797 additions and 91 deletions
@@ -36,6 +36,24 @@ func (h *Handler) PublishOptions(c *gin.Context) {
response.OK(c, options)
}
func (h *Handler) HomeAnnouncements(c *gin.Context) {
announcements, err := h.service.HomeAnnouncements()
if err != nil {
writeConfigError(c, err)
return
}
response.OK(c, announcements)
}
func (h *Handler) HomeConfig(c *gin.Context) {
config, err := h.service.HomeConfig()
if err != nil {
writeConfigError(c, err)
return
}
response.OK(c, config)
}
func (h *Handler) Update(c *gin.Context) {
adminID, ok := currentAdminID(c)
if !ok {