feat(frontend): 首页信息流与两大核心界面重构
- index.vue: 移除 tabs 单选改为五区块纵向信息流(Hero/排期/歌曲/投稿/消息) 新增 scrollToSection 平滑滚动与投稿成功自动跳转;为移动端底部导航预留 pb-24 - ScheduleList.vue: 移除左右分栏改为日期横条+时段分组紧凑卡片 序号采用 28px w900 紫粉蓝渐变 bg-clip-text;卡片三态状态标签色区分 - RequestForm.vue: 序号选择从 pill 升级为 40×40 方格三态(free/taken/selected) taken 态删除线+灰色;selected 三色渐变+scale1.05;选中显示「已锁定第N首」提示
This commit is contained in:
@@ -176,19 +176,27 @@
|
|||||||
:key="item.seq"
|
:key="item.seq"
|
||||||
type="button"
|
type="button"
|
||||||
:class="[
|
:class="[
|
||||||
'sequence-pill',
|
'seq',
|
||||||
item.taken ? 'taken' : 'free',
|
item.taken ? 'seq-taken' : '',
|
||||||
expectedPlaySequence === String(item.seq) ? 'selected' : ''
|
expectedPlaySequence === String(item.seq) ? 'seq-selected' : ''
|
||||||
]"
|
]"
|
||||||
:disabled="item.taken"
|
:disabled="item.taken"
|
||||||
:title="item.taken ? getTakenSequenceTitle(item.seq) : ''"
|
:title="getTakenSequenceTitle(item.seq)"
|
||||||
@click="chooseExpectedPlaySequence(item.seq)"
|
@click="chooseExpectedPlaySequence(item.seq)"
|
||||||
>
|
>
|
||||||
{{ item.seq }}
|
{{ item.seq }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="selectedExpectedPlayDate" class="sequence-hint">绿色可选,红色已占用</div>
|
<div v-if="selectedExpectedPlayDate" class="sequence-hint">🟣 可选(紫粉蓝选中) · ⚪ 已占用(灰色带删除线)</div>
|
||||||
|
<div
|
||||||
|
v-if="selectedExpectedPlayDate && expectedPlaySequence"
|
||||||
|
class="sequence-locked"
|
||||||
|
style="margin-top:14px; display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:8px; background:linear-gradient(90deg, rgba(168,85,247,.08), rgba(236,72,153,.08), rgba(59,130,246,.08)); border:1px solid rgba(168,85,247,.2); color:#7C3AED; font-size:13px; font-weight:700;"
|
||||||
|
>
|
||||||
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>
|
||||||
|
已锁定 第 {{ expectedPlaySequence }} 首 位置
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 搜索结果容器 -->
|
<!-- 搜索结果容器 -->
|
||||||
@@ -3126,47 +3134,55 @@ defineExpose({
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sequence-grid {
|
.sequence-grid {
|
||||||
display: flex;
|
display: grid;
|
||||||
flex-wrap: wrap;
|
grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
|
||||||
gap: 0.5rem;
|
gap: 8px;
|
||||||
|
margin-top: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sequence-pill {
|
.seq {
|
||||||
height: 28px;
|
width: 40px;
|
||||||
min-width: 28px;
|
height: 40px;
|
||||||
padding: 0 10px;
|
display: inline-flex;
|
||||||
border-radius: 10px;
|
align-items: center;
|
||||||
border: 1px solid var(--border-primary);
|
justify-content: center;
|
||||||
background: rgba(0, 0, 0, 0.25);
|
border-radius: 8px;
|
||||||
color: rgba(255, 255, 255, 0.85);
|
background: #fff;
|
||||||
font-family: 'MiSans', sans-serif;
|
border: 1.5px solid #d1d5db;
|
||||||
font-weight: 700;
|
color: #111827;
|
||||||
font-size: 12px;
|
font-size: 16px;
|
||||||
transition: all 0.2s ease;
|
font-weight: 800;
|
||||||
|
transition: all 0.12s ease;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sequence-pill.free {
|
.seq:hover:not(:disabled) {
|
||||||
border-color: rgba(16, 185, 129, 0.35);
|
border-color: #4338ca;
|
||||||
background: rgba(16, 185, 129, 0.08);
|
color: #4338ca;
|
||||||
color: rgba(16, 185, 129, 0.95);
|
transform: scale(1.03);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sequence-pill.taken {
|
.seq-taken {
|
||||||
border-color: rgba(239, 68, 68, 0.35);
|
background: #f3f4f6;
|
||||||
background: rgba(239, 68, 68, 0.08);
|
border-color: #e5e7eb;
|
||||||
color: rgba(239, 68, 68, 0.95);
|
color: #9ca3af;
|
||||||
|
text-decoration: line-through;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sequence-pill.selected {
|
.seq-selected {
|
||||||
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
|
background: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #3b82f6 100%);
|
||||||
border-color: rgba(59, 130, 246, 0.6);
|
color: #fff;
|
||||||
|
border-color: transparent;
|
||||||
|
box-shadow: 0 6px 16px rgba(168, 85, 247, 0.35);
|
||||||
|
transform: scale(1.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sequence-hint {
|
.sequence-hint {
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: rgba(255, 255, 255, 0.55);
|
color: rgba(255, 255, 255, 0.55);
|
||||||
|
margin-top: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-section {
|
.search-section {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
+440
-468
@@ -1,36 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="home">
|
<div class="home pb-24 lg:pb-0">
|
||||||
<div class="ellipse-effect" />
|
|
||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
<div class="top-bar">
|
<!-- 右上角浮动用户操作区(简化版,仅保留 user-section) -->
|
||||||
<div class="logo-section">
|
<div class="user-actions-floating">
|
||||||
<NuxtLink class="logo-link" to="/">
|
|
||||||
<img
|
|
||||||
alt="VoiceHub Logo"
|
|
||||||
class="logo-image"
|
|
||||||
:src="logo"
|
|
||||||
width="90"
|
|
||||||
height="90"
|
|
||||||
decoding="async"
|
|
||||||
fetchpriority="high"
|
|
||||||
>
|
|
||||||
</NuxtLink>
|
|
||||||
<!-- 横线和学校logo -->
|
|
||||||
<div v-if="schoolLogoHomeUrl && schoolLogoHomeUrl.trim()" class="logo-divider-container">
|
|
||||||
<div class="logo-divider" />
|
|
||||||
<img
|
|
||||||
:src="proxiedSchoolLogoUrl"
|
|
||||||
alt="学校Logo"
|
|
||||||
class="school-logo"
|
|
||||||
width="200"
|
|
||||||
height="80"
|
|
||||||
decoding="async"
|
|
||||||
fetchpriority="high"
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 用户信息区域 -->
|
|
||||||
<div class="user-section">
|
<div class="user-section">
|
||||||
<ClientOnly>
|
<ClientOnly>
|
||||||
<div v-if="isClientAuthenticated" class="user-info">
|
<div v-if="isClientAuthenticated" class="user-info">
|
||||||
@@ -85,462 +57,435 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="siteTitle" class="site-title">
|
<!-- Section Hero -->
|
||||||
<div class="title-container">
|
<section id="hero-section" class="hero-block">
|
||||||
<h2 class="main-title">{{ siteTitle }}</h2>
|
<div class="hero-left">
|
||||||
<div class="title-divider" />
|
<h1 class="hero-title">{{ siteTitle }}</h1>
|
||||||
<span class="sub-title">VoiceHub 校园广播系统</span>
|
<p class="hero-subtitle">下周校园,听你的。</p>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 中间主体内容区域 -->
|
<div class="hero-cta">
|
||||||
<div class="content-area">
|
<button
|
||||||
<!-- 选项卡区域 -->
|
class="bg-gradient-to-r from-purple-500 via-pink-500 to-blue-500 text-white px-6 py-3 rounded-lg font-bold shadow-lg hover:shadow-xl transition-shadow"
|
||||||
<div class="tabs-row">
|
@click="scrollToSection('request-section')"
|
||||||
<div
|
|
||||||
:class="{ active: activeTab === 'schedule' }"
|
|
||||||
class="section-tab schedule-tab"
|
|
||||||
@click="handleTabClick('schedule')"
|
|
||||||
>
|
|
||||||
<Icon class="tab-icon" name="calendar" :size="20" />
|
|
||||||
<span class="tab-text">播出排期</span>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
:class="{ active: activeTab === 'songs' }"
|
|
||||||
class="section-tab songs-tab"
|
|
||||||
@click="handleTabClick('songs')"
|
|
||||||
>
|
|
||||||
<Icon class="tab-icon" name="music" :size="20" />
|
|
||||||
<span class="tab-text">歌曲列表</span>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
:class="{ active: activeTab === 'request' }"
|
|
||||||
class="section-tab request-tab"
|
|
||||||
@click="handleTabClick('request')"
|
|
||||||
>
|
|
||||||
<Icon class="tab-icon" name="search" :size="20" />
|
|
||||||
<span class="tab-text">投稿歌曲</span>
|
|
||||||
</div>
|
|
||||||
<ClientOnly>
|
|
||||||
<div
|
|
||||||
ref="notificationTabRef"
|
|
||||||
:class="{ active: activeTab === 'notification', disabled: !isClientAuthenticated }"
|
|
||||||
class="section-tab"
|
|
||||||
data-tab="notification"
|
|
||||||
@click="isClientAuthenticated ? handleTabClick('notification') : showLoginNotice()"
|
|
||||||
>
|
>
|
||||||
<div class="icon-wrapper">
|
立即点歌
|
||||||
<Icon class="tab-icon" name="message-circle" :size="20" />
|
</button>
|
||||||
<span
|
<button
|
||||||
v-if="isClientAuthenticated && hasUnreadNotifications"
|
class="border border-gray-300 text-gray-700 px-6 py-3 rounded-lg font-bold hover:bg-gray-50"
|
||||||
class="notification-badge-tab"
|
@click="scrollToSection('schedule-section')"
|
||||||
/>
|
>
|
||||||
</div>
|
查看排期
|
||||||
<span class="tab-text">
|
</button>
|
||||||
消息
|
</div>
|
||||||
<span
|
|
||||||
v-if="isClientAuthenticated && hasUnreadNotifications"
|
<div class="status-info">
|
||||||
class="notification-badge-desktop"
|
<span>
|
||||||
/>
|
{{ isRequestOpen ? '当前投稿开放' : '当前投稿关闭' }} · 共 {{ songCount || 0 }} 首投稿 · {{ scheduleCount || 0 }} 首已定排期
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<template #fallback>
|
|
||||||
<div class="section-tab disabled" data-tab="notification">
|
|
||||||
<Icon class="tab-icon" name="message-circle" :size="20" />
|
|
||||||
<span class="tab-text">消息</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</ClientOnly>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 内容区域 -->
|
<div id="hero-illustration-slot" class="w-full max-w-sm"></div>
|
||||||
<div class="tab-content-container">
|
</section>
|
||||||
<ClientOnly>
|
|
||||||
<!-- 播出排期内容 -->
|
|
||||||
<div v-if="activeTab === 'schedule'" key="schedule" class="tab-pane schedule-tab-pane">
|
|
||||||
<div class="full-width">
|
|
||||||
<SongsScheduleList
|
|
||||||
:error="error"
|
|
||||||
:loading="loading"
|
|
||||||
:schedules="publicSchedules"
|
|
||||||
@semester-change="handleSemesterChange"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 用户使用指南组件 -->
|
|
||||||
<UserTutorial />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 歌曲列表内容 -->
|
<!-- Section Schedule -->
|
||||||
<div v-else-if="activeTab === 'songs'" key="songs" class="tab-pane">
|
<section id="schedule-section" class="content-block">
|
||||||
<div class="song-list-container">
|
<div class="section-header">
|
||||||
<SongsSongList
|
<h2>本周排期</h2>
|
||||||
:error="error"
|
<span class="sub">播出时间表</span>
|
||||||
:is-admin="isAdmin"
|
</div>
|
||||||
:loading="loading"
|
<ClientOnly>
|
||||||
:songs="filteredSongs"
|
<SongsScheduleList
|
||||||
@refresh="refreshSongs"
|
:error="error"
|
||||||
@vote="handleVote"
|
:loading="loading"
|
||||||
@withdraw="handleWithdraw"
|
:schedules="publicSchedules"
|
||||||
@cancel-replay="handleCancelReplay"
|
@semester-change="handleSemesterChange"
|
||||||
@request-replay="handleRequestReplay"
|
/>
|
||||||
@semester-change="handleSemesterChange"
|
</ClientOnly>
|
||||||
/>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 投稿歌曲内容 -->
|
<!-- Section Songs -->
|
||||||
<div v-else-if="activeTab === 'request'" key="request" class="tab-pane request-pane">
|
<section id="songs-section" class="content-block">
|
||||||
<SongsRequestForm
|
<div class="section-header">
|
||||||
ref="requestFormRef"
|
<h2>热门投稿</h2>
|
||||||
:loading="loading"
|
<span class="sub">为喜欢的歌投票</span>
|
||||||
@request="handleRequest"
|
</div>
|
||||||
@vote="handleVote"
|
<ClientOnly>
|
||||||
|
<SongsSongList
|
||||||
|
:error="error"
|
||||||
|
:is-admin="isAdmin"
|
||||||
|
:loading="loading"
|
||||||
|
:songs="filteredSongs"
|
||||||
|
@refresh="refreshSongs"
|
||||||
|
@vote="handleVote"
|
||||||
|
@withdraw="handleWithdraw"
|
||||||
|
@cancel-replay="handleCancelReplay"
|
||||||
|
@request-replay="handleRequestReplay"
|
||||||
|
@semester-change="handleSemesterChange"
|
||||||
|
/>
|
||||||
|
</ClientOnly>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Section Request -->
|
||||||
|
<section id="request-section" class="content-block">
|
||||||
|
<div class="section-header">
|
||||||
|
<h2>投稿歌曲</h2>
|
||||||
|
<span class="sub" @click="showRules = true">点歌规则</span>
|
||||||
|
</div>
|
||||||
|
<ClientOnly>
|
||||||
|
<div v-if="!isClientAuthenticated" class="login-required-container">
|
||||||
|
<div class="login-required-content">
|
||||||
|
<Lock class="login-icon" :size="48" />
|
||||||
|
<h3>登录后投稿</h3>
|
||||||
|
<p>登录后可选择期望日期和播出位置</p>
|
||||||
|
<button class="login-button" @click="navigateToLogin">立即登录</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<SongsRequestForm
|
||||||
|
v-else
|
||||||
|
ref="requestFormRef"
|
||||||
|
:loading="loading"
|
||||||
|
@request="handleRequest"
|
||||||
|
@vote="handleVote"
|
||||||
|
/>
|
||||||
|
</ClientOnly>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Section Notification -->
|
||||||
|
<section id="notification-section" class="content-block">
|
||||||
|
<div class="section-header">
|
||||||
|
<h2>我的消息</h2>
|
||||||
|
<button class="settings-icon" @click="toggleNotificationSettings">
|
||||||
|
<svg
|
||||||
|
fill="none"
|
||||||
|
height="20"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
stroke-width="2"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
width="20"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
|
<circle cx="12" cy="12" r="3" />
|
||||||
|
<path
|
||||||
|
d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"
|
||||||
/>
|
/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<ClientOnly>
|
||||||
|
<div v-if="!isClientAuthenticated" class="login-required-container">
|
||||||
|
<div class="login-required-content">
|
||||||
|
<Lock class="login-icon" :size="48" />
|
||||||
|
<h3>需要登录</h3>
|
||||||
|
<p>您需要登录才能查看通知</p>
|
||||||
|
<button class="login-button" @click="navigateToLogin">立即登录</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else class="notification-container">
|
||||||
|
<!-- 通知列表 -->
|
||||||
|
<div class="notification-list">
|
||||||
|
<div v-if="notificationsLoading" class="loading-indicator">
|
||||||
|
<div class="loading-spinner" />
|
||||||
|
<span>加载中...</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else-if="userNotifications.length === 0" class="empty-notification">
|
||||||
|
<div class="empty-icon">
|
||||||
|
<Icon :size="48" color="#6b7280" name="bell" />
|
||||||
|
</div>
|
||||||
|
<p>暂无通知</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Transition mode="out-in" name="notification-list-fade">
|
||||||
|
<div
|
||||||
|
v-if="userNotifications.length > 0"
|
||||||
|
:key="notificationsService.currentPage.value"
|
||||||
|
class="notification-items"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-for="(notification, index) in userNotifications"
|
||||||
|
:key="notification.id"
|
||||||
|
:class="{ unread: !notification.read }"
|
||||||
|
:style="{ '--animation-delay': index * 0.1 + 's' }"
|
||||||
|
class="notification-card"
|
||||||
|
@click="viewNotification(notification)"
|
||||||
|
>
|
||||||
|
<div class="notification-card-header">
|
||||||
|
<div class="notification-icon-type">
|
||||||
|
<Icon
|
||||||
|
v-if="notification.type === 'SONG_SELECTED'"
|
||||||
|
:size="20"
|
||||||
|
color="#4f46e5"
|
||||||
|
name="check"
|
||||||
|
/>
|
||||||
|
<Icon
|
||||||
|
v-else-if="notification.type === 'SONG_PLAYED'"
|
||||||
|
:size="20"
|
||||||
|
color="#10b981"
|
||||||
|
name="play"
|
||||||
|
/>
|
||||||
|
<Icon
|
||||||
|
v-else-if="notification.type === 'SONG_VOTED'"
|
||||||
|
:size="20"
|
||||||
|
color="#f59e0b"
|
||||||
|
name="thumbs-up"
|
||||||
|
/>
|
||||||
|
<Icon
|
||||||
|
v-else-if="notification.type === 'SONG_REJECTED'"
|
||||||
|
:size="20"
|
||||||
|
color="#ef4444"
|
||||||
|
name="x-circle"
|
||||||
|
/>
|
||||||
|
<Icon
|
||||||
|
v-else-if="notification.type === 'COLLABORATION_INVITE'"
|
||||||
|
:size="20"
|
||||||
|
color="#0B5AFE"
|
||||||
|
name="users"
|
||||||
|
/>
|
||||||
|
<Icon
|
||||||
|
v-else-if="notification.type === 'COLLABORATION_RESPONSE'"
|
||||||
|
:size="20"
|
||||||
|
color="#8b5cf6"
|
||||||
|
name="message-circle"
|
||||||
|
/>
|
||||||
|
<Icon v-else :size="20" color="#6b7280" name="bell" />
|
||||||
|
</div>
|
||||||
|
<div class="notification-title-row">
|
||||||
|
<div class="notification-title">
|
||||||
|
<span v-if="notification.type === 'SONG_SELECTED'">歌曲已选中</span>
|
||||||
|
<span v-else-if="notification.type === 'SONG_PLAYED'"
|
||||||
|
>歌曲已播放</span
|
||||||
|
>
|
||||||
|
<span v-else-if="notification.type === 'SONG_VOTED'">收到新投票</span>
|
||||||
|
<span v-else-if="notification.type === 'SONG_REJECTED'"
|
||||||
|
>歌曲被驳回</span
|
||||||
|
>
|
||||||
|
<span v-else-if="notification.type === 'COLLABORATION_INVITE'">
|
||||||
|
联合投稿邀请
|
||||||
|
<span
|
||||||
|
v-if="notification.handled"
|
||||||
|
:class="[
|
||||||
|
'status-tag',
|
||||||
|
notification.status === 'ACCEPTED'
|
||||||
|
? 'accepted'
|
||||||
|
: notification.status === 'INVALID'
|
||||||
|
? 'invalid'
|
||||||
|
: 'rejected'
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
{{
|
||||||
|
notification.status === 'ACCEPTED'
|
||||||
|
? '- 已接受'
|
||||||
|
: notification.status === 'INVALID'
|
||||||
|
? '- 已失效'
|
||||||
|
: '- 已拒绝'
|
||||||
|
}}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<span v-else-if="notification.type === 'COLLABORATION_RESPONSE'"
|
||||||
|
>联合投稿回复</span
|
||||||
|
>
|
||||||
|
<span v-else>系统通知</span>
|
||||||
|
<span v-if="!notification.read" class="unread-indicator" />
|
||||||
|
</div>
|
||||||
|
<div class="notification-time">
|
||||||
|
{{ formatNotificationTime(notification.createdAt) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="notification-card-body">
|
||||||
|
<div class="notification-text">{{ notification.message }}</div>
|
||||||
|
|
||||||
|
<!-- 联合投稿邀请操作按钮 -->
|
||||||
|
<div
|
||||||
|
v-if="
|
||||||
|
notification.type === 'COLLABORATION_INVITE' && !notification.handled
|
||||||
|
"
|
||||||
|
class="invite-actions"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
:disabled="notification.processing"
|
||||||
|
class="action-button accept-btn"
|
||||||
|
@click.stop="handleCollaborationReply(notification, true)"
|
||||||
|
>
|
||||||
|
{{ notification.processing ? '处理中...' : '接受邀请' }}
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
:disabled="notification.processing"
|
||||||
|
class="action-button reject-btn"
|
||||||
|
@click.stop="handleCollaborationReply(notification, false)"
|
||||||
|
>
|
||||||
|
拒绝
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="notification-card-actions">
|
||||||
|
<button
|
||||||
|
class="action-button delete"
|
||||||
|
title="删除"
|
||||||
|
@click.stop="deleteNotification(notification.id)"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
fill="none"
|
||||||
|
height="16"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
stroke-width="2"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
width="16"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
|
<polyline points="3 6 5 6 21 6" />
|
||||||
|
<path
|
||||||
|
d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
<span>删除</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Transition>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 通知内容 -->
|
<!-- 分页控件 -->
|
||||||
<div
|
<div
|
||||||
v-else-if="activeTab === 'notification'"
|
v-if="notificationsService.totalCount.value > 0"
|
||||||
key="notification"
|
class="notification-pagination"
|
||||||
class="tab-pane notification-pane"
|
|
||||||
>
|
>
|
||||||
<div v-if="!isClientAuthenticated" class="login-required-container">
|
<div class="pagination-info">
|
||||||
<div class="login-required-content">
|
<span class="pagination-text">
|
||||||
<Lock class="login-icon" :size="48" />
|
共 {{ notificationsService.totalCount.value }} 条通知, 第
|
||||||
<h3>需要登录</h3>
|
{{ notificationsService.currentPage.value }} /
|
||||||
<p>您需要登录才能查看通知</p>
|
{{ notificationsService.totalPages.value }} 页
|
||||||
<button class="login-button" @click="navigateToLogin">立即登录</button>
|
</span>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="notification-container">
|
|
||||||
<!-- 标题和设置按钮 -->
|
<div class="pagination-controls">
|
||||||
<div class="notification-header">
|
<!-- 每页显示数量选择器 -->
|
||||||
<h2 class="notification-title">通知中心</h2>
|
<div class="page-size-selector">
|
||||||
<button class="settings-icon" @click="toggleNotificationSettings">
|
<label for="pageSize">每页显示:</label>
|
||||||
|
<CustomSelect
|
||||||
|
id="pageSize"
|
||||||
|
:model-value="notificationsService.pageSize.value"
|
||||||
|
:options="pageSizeOptions"
|
||||||
|
class="page-size-custom-select"
|
||||||
|
@update:model-value="handlePageSizeChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 页码导航 -->
|
||||||
|
<div class="page-navigation">
|
||||||
|
<button
|
||||||
|
:disabled="
|
||||||
|
!notificationsService.hasPrevPage.value ||
|
||||||
|
notificationsService.isPaginationLoading.value
|
||||||
|
"
|
||||||
|
class="page-nav-button"
|
||||||
|
title="上一页"
|
||||||
|
@click="notificationsService.prevPage()"
|
||||||
|
>
|
||||||
<svg
|
<svg
|
||||||
fill="none"
|
fill="none"
|
||||||
height="20"
|
height="16"
|
||||||
stroke="currentColor"
|
stroke="currentColor"
|
||||||
stroke-linecap="round"
|
stroke-linecap="round"
|
||||||
stroke-linejoin="round"
|
stroke-linejoin="round"
|
||||||
stroke-width="2"
|
stroke-width="2"
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
width="20"
|
width="16"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
>
|
>
|
||||||
<circle cx="12" cy="12" r="3" />
|
<polyline points="15 18 9 12 15 6" />
|
||||||
<path
|
</svg>
|
||||||
d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"
|
</button>
|
||||||
/>
|
|
||||||
|
<!-- 页码按钮 -->
|
||||||
|
<div class="page-numbers">
|
||||||
|
<template v-for="page in getVisiblePages()" :key="page">
|
||||||
|
<button
|
||||||
|
v-if="page !== '...'"
|
||||||
|
:class="[
|
||||||
|
'page-number-button',
|
||||||
|
{ active: page === notificationsService.currentPage.value }
|
||||||
|
]"
|
||||||
|
:disabled="notificationsService.isPaginationLoading.value"
|
||||||
|
@click="notificationsService.goToPage(page)"
|
||||||
|
>
|
||||||
|
{{ page }}
|
||||||
|
</button>
|
||||||
|
<span v-else class="page-ellipsis">...</span>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button
|
||||||
|
:disabled="
|
||||||
|
!notificationsService.hasNextPage.value ||
|
||||||
|
notificationsService.isPaginationLoading.value
|
||||||
|
"
|
||||||
|
class="page-nav-button"
|
||||||
|
title="下一页"
|
||||||
|
@click="notificationsService.nextPage()"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
fill="none"
|
||||||
|
height="16"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
stroke-width="2"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
width="16"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
|
<polyline points="9 18 15 12 9 6" />
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 通知列表 -->
|
<!-- 分页加载状态 -->
|
||||||
<div class="notification-list">
|
<div
|
||||||
<div v-if="notificationsLoading" class="loading-indicator">
|
v-if="notificationsService.isPaginationLoading.value"
|
||||||
<div class="loading-spinner" />
|
class="pagination-loading"
|
||||||
<span>加载中...</span>
|
>
|
||||||
</div>
|
<div class="loading-spinner" />
|
||||||
|
<span>加载中...</span>
|
||||||
<div v-else-if="userNotifications.length === 0" class="empty-notification">
|
|
||||||
<div class="empty-icon">
|
|
||||||
<Icon :size="48" color="#6b7280" name="bell" />
|
|
||||||
</div>
|
|
||||||
<p>暂无通知</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Transition mode="out-in" name="notification-list-fade">
|
|
||||||
<div
|
|
||||||
v-if="userNotifications.length > 0"
|
|
||||||
:key="notificationsService.currentPage.value"
|
|
||||||
class="notification-items"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
v-for="(notification, index) in userNotifications"
|
|
||||||
:key="notification.id"
|
|
||||||
:class="{ unread: !notification.read }"
|
|
||||||
:style="{ '--animation-delay': index * 0.1 + 's' }"
|
|
||||||
class="notification-card"
|
|
||||||
@click="viewNotification(notification)"
|
|
||||||
>
|
|
||||||
<div class="notification-card-header">
|
|
||||||
<div class="notification-icon-type">
|
|
||||||
<Icon
|
|
||||||
v-if="notification.type === 'SONG_SELECTED'"
|
|
||||||
:size="20"
|
|
||||||
color="#4f46e5"
|
|
||||||
name="check"
|
|
||||||
/>
|
|
||||||
<Icon
|
|
||||||
v-else-if="notification.type === 'SONG_PLAYED'"
|
|
||||||
:size="20"
|
|
||||||
color="#10b981"
|
|
||||||
name="play"
|
|
||||||
/>
|
|
||||||
<Icon
|
|
||||||
v-else-if="notification.type === 'SONG_VOTED'"
|
|
||||||
:size="20"
|
|
||||||
color="#f59e0b"
|
|
||||||
name="thumbs-up"
|
|
||||||
/>
|
|
||||||
<Icon
|
|
||||||
v-else-if="notification.type === 'SONG_REJECTED'"
|
|
||||||
:size="20"
|
|
||||||
color="#ef4444"
|
|
||||||
name="x-circle"
|
|
||||||
/>
|
|
||||||
<Icon
|
|
||||||
v-else-if="notification.type === 'COLLABORATION_INVITE'"
|
|
||||||
:size="20"
|
|
||||||
color="#0B5AFE"
|
|
||||||
name="users"
|
|
||||||
/>
|
|
||||||
<Icon
|
|
||||||
v-else-if="notification.type === 'COLLABORATION_RESPONSE'"
|
|
||||||
:size="20"
|
|
||||||
color="#8b5cf6"
|
|
||||||
name="message-circle"
|
|
||||||
/>
|
|
||||||
<Icon v-else :size="20" color="#6b7280" name="bell" />
|
|
||||||
</div>
|
|
||||||
<div class="notification-title-row">
|
|
||||||
<div class="notification-title">
|
|
||||||
<span v-if="notification.type === 'SONG_SELECTED'">歌曲已选中</span>
|
|
||||||
<span v-else-if="notification.type === 'SONG_PLAYED'"
|
|
||||||
>歌曲已播放</span
|
|
||||||
>
|
|
||||||
<span v-else-if="notification.type === 'SONG_VOTED'">收到新投票</span>
|
|
||||||
<span v-else-if="notification.type === 'SONG_REJECTED'"
|
|
||||||
>歌曲被驳回</span
|
|
||||||
>
|
|
||||||
<span v-else-if="notification.type === 'COLLABORATION_INVITE'">
|
|
||||||
联合投稿邀请
|
|
||||||
<span
|
|
||||||
v-if="notification.handled"
|
|
||||||
:class="[
|
|
||||||
'status-tag',
|
|
||||||
notification.status === 'ACCEPTED'
|
|
||||||
? 'accepted'
|
|
||||||
: notification.status === 'INVALID'
|
|
||||||
? 'invalid'
|
|
||||||
: 'rejected'
|
|
||||||
]"
|
|
||||||
>
|
|
||||||
{{
|
|
||||||
notification.status === 'ACCEPTED'
|
|
||||||
? '- 已接受'
|
|
||||||
: notification.status === 'INVALID'
|
|
||||||
? '- 已失效'
|
|
||||||
: '- 已拒绝'
|
|
||||||
}}
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
<span v-else-if="notification.type === 'COLLABORATION_RESPONSE'"
|
|
||||||
>联合投稿回复</span
|
|
||||||
>
|
|
||||||
<span v-else>系统通知</span>
|
|
||||||
<span v-if="!notification.read" class="unread-indicator" />
|
|
||||||
</div>
|
|
||||||
<div class="notification-time">
|
|
||||||
{{ formatNotificationTime(notification.createdAt) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="notification-card-body">
|
|
||||||
<div class="notification-text">{{ notification.message }}</div>
|
|
||||||
|
|
||||||
<!-- 联合投稿邀请操作按钮 -->
|
|
||||||
<div
|
|
||||||
v-if="
|
|
||||||
notification.type === 'COLLABORATION_INVITE' && !notification.handled
|
|
||||||
"
|
|
||||||
class="invite-actions"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
:disabled="notification.processing"
|
|
||||||
class="action-button accept-btn"
|
|
||||||
@click.stop="handleCollaborationReply(notification, true)"
|
|
||||||
>
|
|
||||||
{{ notification.processing ? '处理中...' : '接受邀请' }}
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
:disabled="notification.processing"
|
|
||||||
class="action-button reject-btn"
|
|
||||||
@click.stop="handleCollaborationReply(notification, false)"
|
|
||||||
>
|
|
||||||
拒绝
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="notification-card-actions">
|
|
||||||
<button
|
|
||||||
class="action-button delete"
|
|
||||||
title="删除"
|
|
||||||
@click.stop="deleteNotification(notification.id)"
|
|
||||||
>
|
|
||||||
<svg
|
|
||||||
fill="none"
|
|
||||||
height="16"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
stroke-width="2"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
width="16"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<polyline points="3 6 5 6 21 6" />
|
|
||||||
<path
|
|
||||||
d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
<span>删除</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Transition>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 分页控件 -->
|
|
||||||
<div
|
|
||||||
v-if="notificationsService.totalCount.value > 0"
|
|
||||||
class="notification-pagination"
|
|
||||||
>
|
|
||||||
<div class="pagination-info">
|
|
||||||
<span class="pagination-text">
|
|
||||||
共 {{ notificationsService.totalCount.value }} 条通知, 第
|
|
||||||
{{ notificationsService.currentPage.value }} /
|
|
||||||
{{ notificationsService.totalPages.value }} 页
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="pagination-controls">
|
|
||||||
<!-- 每页显示数量选择器 -->
|
|
||||||
<div class="page-size-selector">
|
|
||||||
<label for="pageSize">每页显示:</label>
|
|
||||||
<CustomSelect
|
|
||||||
id="pageSize"
|
|
||||||
:model-value="notificationsService.pageSize.value"
|
|
||||||
:options="pageSizeOptions"
|
|
||||||
class="page-size-custom-select"
|
|
||||||
@update:model-value="handlePageSizeChange"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 页码导航 -->
|
|
||||||
<div class="page-navigation">
|
|
||||||
<button
|
|
||||||
:disabled="
|
|
||||||
!notificationsService.hasPrevPage.value ||
|
|
||||||
notificationsService.isPaginationLoading.value
|
|
||||||
"
|
|
||||||
class="page-nav-button"
|
|
||||||
title="上一页"
|
|
||||||
@click="notificationsService.prevPage()"
|
|
||||||
>
|
|
||||||
<svg
|
|
||||||
fill="none"
|
|
||||||
height="16"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
stroke-width="2"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
width="16"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<polyline points="15 18 9 12 15 6" />
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- 页码按钮 -->
|
|
||||||
<div class="page-numbers">
|
|
||||||
<template v-for="page in getVisiblePages()" :key="page">
|
|
||||||
<button
|
|
||||||
v-if="page !== '...'"
|
|
||||||
:class="[
|
|
||||||
'page-number-button',
|
|
||||||
{ active: page === notificationsService.currentPage.value }
|
|
||||||
]"
|
|
||||||
:disabled="notificationsService.isPaginationLoading.value"
|
|
||||||
@click="notificationsService.goToPage(page)"
|
|
||||||
>
|
|
||||||
{{ page }}
|
|
||||||
</button>
|
|
||||||
<span v-else class="page-ellipsis">...</span>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button
|
|
||||||
:disabled="
|
|
||||||
!notificationsService.hasNextPage.value ||
|
|
||||||
notificationsService.isPaginationLoading.value
|
|
||||||
"
|
|
||||||
class="page-nav-button"
|
|
||||||
title="下一页"
|
|
||||||
@click="notificationsService.nextPage()"
|
|
||||||
>
|
|
||||||
<svg
|
|
||||||
fill="none"
|
|
||||||
height="16"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
stroke-width="2"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
width="16"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<polyline points="9 18 15 12 9 6" />
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 分页加载状态 -->
|
|
||||||
<div
|
|
||||||
v-if="notificationsService.isPaginationLoading.value"
|
|
||||||
class="pagination-loading"
|
|
||||||
>
|
|
||||||
<div class="loading-spinner" />
|
|
||||||
<span>加载中...</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 底部操作按钮 -->
|
|
||||||
<div v-if="userNotifications.length > 0" class="notification-actions-bar">
|
|
||||||
<button
|
|
||||||
:class="{ disabled: !hasUnreadNotifications }"
|
|
||||||
:disabled="!hasUnreadNotifications"
|
|
||||||
class="action-button-large"
|
|
||||||
@click="markAllNotificationsAsRead"
|
|
||||||
>
|
|
||||||
全部标记为已读
|
|
||||||
</button>
|
|
||||||
<button class="action-button-large danger" @click="clearAllNotifications">
|
|
||||||
清空所有消息
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 确认对话框 -->
|
|
||||||
<ConfirmDialog
|
|
||||||
v-model:show="showConfirmDialog"
|
|
||||||
:cancel-text="confirmDialogConfig.cancelText"
|
|
||||||
:confirm-text="confirmDialogConfig.confirmText"
|
|
||||||
:message="confirmDialogConfig.message"
|
|
||||||
:title="confirmDialogConfig.title"
|
|
||||||
:type="confirmDialogConfig.type"
|
|
||||||
@cancel="handleCancelAction"
|
|
||||||
@confirm="handleConfirmAction"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ClientOnly>
|
|
||||||
</div>
|
<!-- 底部操作按钮 -->
|
||||||
</div>
|
<div v-if="userNotifications.length > 0" class="notification-actions-bar">
|
||||||
|
<button
|
||||||
|
:class="{ disabled: !hasUnreadNotifications }"
|
||||||
|
:disabled="!hasUnreadNotifications"
|
||||||
|
class="action-button-large"
|
||||||
|
@click="markAllNotificationsAsRead"
|
||||||
|
>
|
||||||
|
全部标记为已读
|
||||||
|
</button>
|
||||||
|
<button class="action-button-large danger" @click="clearAllNotifications">
|
||||||
|
清空所有消息
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 确认对话框 -->
|
||||||
|
<ConfirmDialog
|
||||||
|
v-model:show="showConfirmDialog"
|
||||||
|
:cancel-text="confirmDialogConfig.cancelText"
|
||||||
|
:confirm-text="confirmDialogConfig.confirmText"
|
||||||
|
:message="confirmDialogConfig.message"
|
||||||
|
:title="confirmDialogConfig.title"
|
||||||
|
:type="confirmDialogConfig.type"
|
||||||
|
@cancel="handleCancelAction"
|
||||||
|
@confirm="handleConfirmAction"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</ClientOnly>
|
||||||
|
</section>
|
||||||
|
|
||||||
<!-- 页脚信息显示 -->
|
<!-- 页脚信息显示 -->
|
||||||
<SiteFooter />
|
<SiteFooter />
|
||||||
@@ -1273,12 +1218,10 @@ const handleRequest = async (songData, done) => {
|
|||||||
await requestFormRef.value.refreshSubmissionStatus()
|
await requestFormRef.value.refreshSubmissionStatus()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果当前在歌曲列表页,自动切换到该页面
|
// 投稿成功后自动滚动到歌曲列表
|
||||||
if (activeTab.value !== 'songs') {
|
setTimeout(() => {
|
||||||
setTimeout(() => {
|
scrollToSection('songs-section')
|
||||||
handleTabClick('songs')
|
}, 500)
|
||||||
}, 500)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof done === 'function') done(true)
|
if (typeof done === 'function') done(true)
|
||||||
return true
|
return true
|
||||||
@@ -1523,9 +1466,15 @@ const vRipple = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理标签点击事件,添加动画效果
|
// 处理标签点击事件(@deprecated 保留以防它处引用,页面现已改为纵向区块无标签切换)
|
||||||
const handleTabClick = (tab) => {
|
const handleTabClick = (tab) => {
|
||||||
activeTab.value = tab
|
// activeTab.value = tab
|
||||||
|
}
|
||||||
|
|
||||||
|
// 滚动到指定区块
|
||||||
|
const scrollToSection = (id) => {
|
||||||
|
const el = document.getElementById(id)
|
||||||
|
if (el) el.scrollIntoView({ behavior: 'smooth', block: 'start' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加导航到登录页面的方法
|
// 添加导航到登录页面的方法
|
||||||
@@ -1650,6 +1599,15 @@ if (
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 右上角浮动用户操作区 */
|
||||||
|
.user-actions-floating {
|
||||||
|
position: relative;
|
||||||
|
z-index: 100;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
/* 顶部区域样式 */
|
/* 顶部区域样式 */
|
||||||
.top-bar {
|
.top-bar {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -3659,4 +3617,18 @@ if (
|
|||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
box-shadow: 0 5px 15px rgba(0, 67, 248, 0.3);
|
box-shadow: 0 5px 15px rgba(0, 67, 248, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ============ 新增纵向五区块样式 ============ */
|
||||||
|
.home { width:100%; flex:1; background: var(--bg-primary, #FFFFFF); padding: 0; color: var(--text-primary, #111827); min-height:100vh; }
|
||||||
|
.main-content { max-width: 1200px; margin: 0 auto; padding: 24px 16px 32px; }
|
||||||
|
.hero-block { padding: 48px 0 24px; display: flex; flex-direction: column; gap: 32px; }
|
||||||
|
@media (min-width: 1024px) { .hero-block { flex-direction: row; align-items: center; justify-content: space-between; } }
|
||||||
|
.hero-title { font-size: 44px; font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 12px; }
|
||||||
|
.hero-subtitle { font-size: 18px; color: var(--text-secondary, #4B5563); font-weight: 500; margin-bottom: 24px; }
|
||||||
|
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
|
||||||
|
.status-info { display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--bg-secondary, #F9FAFB); border: 1px solid var(--border-primary, #E5E7EB); border-radius: 8px; font-size: 13px; color: var(--text-secondary); font-weight: 500; }
|
||||||
|
.content-block { padding: 28px 0; border-top: 1px solid var(--border-primary, #E5E7EB); }
|
||||||
|
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
|
||||||
|
.section-header h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
|
||||||
|
.section-header .sub { font-size: 13px; color: var(--text-tertiary, #6B7280); font-weight: 500; cursor: pointer; }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user