feat(admin,player,api): 优胜冠军通用管理与界面精简

管理端新增冠军盘列表/编辑、展开懒加载与 ECharts 修复;各列表页去掉重复标题。玩家端支持多赛事冠军盘、分批加载与语言切换刷新。API 扩展 outright CRUD 与列表性能优化。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-04 09:17:01 +08:00
parent 9b63d67e7c
commit 27580b2479
39 changed files with 2250 additions and 578 deletions

View File

@@ -15,7 +15,7 @@ const adminMenus = computed(() => [
{ path: '/users', label: t('nav.users') },
{ path: '/agents', label: t('nav.agents') },
{ path: '/matches', label: t('nav.matches') },
{ path: '/world-cup-outright', label: t('nav.outright') },
{ path: '/outrights', label: t('nav.outrights'), matchPrefix: true },
{ path: '/bets', label: t('nav.bets') },
{ path: '/cashback', label: t('nav.cashback') },
{ path: '/audit', label: t('nav.audit') },
@@ -30,9 +30,15 @@ const agentMenus = computed(() => [
const menus = computed(() => (auth.isAdmin.value ? adminMenus.value : agentMenus.value));
const currentLabel = computed(() =>
menus.value.find(m => m.path === route.path)?.label ?? ''
);
const currentLabel = computed(() => {
const hit = menus.value.find((m) => {
if ('matchPrefix' in m && m.matchPrefix) {
return route.path === m.path || route.path.startsWith(`${m.path}/`);
}
return route.path === m.path;
});
return hit?.label ?? '';
});
const userInitial = computed(() =>
(auth.user?.username ?? '').charAt(0).toUpperCase()
@@ -55,7 +61,12 @@ function logout() {
<nav class="nav">
<RouterLink
v-for="m in menus" :key="m.path" :to="m.path"
class="nav-item" :class="{ active: route.path === m.path }"
class="nav-item"
:class="{
active:
route.path === m.path ||
('matchPrefix' in m && m.matchPrefix && route.path.startsWith(`${m.path}/`)),
}"
>
{{ m.label }}
</RouterLink>