This commit is contained in:
谢宇宁
2026-10-22 15:30:49 +07:00
parent 3639d2184a
commit 6dd567a07e
25 changed files with 16 additions and 1100 deletions
+4 -5
View File
@@ -39,8 +39,6 @@ func ResolveNavigationActiveKey(activeKey, requestPath string) string {
return "todayUpdate"
case strings.HasPrefix(path, "/category/"):
return "category"
case path == "/application" || strings.HasPrefix(path, "/application/"):
return "application"
case path == "/home-road" || strings.HasPrefix(path, "/home-road/"):
return "homeRoad"
case path == "/list" || strings.HasPrefix(path, "/detail/") || strings.HasPrefix(path, "/play/") || path == "/more" || strings.HasPrefix(path, "/more/") || path == "/search" || strings.HasPrefix(path, "/search/"):
@@ -91,7 +89,6 @@ func DefaultHeaderNav() []HeaderNavItemVM {
{Name: "回家的路", Href: "/home-road/", Key: "homeRoad"},
{Name: "今日更新", Href: "/today-update/", Key: "todayUpdate"},
{Name: "下载APP", Href: "javascript:;", Key: "downloadApp", IsDownload: true},
{Name: "福利应用", Href: "/application/", Key: "application"},
}
}
@@ -117,6 +114,10 @@ func BuildHeaderNav(info *AppTranslationInfo) []HeaderNavItemVM {
SeoInfo: normalizeNavigationSEO(cat.SeoInfo),
}
href, external, download := normalizeNavURL(cat.URLValue, name)
// 福利应用页已下线,上游仍下发时不再展示
if !external && normalizeNavPath(href) == "/application" {
continue
}
item.Href = href
item.IsExternal = external
item.IsDownload = download
@@ -270,8 +271,6 @@ func navActiveKey(href, name string, download bool) string {
return "rank"
case "/today-update":
return "todayUpdate"
case "/application":
return "application"
case "/tag":
return "tagList"
case "/topic":