@@ -0,0 +1,46 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user