调整UI
This commit is contained in:
@@ -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{
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user