Files
fish03andClaude Opus 5.5 bef9f8b4ed Initial commit
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-23 14:43:16 +07:00

47 lines
1.6 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package web
import (
"strings"
"videoweb/app/service/playletser"
"github.com/gin-gonic/gin"
)
// Series AI 成人剧集 SSR:Swagger operate/list 固定 operateType=2,筛选映射 filterType=1/2/3。
func Series(c *gin.Context) {
q, ok := playletser.ParseSeriesQuery(c.Param("filter"), routeOrQuery(c, "page", "page"))
if !ok {
NotFound(c, "页面不存在")
return
}
if redirectCanonical(c, playletser.SeriesCanonicalPath(q)) {
return
}
raw := playletser.FetchOperateListOrEmpty(c, q)
if playletser.PageOutOfRange(q.PageNum, q.PageSize, raw.TotalCount) {
NotFound(c, "页面不存在")
return
}
sectionTitle := playletser.SeriesSectionTitle(q.FilterType)
data := gin.H{
"title": "AI成人剧集",
"description": "黄果短剧精选AI成人剧集,持续更新热门漫剧、独家原创剧集,支持免费在线观看。",
"pageKey": "series",
"pageName": "AI成人剧集",
"pagePath": playletser.SeriesCanonicalPath(q),
"navActive": "aiSeries",
"filters": playletser.BuildSeriesFilterTabs(q),
"sectionTitle": sectionTitle,
"seoSelections": []playletser.SEOSelection{{Dimension: "筛选", Value: strings.TrimSuffix(sectionTitle, "的AI成人剧集")}},
"list": raw.List,
"itemListOffset": (q.PageNum - 1) * q.PageSize,
"pagination": playletser.BuildSeriesPagination(q, raw.TotalCount),
}
// 剧集入口页(/series/、/series/popular/、/series/original/)始终可索引;空结果仅对分页打 noindex。
if q.PageNum > 1 && (raw.TotalCount <= 0 || len(raw.List) == 0) {
setNoIndex(data, true)
}
HTMLOK(c, "series.html", data)
}