package handler import ( "server/call" "server/modules/web/app" "server/modules/web/values" "time" "github.com/gin-gonic/gin" ) func NoticeList(c *gin.Context) { a := app.NewApp(c) defer func() { a.Response() }() list := call.GetConfigNotice() resp := values.NoticeListResp{} for _, v := range list { if v.Open == 0 || v.Time > time.Now().Unix() { continue } resp.List = append(resp.List, *v) } a.Data = resp }