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{