Ui调整
This commit is contained in:
@@ -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":
|
||||
|
||||
@@ -13,7 +13,6 @@ func TestResolveNavigationActiveKey(t *testing.T) {
|
||||
"/topic/editor-picks/page/2": "topic",
|
||||
"/rank/2/page/3": "rank",
|
||||
"/category/latest-video/": "category",
|
||||
"/application": "application",
|
||||
"/home-road": "homeRoad",
|
||||
"/detail/example-playlet": "list",
|
||||
"/play/example-playlet/chapter-1": "list",
|
||||
|
||||
Reference in New Issue
Block a user