Initial commit

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
fish03
2026-09-23 14:43:16 +07:00
co-authored by Claude Opus 5.5
commit bef9f8b4ed
663 changed files with 81305 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
package web
import (
"videoweb/app/service/playletser"
"github.com/gin-gonic/gin"
)
// ThemeIndex 专题列表页:专题数据来自 GET /api/app/theme/list?themeType=2。
func ThemeIndex(c *gin.Context) {
q := playletser.ParseThemeIndexQuery(c.Param("page"))
if redirectCanonical(c, playletser.ThemeIndexCanonicalPath(q)) {
return
}
themes := playletser.FetchThemesOrEmpty(c, 2)
list, totalCount := playletser.BuildThemeIndexPage(themes, q)
if playletser.PageOutOfRange(q.PageNum, q.PageSize, totalCount) {
NotFound(c, "页面不存在")
return
}
data := gin.H{
"title": "AI成人短剧专题推荐" + playletser.PageTitleSuffix(q.PageNum),
"description": "专题集中展示黄果短剧各类精品专题合集,涵盖AI成人短剧、AI色情短剧、擦边短剧、AI换脸、AI魔改等热门主题。内容丰富多样,每日持续更新。",
"pageKey": "theme_index",
"pageName": "专题",
"navActive": "topic",
"pageNum": q.PageNum,
"pagePath": playletser.ThemeIndexCanonicalPath(q),
"list": list,
"totalCount": totalCount,
"itemListOffset": (q.PageNum - 1) * q.PageSize,
"pagination": playletser.BuildThemeIndexPagination(q, totalCount),
}
if totalCount <= 0 || len(list) == 0 {
setNoIndex(data, true)
}
HTMLOK(c, "themeIndex.html", data)
}