You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
438 B
26 lines
438 B
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 |
|
}
|
|
|