You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

1233 lines
38 KiB

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=375, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>青核 Youthome - 我的动态</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="../colors_and_type.css">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
:root {
/* Traework 设计令牌 - 圆角/间距/阴影/高度 */
--radius-xs: 4px;
--radius-sm: 8px;
--radius-md: 12px;
--radius-lg: 16px;
--radius-xl: 20px;
--radius-full: 9999px;
--height-btn: 44px;
--height-input: 44px;
--height-nav: 64px;
--space-1: 4px;
--space-2: 8px;
--space-3: 12px;
--space-4: 16px;
--space-5: 20px;
--space-6: 24px;
--shadow-card: 0 2px 12px rgba(0, 0, 0, 0.04);
--shadow-card-hover: 0 6px 20px rgba(0, 0, 0, 0.06);
--shadow-btn: 0 2px 8px rgba(38, 194, 187, 0.25);
--shadow-btn-hover: 0 4px 16px rgba(38, 194, 187, 0.35);
--shadow-modal: 0 16px 48px rgba(0, 0, 0, 0.12);
--shadow-float: 0 4px 24px rgba(0, 0, 0, 0.08);
--shadow-inset: inset 0 1px 3px rgba(0, 0, 0, 0.03);
--glass-bg: rgba(255, 255, 255, 0.72);
--glass-blur: blur(20px);
--glass-border: rgba(255, 255, 255, 0.3);
}
html, body {
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'SF Pro Display', 'Helvetica Neue', 'Segoe UI', Roboto, sans-serif;
background: var(--youth-bg-page);
color: var(--youth-text-primary);
min-height: 100vh;
overflow-x: hidden;
}
.app-container {
width: 375px;
height: 812px;
margin: 0 auto;
background: var(--youth-bg-page);
position: relative;
overflow: hidden;
display: flex;
flex-direction: column;
}
/* ===== 状态栏 ===== */
.status-bar {
height: 24px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 16px;
font-size: 12px;
font-weight: 600;
color: var(--youth-text-primary);
position: relative;
z-index: 10;
flex-shrink: 0;
}
.status-bar .right-icons {
display: flex;
align-items: center;
gap: 5px;
}
.status-bar svg {
width: 13px;
height: 13px;
}
/* ===== 导航栏 ===== */
.nav-bar {
height: 64px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 12px;
position: relative;
flex-shrink: 0;
}
.nav-btn {
width: 34px;
height: 34px;
display: flex;
align-items: center;
justify-content: center;
border-radius: var(--youth-radius-lg);
background: var(--youth-bg-card);
border: 1px solid var(--youth-border-light);
box-shadow: var(--shadow-card), var(--youth-inset-soft);
cursor: pointer;
transition: all 0.2s ease;
color: var(--youth-text-primary);
}
.nav-btn:active {
transform: scale(0.95);
box-shadow: var(--youth-inset-soft);
}
.nav-title {
font-size: 15px;
font-weight: 600;
color: var(--youth-text-primary);
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.nav-right-group {
display: flex;
align-items: center;
gap: 6px;
}
/* ===== 内容滚动区 ===== */
.content-scroll {
flex: 1;
overflow: hidden;
-webkit-overflow-scrolling: touch;
padding-bottom: 4px;
}
.content-scroll::-webkit-scrollbar {
display: none;
}
/* ===== 数据概览卡片 ===== */
.stats-card {
margin: 10px 14px 12px;
background: var(--youth-gradient-card);
border-radius: 16px;
padding: 14px 12px;
box-shadow: var(--youth-shadow-lg);
border: 1px solid var(--youth-border-light);
position: relative;
overflow: hidden;
}
.stats-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 1px;
background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
pointer-events: none;
}
.stats-row {
display: flex;
align-items: center;
justify-content: space-around;
}
.stat-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
flex: 1;
position: relative;
}
.stat-item:not(:last-child)::after {
content: '';
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
width: 1px;
height: 28px;
background: var(--youth-border-light);
}
.stat-number {
font-size: 22px;
font-weight: 700;
line-height: 1.1;
letter-spacing: -0.02em;
}
.stat-number.primary { color: var(--youth-primary-500); }
.stat-number.warning { color: #FFB980; }
.stat-number.error { color: #D49090; }
.stat-label {
font-size: 11px;
color: var(--youth-muted-foreground);
font-weight: 500;
}
/* ===== 分段Tab控件 ===== */
.segment-tabs {
margin: 0 14px 12px;
background: var(--youth-secondary);
border-radius: var(--youth-radius-full);
padding: 3px;
display: flex;
align-items: center;
box-shadow: var(--youth-inset-soft);
border: 1px solid var(--youth-border-light);
position: relative;
}
.segment-tab {
flex: 1;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
gap: 4px;
font-size: 12px;
font-weight: 500;
color: var(--youth-muted-foreground);
border-radius: var(--youth-radius-full);
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
z-index: 1;
user-select: none;
}
.segment-tab.active {
color: white;
font-weight: 600;
box-shadow: var(--shadow-card);
}
.segment-tab.active.approved {
background: linear-gradient(135deg, #54CAC5 0%, #26C2BB 100%);
}
.segment-tab.active.pending {
background: linear-gradient(135deg, #FFC58A 0%, #FFB980 100%);
}
.segment-tab.active.rejected {
background: linear-gradient(135deg, #E8B0B0 0%, #D49090 100%);
}
.segment-tab .tab-count {
font-size: 11px;
font-weight: 600;
min-width: 18px;
height: 16px;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 16px;
padding: 0 5px;
background: var(--youth-gray-200);
color: var(--youth-muted-foreground);
}
.segment-tab.active .tab-count {
background: rgba(255, 255, 255, 0.25);
color: white;
}
/* ===== 动态卡片 ===== */
.post-list {
padding: 0 14px;
display: flex;
flex-direction: column;
gap: 10px;
}
.post-card {
background: var(--youth-gradient-card);
border-radius: 12px;
padding: 12px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
border: 1px solid var(--youth-border-light);
position: relative;
overflow: hidden;
}
.post-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 1px;
background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
pointer-events: none;
}
.post-card-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 8px;
}
/* 状态胶囊标签 */
.status-pill {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 4px 10px;
border-radius: var(--youth-radius-full);
font-size: 11px;
font-weight: 600;
color: white;
position: relative;
overflow: hidden;
}
.status-pill::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 50%;
background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
pointer-events: none;
}
.status-pill svg {
width: 10px;
height: 10px;
position: relative;
z-index: 1;
}
.status-pill span {
position: relative;
z-index: 1;
}
.status-pill.pending {
background: linear-gradient(135deg, #FFC58A 0%, #FFB980 100%);
box-shadow: 0 2px 8px rgba(255, 185, 128, 0.3);
}
.status-pill.approved {
background: linear-gradient(135deg, #54CAC5 0%, #26C2BB 100%);
box-shadow: 0 2px 8px rgba(38, 194, 187, 0.3);
}
.status-pill.rejected {
background: linear-gradient(135deg, #E8B0B0 0%, #D49090 100%);
box-shadow: 0 2px 8px rgba(212, 144, 144, 0.3);
}
.status-pill .spin-icon {
animation: spin 1.5s linear infinite;
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.post-time {
font-size: 11px;
color: var(--youth-muted-foreground);
}
/* 动态内容 */
.post-content {
display: flex;
gap: 10px;
margin-bottom: 8px;
}
.post-thumbnail {
width: 56px;
height: 56px;
border-radius: var(--youth-radius-lg);
flex-shrink: 0;
overflow: hidden;
position: relative;
}
.post-thumb-1 {
background: linear-gradient(135deg, #7ED6D2 0%, #26C2BB 50%, #198A85 100%);
}
.post-thumb-2 {
background: linear-gradient(135deg, #FFD8A8 0%, #FFB980 50%, #E8A06B 100%);
}
.post-thumb-3 {
background: linear-gradient(135deg, #A5E3E0 0%, #54CAC5 50%, #26C2BB 100%);
}
.post-thumb-4 {
background: linear-gradient(135deg, #F5C8C8 0%, #E8A0A0 50%, #D49090 100%);
}
.post-thumb-icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 22px;
opacity: 0.9;
}
.post-text {
flex: 1;
font-size: 12px;
line-height: 1.4;
color: var(--youth-text-primary);
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* 审核信息 */
.review-info {
display: flex;
align-items: center;
gap: 5px;
font-size: 11px;
color: var(--youth-muted-foreground);
margin-bottom: 8px;
padding: 6px 10px;
background: var(--youth-secondary);
border-radius: var(--youth-radius-lg);
}
.review-info svg {
width: 12px;
height: 12px;
color: var(--youth-primary);
flex-shrink: 0;
}
/* 数据统计行 */
.post-stats {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 8px;
padding: 7px 10px;
background: var(--youth-secondary);
border-radius: var(--youth-radius-lg);
}
.post-stat-item {
display: flex;
align-items: center;
gap: 3px;
font-size: 11px;
color: var(--youth-muted-foreground);
}
.post-stat-item svg {
width: 12px;
height: 12px;
}
/* 底部操作 */
.post-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 6px;
padding-top: 8px;
border-top: 1px solid var(--youth-border-light);
}
.action-btn {
padding: 6px 12px;
border-radius: var(--youth-radius-full);
font-size: 11px;
font-weight: 500;
border: none;
cursor: pointer;
transition: all 0.2s ease;
font-family: inherit;
}
.action-btn:active {
transform: scale(0.96);
}
.action-btn.ghost {
background: transparent;
color: var(--youth-muted-foreground);
}
.action-btn.ghost:active {
color: var(--youth-text-primary);
}
.action-btn.secondary {
background: var(--youth-secondary);
color: var(--youth-secondary-foreground);
border: 1px solid var(--youth-border-light);
}
.action-btn.primary-outline {
background: var(--youth-accent);
color: var(--youth-primary);
border: 1px solid var(--youth-primary-200);
}
.action-btn.danger {
background: transparent;
color: #D49090;
}
.action-btn.danger:active {
color: #E8B0B0;
}
.action-btn.primary {
background: var(--youth-gradient-primary);
color: white;
box-shadow: 0 2px 8px rgba(38, 194, 187, 0.3);
position: relative;
overflow: hidden;
}
.action-btn.primary::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 50%;
background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 100%);
pointer-events: none;
}
/* ===== 驳回原因卡片 ===== */
.reject-reason-card {
margin: 8px 0;
padding: 10px;
background: linear-gradient(135deg, rgba(212, 144, 144, 0.1) 0%, rgba(232, 176, 176, 0.06) 100%);
border: 1px solid rgba(212, 144, 144, 0.2);
border-radius: var(--youth-radius-lg);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
}
.reject-reason-header {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 6px;
}
.reject-icon-wrap {
width: 24px;
height: 24px;
border-radius: 50%;
background: linear-gradient(135deg, #E8B0B0 0%, #D49090 100%);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.reject-icon-wrap svg {
width: 12px;
height: 12px;
color: white;
}
.reject-title {
font-size: 12px;
font-weight: 600;
color: #D49090;
flex: 1;
}
.reject-admin-avatar {
width: 20px;
height: 20px;
border-radius: 50%;
background: linear-gradient(135deg, #F0C0C0 0%, #E8B0B0 100%);
display: flex;
align-items: center;
justify-content: center;
font-size: 9px;
color: white;
font-weight: 600;
}
.reject-reason-text {
font-size: 11px;
line-height: 1.4;
color: var(--youth-text-primary);
margin-bottom: 5px;
padding-left: 30px;
}
.reject-time {
font-size: 10px;
color: var(--youth-muted-foreground);
padding-left: 30px;
}
/* ===== 空状态 ===== */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 30px 20px;
text-align: center;
}
.empty-icon {
width: 60px;
height: 60px;
border-radius: 50%;
background: var(--youth-secondary);
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 12px;
box-shadow: var(--youth-inset-soft);
}
.empty-icon svg {
width: 28px;
height: 28px;
color: var(--youth-muted-foreground);
}
.empty-title {
font-size: 14px;
font-weight: 600;
color: var(--youth-text-primary);
margin-bottom: 4px;
}
.empty-desc {
font-size: 12px;
color: var(--youth-muted-foreground);
line-height: 1.4;
}
/* ===== 列表内容区(Tab切换) ===== */
.tab-content {
display: none;
}
.tab-content.active {
display: block;
animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(4px); }
to { opacity: 1; transform: translateY(0); }
}
.list-section-title {
font-size: 12px;
font-weight: 600;
color: var(--youth-muted-foreground);
margin: 0 14px 8px;
display: flex;
align-items: center;
gap: 5px;
}
.list-section-title::before {
content: '';
width: 3px;
height: 12px;
border-radius: 2px;
background: var(--youth-gradient-primary);
}
/* ===== 底部Tab导航 ===== */
.bottom-nav {
height: 64px;
flex-shrink: 0;
background: var(--youth-glass-bg);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border-top: 1px solid var(--youth-border-light);
display: flex;
align-items: flex-start;
justify-content: space-around;
padding: 6px 0 0;
position: relative;
z-index: 20;
}
.bottom-tab {
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
padding: 3px 10px;
cursor: pointer;
transition: all 0.2s ease;
color: var(--youth-muted-foreground);
user-select: none;
}
.bottom-tab:active {
transform: scale(0.92);
}
.bottom-tab.active {
color: var(--youth-primary);
}
.bottom-tab svg {
width: 20px;
height: 20px;
}
.bottom-tab .tab-label {
font-size: 9px;
font-weight: 500;
}
.bottom-tab.active .tab-label {
font-weight: 600;
}
.bg-decoration-2 {
position: absolute;
bottom: 100px;
left: -80px;
width: 160px;
height: 160px;
background: radial-gradient(circle, rgba(255, 185, 128, 0.08) 0%, transparent 70%);
border-radius: 50%;
pointer-events: none;
z-index: 0;
}
.content-wrap {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
}
/* SVG 图标统一尺寸 */
.icon-svg {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1em;
height: 1em;
vertical-align: middle;
line-height: 1;
}
.icon-svg svg {
width: 100%;
height: 100%;
stroke: currentColor;
}
/* 侧栏图标 */
.sidebar-icon .icon-svg { width: 22px; height: 22px; font-size: 22px; }
/* 社团logo图标 */
.club-logo .icon-svg { width: 28px; height: 28px; font-size: 28px; color: #fff; }
/* 头图大图标 */
.hero-icon .icon-svg { width: 56px; height: 56px; font-size: 56px; opacity: 0.3; }
/* meta 小图标 */
.club-meta .icon-svg { width: 12px; height: 12px; font-size: 12px; }
/* 分类选择网格图标 */
.cat-option .icon-svg { width: 26px; height: 26px; font-size: 26px; }
/* logo预览图标 */
.logo-preview .icon-svg { width: 40px; height: 40px; font-size: 40px; color: #fff; }
/* 提示图标 */
.notice-icon .icon-svg { width: 18px; height: 18px; font-size: 18px; }
</style>
</head>
<body>
<div class="app-container" id="page-my-posts">
<!-- 背景装饰 -->
<div class="bg-decoration"></div>
<div class="bg-decoration-2"></div>
<div class="content-wrap">
<!-- 状态栏 -->
<div class="status-bar">
<span>9:41</span>
<div class="right-icons">
<svg viewBox="0 0 24 24" fill="currentColor">
<path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3c-1.65-1.66-4.34-1.66-6 0zm-4-4l2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13z"></path>
</svg>
<svg viewBox="0 0 24 24" fill="currentColor">
<path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4z"></path>
</svg>
</div>
</div>
<!-- 导航栏 -->
<div class="nav-bar">
<button class="nav-btn" data-dom-id="btn-back" onclick="goBack()">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<polyline points="15 18 9 12 15 6"></polyline>
</svg>
</button>
<span class="nav-title">我的动态</span>
<div class="nav-right-group">
<button class="nav-btn" data-dom-id="btn-drafts" onclick="goToDrafts()" style="position: relative;">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path>
<polyline points="14 2 14 8 20 8"></polyline>
<line x1="16" y1="13" x2="8" y2="13"></line>
<line x1="16" y1="17" x2="8" y2="17"></line>
</svg>
</button>
</div>
</div>
<!-- 内容滚动区 -->
<div class="content-scroll">
<!-- 数据概览卡片 -->
<div class="stats-card">
<div class="stats-row">
<div class="stat-item">
<span class="stat-number primary">12</span>
<span class="stat-label">已发布</span>
</div>
<div class="stat-item">
<span class="stat-number warning">2</span>
<span class="stat-label">审核中</span>
</div>
<div class="stat-item">
<span class="stat-number error">1</span>
<span class="stat-label">已驳回</span>
</div>
</div>
</div>
<!-- 分段Tab -->
<div class="segment-tabs">
<div class="segment-tab approved" data-dom-id="tab-approved" data-tab="approved" onclick="switchTab('approved')">
已通过
<span class="tab-count">12</span>
</div>
<div class="segment-tab pending active" data-dom-id="tab-pending" data-tab="pending" onclick="switchTab('pending')">
待审核
<span class="tab-count">2</span>
</div>
<div class="segment-tab rejected" data-dom-id="tab-rejected" data-tab="rejected" onclick="switchTab('rejected')">
已驳回
<span class="tab-count">1</span>
</div>
</div>
<!-- 待审核列表 -->
<div class="tab-content active" id="content-pending">
<div class="post-list">
<!-- 待审核卡片1 -->
<div class="post-card" data-dom-id="card-pending-1">
<div class="post-card-header">
<div class="status-pill pending">
<svg class="spin-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 12a9 9 0 1 1-6.219-8.56"></path>
</svg>
<span>审核中</span>
</div>
<span class="post-time">2小时前提交</span>
</div>
<div class="post-content">
<div class="post-thumbnail post-thumb-1">
</div>
<div class="post-text">今天在图书馆偶遇了一只超可爱的橘猫,它居然趴在我书包上睡着了,简直是今日份的治愈系暴击!有没有同样喜欢撸猫的小伙伴呀~</div>
</div>
<div class="review-info">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"></circle>
<polyline points="12 6 12 12 16 14"></polyline>
</svg>
预计30分钟内完成审核
</div>
<div class="post-actions">
<button class="action-btn ghost" data-dom-id="btn-withdraw-1" onclick="handleWithdraw(1)">撤回</button>
</div>
</div>
<!-- 待审核卡片2 -->
<div class="post-card" data-dom-id="card-pending-2">
<div class="post-card-header">
<div class="status-pill pending">
<svg class="spin-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 12a9 9 0 1 1-6.219-8.56"></path>
</svg>
<span>审核中</span>
</div>
<span class="post-time">刚刚提交</span>
</div>
<div class="post-content">
<div class="post-thumbnail post-thumb-2">
</div>
<div class="post-text">食堂新出的麻辣香锅也太香了吧!15块钱满满一大碗,料超足,强烈推荐三楼左边第二家,阿姨手从来不抖的那种!</div>
</div>
<div class="review-info">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"></circle>
<polyline points="12 6 12 12 16 14"></polyline>
</svg>
预计1小时内完成审核
</div>
<div class="post-actions">
<button class="action-btn ghost" onclick="handleWithdraw(2)">撤回</button>
</div>
</div>
</div>
<!-- 空状态提示 -->
<div class="empty-state" style="display: none;">
<div class="empty-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path>
<polyline points="14 2 14 8 20 8"></polyline>
<line x1="9" y1="15" x2="15" y2="15"></line>
</svg>
</div>
<div class="empty-title">暂无待审核动态</div>
<div class="empty-desc">去发布你的第一条动态吧</div>
</div>
</div>
<!-- 已通过列表 -->
<div class="tab-content" id="content-approved">
<div class="list-section-title">已发布动态</div>
<div class="post-list">
<!-- 已通过卡片1 -->
<div class="post-card" data-dom-id="card-approved-1">
<div class="post-card-header">
<div class="status-pill approved">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
<polyline points="20 6 9 17 4 12"></polyline>
</svg>
<span>已通过</span>
</div>
<span class="post-time">3天前</span>
</div>
<div class="post-content">
<div class="post-thumbnail post-thumb-3">
<span class="post-thumb-icon">🌅</span>
</div>
<div class="post-text">周末和室友一起去爬山看日出,虽然凌晨四点就起床了,但山顶的风景真的值得!分享给你们这组治愈系照片~</div>
</div>
<div class="post-stats">
<div class="post-stat-item">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path>
</svg>
128
</div>
<div class="post-stat-item">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
</svg>
36
</div>
<div class="post-stat-item">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>
</svg>
24
</div>
</div>
<div class="post-actions">
<button class="action-btn danger" data-dom-id="btn-delete-approved" onclick="handleDelete('approved', 1)">删除</button>
<button class="action-btn secondary" onclick="handleTop(1)">置顶</button>
<button class="action-btn primary-outline" data-dom-id="btn-edit-approved" onclick="handleEdit(1)">编辑</button>
</div>
</div>
</div>
<!-- 空状态提示 -->
<div class="empty-state" style="display: none;">
<div class="empty-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path>
<polyline points="22 4 12 14.01 9 11.01"></polyline>
</svg>
</div>
<div class="empty-title">还没有已通过的动态</div>
<div class="empty-desc">发布的动态通过审核后会显示在这里</div>
</div>
</div>
<!-- 已驳回列表 -->
<div class="tab-content" id="content-rejected">
<div class="post-list">
<!-- 已驳回卡片1 -->
<div class="post-card" data-dom-id="card-rejected-1">
<div class="post-card-header">
<div class="status-pill rejected">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
<span>已驳回</span>
</div>
<span class="post-time">今天 14:30</span>
</div>
<div class="post-content">
<div class="post-thumbnail post-thumb-4">
<span class="post-thumb-icon"><span class="icon-svg icon-target"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><circle cx="12" cy="12" r="6"/><circle cx="12" cy="12" r="2"/></svg></span></span>
</div>
<div class="post-text">【代取快递】有偿代取快递,小件3元大件5元,送到宿舍楼下,有需要的同学私我~长期接单,信誉保证!</div>
</div>
<!-- 驳回原因卡片 -->
<div class="reject-reason-card">
<div class="reject-reason-header">
<div class="reject-icon-wrap">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path>
<line x1="12" y1="9" x2="12" y2="13"></line>
<line x1="12" y1="17" x2="12.01" y2="17"></line>
</svg>
</div>
<span class="reject-title">驳回原因</span>
<div class="reject-admin-avatar">管</div>
</div>
<div class="reject-reason-text">动态内容包含违规信息,请修改后重新发布。平台禁止发布商业广告及有偿服务类信息。</div>
<div class="reject-time">驳回时间:今天 14:30</div>
</div>
<div class="post-actions">
<button class="action-btn danger" data-dom-id="btn-delete-rejected" onclick="handleDelete('rejected', 1)">删除</button>
<button class="action-btn primary" data-dom-id="btn-reedit" onclick="handleReedit(1)">重新编辑</button>
</div>
</div>
</div>
<!-- 空状态提示 -->
<div class="empty-state" style="display: none;">
<div class="empty-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"></circle>
<polyline points="12 6 12 12 16 14"></polyline>
</svg>
</div>
<div class="empty-title">暂无被驳回的动态</div>
<div class="empty-desc">所有动态都已顺利通过审核啦</div>
</div>
</div>
<div style="height: 16px;"></div>
</div>
<!-- 底部Tab导航 -->
</div>
</div>
<script>// ===== 主题切换 =====
// 初始化主题
})();
// ===== 返回按钮 =====
function goBack() {
window.location.href = 'feed-home.html';
}
// ===== 草稿箱 =====
function goToDrafts() {
alert('跳转到草稿箱页面');
}
// ===== Tab切换 =====
let currentTab = 'pending';
function switchTab(tabName) {
if (currentTab === tabName) return;
// 更新分段Tab状态
const tabs = document.querySelectorAll('.segment-tab');
tabs.forEach(tab => {
const tabType = tab.getAttribute('data-tab');
tab.classList.remove('active');
if (tabType === tabName) {
tab.classList.add('active');
}
});
// 更新内容区显示
const contents = document.querySelectorAll('.tab-content');
contents.forEach(content => {
content.classList.remove('active');
});
const targetContent = document.getElementById('content-' + tabName);
if (targetContent) {
targetContent.classList.add('active');
}
currentTab = tabName;
// 滚动到顶部
const scrollEl = document.querySelector('.content-scroll');
if (scrollEl) {
scrollEl.scrollTop = 0;
}
}
// ===== 撤回动态 =====
function handleWithdraw(id) {
if (confirm('确定要撤回这条动态吗?撤回后可以重新编辑再提交。')) {
const card = document.querySelector(`[data-dom-id="card-pending-${id}"]`);
if (card) {
card.style.transition = 'all 0.3s ease';
card.style.opacity = '0';
card.style.transform = 'translateX(-20px)';
setTimeout(() => {
card.style.display = 'none';
checkEmptyState('pending');
}, 300);
}
}
}
// ===== 编辑动态 =====
function handleEdit(id) {
alert('跳转到编辑页面,带数据回填');
// window.location.href = 'post-edit.html?id=' + id;
}
// ===== 删除动态 =====
function handleDelete(type, id) {
if (confirm('确定要删除这条动态吗?删除后无法恢复。')) {
const card = document.querySelector(`[data-dom-id="card-${type}-${id}"]`);
if (card) {
card.style.transition = 'all 0.3s ease';
card.style.opacity = '0';
card.style.transform = 'translateX(-20px)';
setTimeout(() => {
card.style.display = 'none';
checkEmptyState(type);
}, 300);
}
}
}
// ===== 置顶动态 =====
function handleTop(id) {
alert('动态已置顶');
}
// ===== 重新编辑(驳回后) =====
function handleReedit(id) {
alert('跳转到发布页,带回驳回内容的数据回填');
// window.location.href = 'post-create.html?reedit=' + id;
}
// ===== 检查空状态 =====
function checkEmptyState(tabName) {
const content = document.getElementById('content-' + tabName);
if (!content) return;
const cards = content.querySelectorAll('.post-card');
let visibleCount = 0;
cards.forEach(card => {
if (card.style.display !== 'none') {
visibleCount++;
}
});
const emptyState = content.querySelector('.empty-state');
const postList = content.querySelector('.post-list');
const sectionTitle = content.querySelector('.list-section-title');
if (visibleCount === 0) {
if (emptyState) emptyState.style.display = 'flex';
if (postList) postList.style.display = 'none';
if (sectionTitle) sectionTitle.style.display = 'none';
}
}
// ===== 底部Tab切换 =====
function switchBottomTab(tabName) {
const tabs = document.querySelectorAll('.bottom-tab');
tabs.forEach(tab => tab.classList.remove('active'));
const activeTab = document.querySelector(`[data-dom-id="tab-${tabName}"]`);
if (activeTab) {
activeTab.classList.add('active');
}
// 模拟页面跳转
const pageMap = {
'home': 'feed-home.html',
'activity': 'activity-list.html',
'message': '#',
'discover': 'campus-radar.html',
'profile': 'profile-work.html'
};
if (tabName !== 'profile' && pageMap[tabName] && pageMap[tabName] !== '#') {
// 当前是"我的"页,点击其他tab则跳转
// window.location.href = pageMap[tabName];
}
}</script>
</body>
</html>