This commit is contained in:
谢宇宁
2026-09-29 15:30:33 +07:00
parent 0fbdba5ccf
commit 9abe0b1b76
181 changed files with 608 additions and 18501 deletions
+13
View File
@@ -2,6 +2,7 @@ package translationser
import (
"fmt"
"strings"
"sync"
"time"
"videoweb/app/service/upstream"
@@ -67,11 +68,23 @@ func filterHeaderCategories(info *AppTranslationInfo) []TranslationCategory {
if cat.Name == "" && cat.URLValue == "" {
continue
}
// 网页版已移除账号体系,后台若仍配置个人中心/已购入口则不展示。
if isAccountNavPath(cat.URLValue) {
continue
}
out = append(out, cat)
}
return out
}
func isAccountNavPath(raw string) bool {
switch strings.TrimRight(strings.TrimSpace(raw), "/") {
case "/user-center", "user-center", "/profile", "profile", "/purchased-series", "purchased-series", "/purchased", "purchased":
return true
}
return false
}
// DefaultCategoryList 接口失败时的兜底导航(字段与接口一致)。
func DefaultCategoryList() []TranslationCategory {
return []TranslationCategory{
-6
View File
@@ -290,10 +290,6 @@ func rewriteNavPath(path string) string {
return "/popular-recommend"
case "/tag", "/tag-list":
return "/tags"
case "/user-center":
return "/profile"
case "/purchased-series":
return "/purchased"
case "/search-results":
return "/search"
case "/more":
@@ -455,8 +451,6 @@ func navActiveKey(href, name string, download bool) string {
return "aiSeries"
case "/home-road":
return "homeRoad"
case "/profile":
return "userCenter"
case "/download-app":
return "downloadApp"
default: