logo和配置修改
This commit is contained in:
+11
-9
@@ -20,7 +20,7 @@ func Richtext(c *gin.Context) {
|
||||
if redirectCanonical(c, target) {
|
||||
return
|
||||
}
|
||||
renderRichtext(c, title)
|
||||
renderRichtext(c, title, "富文本页")
|
||||
}
|
||||
|
||||
func RichtextPage(title string) gin.HandlerFunc {
|
||||
@@ -34,31 +34,32 @@ func RichtextPage(title string) gin.HandlerFunc {
|
||||
"帮助中心": "helpCenter.html",
|
||||
}
|
||||
if fallbackTemplate := fallbackTemplates[title]; fallbackTemplate != "" {
|
||||
data := gin.H{"title": title}
|
||||
data := gin.H{"title": title, "pageName": title}
|
||||
applyRichtextIndexPolicy(data, title)
|
||||
if title == "帮助中心" {
|
||||
data["faqItems"] = []seoser.FAQItem{
|
||||
{Question: "无法登录账号怎么办?", Answer: "请确认邮箱与密码是否正确;若忘记密码,可在登录页面使用“找回密码”。"},
|
||||
{Question: "观看记录没有同步?", Answer: "请确认已登录同一账号并保持网络连接,记录通常会自动同步。"},
|
||||
{Question: "付费剧集怎么观看?", Answer: "网页端可免费观看免费剧集;付费剧集请下载黄果短剧 App 观看完整内容。"},
|
||||
{Question: "需要注册账号吗?", Answer: "不需要,网页端无需注册即可直接观看免费剧集。"},
|
||||
{Question: "视频无法播放或加载缓慢?", Answer: "建议切换网络、刷新页面或更新浏览器;问题持续时可提交反馈。"},
|
||||
{Question: "如何管理收藏内容?", Answer: "进入个人中心的“追剧与收藏”页面,可查看或取消收藏。"},
|
||||
{Question: "在哪里下载 App?", Answer: "点击页面上的“下载APP”入口,按提示扫码或直接下载安装。"},
|
||||
}
|
||||
}
|
||||
HTMLOK(c, fallbackTemplate, data)
|
||||
return
|
||||
}
|
||||
}
|
||||
renderRichtextData(c, title, page)
|
||||
renderRichtextData(c, title, title, page)
|
||||
}
|
||||
}
|
||||
|
||||
func renderRichtext(c *gin.Context, title string) {
|
||||
func renderRichtext(c *gin.Context, title, pageName string) {
|
||||
title = strings.TrimSpace(title)
|
||||
page := configser.FetchRichTextByTitle(c, title)
|
||||
renderRichtextData(c, title, page)
|
||||
renderRichtextData(c, title, pageName, page)
|
||||
}
|
||||
|
||||
func renderRichtextData(c *gin.Context, title string, page configser.RichTextPageVM) {
|
||||
// pageName 为面包屑名称,与上游富文本标题可能不同。
|
||||
func renderRichtextData(c *gin.Context, title, pageName string, page configser.RichTextPageVM) {
|
||||
if !page.Found {
|
||||
NotFound(c, "未找到该内容")
|
||||
return
|
||||
@@ -73,6 +74,7 @@ func renderRichtextData(c *gin.Context, title string, page configser.RichTextPag
|
||||
"title": displayTitle,
|
||||
"richtext": page,
|
||||
"richtextKey": title,
|
||||
"pageName": pageName,
|
||||
}
|
||||
applyRichtextIndexPolicy(data, title)
|
||||
HTMLOK(c, "richtext.html", data)
|
||||
|
||||
Reference in New Issue
Block a user