24 lines
512 B
Go
24 lines
512 B
Go
package web
|
|
|
|
import (
|
|
"videoweb/app/service/applistser"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// Application 福利应用页 SSR:拉取 /api/app/applist/list。
|
|
func Application(c *gin.Context) {
|
|
raw := applistser.FetchListOrEmpty(c, 0)
|
|
vm := applistser.BuildPageVM(raw)
|
|
data := gin.H{
|
|
"title": "福利应用",
|
|
"pageName": "应用推荐",
|
|
"navActive": "application",
|
|
"categories": vm.Categories,
|
|
}
|
|
if len(vm.Categories) == 0 {
|
|
setNoIndex(data, true)
|
|
}
|
|
HTMLOK(c, "application.html", data)
|
|
}
|