Files
AIGC/demo/frontend/src/views/Profile.vue

534 lines
9.8 KiB
Vue
Raw Normal View History

2025-10-21 16:50:33 +08:00
<template>
<div class="profile-page">
<!-- 左侧导航栏 -->
<aside class="sidebar">
<!-- Logo -->
<div class="logo">logo</div>
<!-- 导航菜单 -->
<nav class="nav-menu">
<div class="nav-item active">
<el-icon><User /></el-icon>
<span>个人主页</span>
</div>
<div class="nav-item">
<el-icon><Compass /></el-icon>
<span @click="goToSubscription">会员订阅</span>
</div>
<div class="nav-item">
<el-icon><Document /></el-icon>
<span>我的作品</span>
</div>
</nav>
<!-- 工具分隔线 -->
<div class="divider">
<span>工具</span>
</div>
<!-- 工具菜单 -->
<nav class="tools-menu">
<div class="nav-item">
<el-icon><Document /></el-icon>
<span>文生视频</span>
</div>
<div class="nav-item">
<el-icon><Picture /></el-icon>
<span>图生视频</span>
</div>
<div class="nav-item">
<el-icon><VideoPlay /></el-icon>
<span>分镜视频</span>
<el-tag size="small" type="primary" class="sora-tag">Sora2.0</el-tag>
</div>
</nav>
</aside>
<!-- 主内容区域 -->
<main class="main-content">
<!-- 顶部栏 -->
<header class="top-header">
<div class="header-right">
<div class="points">
<el-icon><Star /></el-icon>
<span>25 | 首购优惠</span>
</div>
<div class="notifications">
<el-icon><Bell /></el-icon>
<div class="notification-dot"></div>
</div>
<div class="user-status">
<div class="status-icon"></div>
</div>
</div>
</header>
<!-- 用户资料区域 -->
<section class="profile-section">
<div class="profile-info">
<div class="avatar">
<div class="avatar-icon"></div>
</div>
<div class="user-details">
<h2 class="username">mingzi_FBx7foZYDS7inLQb</h2>
<p class="profile-status">还没有设置个人简介,点击填写</p>
<p class="user-id">ID 2994509784706419</p>
</div>
<el-button class="edit-btn">编辑资料</el-button>
</div>
</section>
<!-- 已发布内容 -->
<section class="published-section">
<h3 class="section-title">已发布</h3>
<div class="video-grid">
<div class="video-item" v-for="(video, index) in videos" :key="index">
<div class="video-thumbnail">
<div class="thumbnail-image">
<div class="figure"></div>
<div class="text-overlay">What Does it Mean To You</div>
</div>
<div class="video-action">
<el-button v-if="index === 0" type="primary" size="small">做同款</el-button>
<span v-else class="director-text">DIRECTED BY VANNOCENT</span>
</div>
</div>
</div>
</div>
</section>
</main>
</div>
</template>
<script setup>
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import {
User,
Compass,
Document,
Picture,
VideoPlay,
Star,
Bell
} from '@element-plus/icons-vue'
const router = useRouter()
// 模拟视频数据
const videos = ref(Array(6).fill({}))
// 跳转到会员订阅页面
const goToSubscription = () => {
router.push('/subscription')
}
</script>
<style scoped>
.profile-page {
min-height: 100vh;
background: #0a0a0a;
color: white;
display: flex;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
position: relative;
}
/* 页面特殊效果 */
.profile-page::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background:
radial-gradient(circle at 10% 20%, rgba(64, 158, 255, 0.1) 0%, transparent 50%),
radial-gradient(circle at 90% 80%, rgba(103, 194, 58, 0.1) 0%, transparent 50%),
radial-gradient(circle at 50% 50%, rgba(230, 162, 60, 0.05) 0%, transparent 50%);
animation: profileGlow 6s ease-in-out infinite alternate;
pointer-events: none;
z-index: 1;
}
@keyframes profileGlow {
0% { opacity: 0.3; }
100% { opacity: 0.6; }
}
/* 内容层级 */
.profile-page > * {
position: relative;
z-index: 2;
}
/* 左侧导航栏 */
.sidebar {
width: 240px;
background: #1a1a1a;
padding: 20px 0;
border-right: 1px solid #333;
}
.logo {
padding: 0 20px 30px;
font-size: 18px;
font-weight: 500;
color: white;
}
.nav-menu, .tools-menu {
padding: 0 20px;
}
.nav-item {
display: flex;
align-items: center;
padding: 12px 16px;
margin-bottom: 4px;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
position: relative;
}
.nav-item:hover {
background: #2a2a2a;
}
.nav-item.active {
background: #1e3a8a;
}
.nav-item .el-icon {
margin-right: 12px;
font-size: 18px;
}
.nav-item span {
font-size: 14px;
flex: 1;
}
.sora-tag {
margin-left: 8px;
font-size: 10px;
padding: 2px 6px;
}
.divider {
margin: 30px 20px 20px;
padding: 0 16px;
color: #666;
font-size: 12px;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 1px;
}
/* 主内容区域 */
.main-content {
flex: 1;
padding: 0;
}
/* 顶部栏 */
.top-header {
padding: 20px 30px;
border-bottom: 1px solid #333;
display: flex;
justify-content: flex-end;
}
.header-right {
display: flex;
align-items: center;
gap: 20px;
}
.points {
display: flex;
align-items: center;
gap: 8px;
color: #409EFF;
font-size: 14px;
font-weight: 500;
}
.notifications {
position: relative;
cursor: pointer;
}
.notification-dot {
position: absolute;
top: -2px;
right: -2px;
width: 8px;
height: 8px;
background: #ff4757;
border-radius: 50%;
}
.user-status {
width: 32px;
height: 32px;
border: 2px solid #409EFF;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.status-icon {
width: 12px;
height: 12px;
background: white;
border-radius: 2px;
}
/* 用户资料区域 */
.profile-section {
padding: 30px;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
margin: 20px 30px;
border-radius: 12px;
border: 1px solid #333;
position: relative;
}
.profile-section::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at 50% 50%, rgba(64, 158, 255, 0.1) 0%, transparent 70%);
border-radius: 12px;
pointer-events: none;
}
.profile-info {
display: flex;
align-items: center;
gap: 20px;
position: relative;
z-index: 1;
}
.avatar {
width: 80px;
height: 80px;
border-radius: 50%;
background: #409EFF;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.avatar-icon {
width: 40px;
height: 40px;
background: #1a1a2e;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.avatar-icon::before {
content: '';
width: 16px;
height: 16px;
background: white;
border-radius: 2px;
}
.user-details {
flex: 1;
}
.username {
font-size: 24px;
font-weight: 600;
margin: 0 0 8px 0;
color: white;
}
.profile-status {
font-size: 14px;
color: #999;
margin: 0 0 4px 0;
}
.user-id {
font-size: 12px;
color: #666;
margin: 0;
}
.edit-btn {
background: #2a2a2a;
border: 1px solid #444;
color: white;
padding: 10px 20px;
border-radius: 6px;
font-size: 14px;
}
.edit-btn:hover {
background: #3a3a3a;
border-color: #555;
}
/* 已发布内容 */
.published-section {
padding: 0 30px 30px;
}
.section-title {
font-size: 20px;
font-weight: 600;
margin: 0 0 20px 0;
color: white;
position: relative;
padding-bottom: 8px;
}
.section-title::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 40px;
height: 3px;
background: #1e3a8a;
border-radius: 2px;
}
.video-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
}
.video-item {
background: #1a1a1a;
border-radius: 8px;
overflow: hidden;
border: 1px solid #333;
transition: all 0.3s ease;
}
.video-item:hover {
transform: translateY(-2px);
border-color: #444;
}
.video-thumbnail {
position: relative;
}
.thumbnail-image {
height: 200px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.figure {
width: 80px;
height: 80px;
background: rgba(255, 255, 255, 0.2);
border-radius: 50%;
position: relative;
}
.figure::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 40px;
height: 40px;
background: rgba(255, 255, 255, 0.3);
border-radius: 50%;
}
.text-overlay {
position: absolute;
top: 20px;
left: 20px;
right: 20px;
color: white;
font-size: 14px;
font-weight: 500;
text-align: center;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.video-action {
padding: 15px;
text-align: center;
opacity: 0;
transition: opacity 0.2s ease;
}
.video-item:hover .video-action {
opacity: 1;
}
.director-text {
font-size: 12px;
color: #999;
}
/* 响应式设计 */
@media (max-width: 1200px) {
.video-grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 768px) {
.profile-page {
flex-direction: column;
}
.sidebar {
width: 100%;
height: auto;
}
.nav-menu, .tools-menu {
display: flex;
overflow-x: auto;
padding: 0 20px;
}
.nav-item {
white-space: nowrap;
margin-right: 10px;
}
.video-grid {
grid-template-columns: 1fr;
}
.profile-info {
flex-direction: column;
text-align: center;
}
}
</style>