feat(player+api): 桌面端钱包/注单栏重构,首页快速下注与移动端体验优化

桌面端:
- 新增 DesktopWalletPageHeader 统一钱包子导航,移除重复大标题
- 重构我的余额页布局(居中窄卡片 + 余额/统计/账户设置)
- 新增 DesktopBetSlipRail 可折叠注单侧栏,优化 BetSlipPanel 交互
- 首页 upcoming 赛事卡片支持胜平负/让球/大小球快速下注
- 优化 DesktopShell 布局、3D 轮播、各账户/消息/充值页面样式

移动端:
- 重构 MobileWalletView 钱包页 UI
- 修复 MarketSelectionsPanel 下注区黑色背景问题
- 新增 PageBackButton 与 useSmartBack 智能返回逻辑
- 优化公告/消息/个人中心等详情页导航

API:
- listUpcomingPublished 支持 includeMarkets,返回首页卡片所需核心玩法
This commit is contained in:
2026-06-30 16:11:27 +08:00
parent ef5b9416cc
commit 7f563326d8
73 changed files with 2866 additions and 1552 deletions

View File

@@ -1,12 +1,15 @@
<script setup lang="ts">
import { computed, onActivated } from 'vue';
import { useRouter } from 'vue-router';
import { useRoute, useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { formatLocalMatchDateTime } from '@thebet365/shared';
import GoldSpinner from '../components/GoldSpinner.vue';
import { usePlayerHome } from '../composables/usePlayerHome';
import { stripHtml } from '../utils/html';
const { embedded = false } = defineProps<{ embedded?: boolean }>();
const route = useRoute();
const router = useRouter();
const { t, locale } = useI18n();
const { announcementItems, loading, load } = usePlayerHome();
@@ -39,15 +42,27 @@ function itemPreview(item: (typeof items.value)[number]) {
return '';
}
function isActive(id: string) {
return embedded && String(route.params.id ?? '') === id;
}
function onBack() {
if (embedded) {
router.push('/');
return;
}
goBack();
}
onActivated(() => {
void load(true);
});
</script>
<template>
<div class="announce-page">
<div class="announce-page" :class="{ 'is-embedded': embedded }">
<header class="page-header">
<button type="button" class="back-btn" :aria-label="t('announcements.back')" @click="goBack"></button>
<button type="button" class="back-btn" :aria-label="t('announcements.back')" @click="onBack"></button>
<h1>{{ t('announcements.title') }}</h1>
</header>
@@ -65,6 +80,7 @@ onActivated(() => {
:key="item.id"
type="button"
class="list-row"
:class="{ 'is-active': isActive(item.id) }"
@click="openDetail(item.id)"
>
<span class="row-main">
@@ -176,4 +192,101 @@ onActivated(() => {
color: var(--text-muted);
line-height: 1;
}
/* Desktop hub sidebar */
.announce-page.is-embedded {
display: flex;
flex-direction: column;
height: 100%;
min-height: 0;
padding: 16px 16px 0;
box-sizing: border-box;
}
.is-embedded .page-header {
flex-shrink: 0;
padding: 0 4px 12px;
margin-bottom: 4px;
}
.is-embedded .page-header h1 {
font-size: 16px;
font-weight: 800;
}
.is-embedded .back-btn {
width: 32px;
height: 32px;
font-size: 20px;
border-radius: 8px;
}
.is-embedded .list {
flex: 1;
min-height: 0;
overflow-y: auto;
margin: 0 -4px;
padding: 0 4px 16px;
}
.is-embedded .list-row {
align-items: flex-start;
gap: 10px;
padding: 12px 12px;
margin-bottom: 4px;
border: 1px solid transparent;
border-bottom: none;
border-radius: 8px;
transition: background 0.15s, border-color 0.15s;
}
.is-embedded .list-row:hover {
background: var(--bg-hover);
}
.is-embedded .list-row.is-active {
background: rgba(0, 102, 204, 0.08);
border-color: var(--border-active);
}
.is-embedded .list-row.is-active .title {
color: var(--primary);
}
.is-embedded .list-row.is-active .chevron {
color: var(--primary);
}
.is-embedded .title {
font-size: 13px;
font-weight: 700;
line-height: 1.45;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
white-space: normal;
}
.is-embedded .preview {
margin-top: 4px;
font-size: 12px;
line-height: 1.45;
white-space: normal;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.is-embedded .date {
margin-top: 6px;
font-size: 11px;
}
.is-embedded .chevron {
margin-top: 2px;
font-size: 16px;
align-self: center;
}
</style>