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.
692 lines
22 KiB
692 lines
22 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>
|
|
<link rel="stylesheet" href="../colors_and_type.css">
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<style>
|
|
:root {
|
|
--youth-primary: #26C2BB;
|
|
--youth-primary-light: #54CAC5;
|
|
--primary-bg: #E6F7F6;
|
|
--primary-border: #B3E8E4;
|
|
--bg-page: #F7F8FA;
|
|
--bg-card: #FFFFFF;
|
|
--text-title: #1F1F1F;
|
|
--text-body: #595959;
|
|
--text-muted: #8C8C8C;
|
|
--youth-border-light: #E8E8E8;
|
|
--tag-bg: #F0F1F3;
|
|
--danger: #F5222D;
|
|
--danger-bg: #FFE8E8;
|
|
--icon-bg: #F0F1F3;
|
|
--icon-color: #BFBFBF;
|
|
--btn-gradient: linear-gradient(135deg, #54CAC5 0%, #26C2BB 50%, #1FA8A2 100%);
|
|
|
|
/* =====================================================
|
|
* 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-bottom: 64px;
|
|
|
|
/* 间距(4px 基础栅格) */
|
|
--space-1: 4px;
|
|
--space-2: 8px;
|
|
--space-3: 12px;
|
|
--space-4: 16px;
|
|
--space-5: 20px;
|
|
--space-6: 24px;
|
|
--space-page-x: 16px;
|
|
--space-card: 16px;
|
|
|
|
/* 柔和弥散阴影 */
|
|
--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.04);
|
|
--shadow-inset-focus: inset 0 1px 3px rgba(38, 194, 187, 0.08);
|
|
|
|
/* 毛玻璃 */
|
|
--glass-bg: rgba(255, 255, 255, 0.72);
|
|
--glass-blur: blur(20px);
|
|
--glass-border: rgba(255, 255, 255, 0.3);
|
|
|
|
}
|
|
|
|
* {
|
|
|
|
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'SF Pro Display', 'Helvetica Neue', sans-serif;
|
|
background: var(--youth-bg-page);
|
|
color: var(--youth-text-secondary);
|
|
min-height: 100vh;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
.page-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: 44px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 16px;
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
color: var(--youth-text-primary);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.status-bar .right-icons {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
/* 顶部导航 */
|
|
.top-nav {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 8px;
|
|
height: 44px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.nav-left, .nav-right {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.nav-btn {
|
|
width: 36px;
|
|
height: 36px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 50%;
|
|
color: var(--youth-text-primary);
|
|
cursor: pointer;
|
|
transition: background 0.2s ease;
|
|
border: none;
|
|
background: transparent;
|
|
}
|
|
|
|
.nav-btn:active {
|
|
background: var(--youth-border-light);
|
|
}
|
|
|
|
.nav-title {
|
|
font-size: 17px;
|
|
font-weight: 700;
|
|
color: var(--youth-text-primary);
|
|
}
|
|
|
|
/* 提示条 */
|
|
.tip-bar {
|
|
padding: 10px 16px;
|
|
background: var(--youth-primary-bg);
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 8px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.tip-bar svg {
|
|
color: var(--youth-primary);
|
|
margin-top: 1px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.tip-text {
|
|
font-size: 12px;
|
|
color: var(--youth-text-secondary);
|
|
line-height: 1.5;
|
|
flex: 1;
|
|
}
|
|
|
|
/* 列表区 */
|
|
.list-section {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
-webkit-overflow-scrolling: touch;
|
|
padding: 12px 16px 24px;
|
|
}
|
|
|
|
.list-section::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.list-count {
|
|
font-size: 12px;
|
|
color: var(--youth-text-tertiary);
|
|
margin-bottom: 10px;
|
|
padding: 0 2px;
|
|
}
|
|
|
|
/* 用户卡片 */
|
|
.user-card {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 14px 16px;
|
|
background: var(--youth-bg-card);
|
|
border-radius: 12px;
|
|
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
|
|
margin-bottom: 10px;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.user-card:active {
|
|
transform: scale(0.99);
|
|
}
|
|
|
|
.user-avatar-wrap {
|
|
position: relative;
|
|
flex-shrink: 0;
|
|
margin-right: 12px;
|
|
}
|
|
|
|
.user-avatar {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
.blocked-badge {
|
|
position: absolute;
|
|
bottom: -2px;
|
|
right: -2px;
|
|
width: 18px;
|
|
height: 18px;
|
|
border-radius: 50%;
|
|
background: var(--youth-danger-500);
|
|
border: 2px solid var(--youth-bg-card);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
.blocked-badge svg {
|
|
width: 10px;
|
|
height: 10px;
|
|
}
|
|
|
|
.user-info {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.user-name-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.user-name {
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
color: var(--youth-text-primary);
|
|
}
|
|
|
|
.user-school {
|
|
font-size: 12px;
|
|
color: var(--youth-text-tertiary);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
.user-school .dot {
|
|
width: 2px;
|
|
height: 2px;
|
|
background: var(--youth-text-tertiary);
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.block-time {
|
|
font-size: 11px;
|
|
color: var(--youth-text-tertiary);
|
|
margin-top: 3px;
|
|
}
|
|
|
|
/* 移出按钮 */
|
|
.unblock-btn {
|
|
height: 32px;
|
|
padding: 0 14px;
|
|
border: 1px solid var(--youth-border-light);
|
|
border-radius: 16px;
|
|
background: transparent;
|
|
color: var(--youth-text-secondary);
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
.unblock-btn:active {
|
|
background: var(--tag-bg);
|
|
border-color: var(--youth-text-tertiary);
|
|
}
|
|
|
|
/* 空状态 */
|
|
.empty-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 80px 24px;
|
|
}
|
|
|
|
.empty-icon {
|
|
width: 96px;
|
|
height: 96px;
|
|
border-radius: 50%;
|
|
background: var(--youth-bg-input);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--icon-color);
|
|
margin-bottom: 20px;
|
|
position: relative;
|
|
}
|
|
|
|
.empty-title {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: var(--youth-text-primary);
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.empty-desc {
|
|
font-size: 13px;
|
|
color: var(--youth-text-tertiary);
|
|
text-align: center;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
/* 状态切换演示按钮 */
|
|
.state-toggle {
|
|
position: absolute;
|
|
right: 16px;
|
|
bottom: 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
z-index: 10;
|
|
}
|
|
|
|
.toggle-btn {
|
|
height: 32px;
|
|
padding: 0 12px;
|
|
border-radius: 16px;
|
|
background: var(--youth-bg-card);
|
|
border: 1px solid var(--youth-border-light);
|
|
font-size: 12px;
|
|
color: var(--youth-text-secondary);
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
.toggle-btn:active {
|
|
transform: scale(0.96);
|
|
}
|
|
|
|
.toggle-btn.active {
|
|
background: var(--youth-primary);
|
|
border-color: var(--youth-primary);
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
|
|
/* 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="page-container" data-dom-id="page-container" id="page-container">
|
|
<!-- 状态栏 -->
|
|
<div class="status-bar">
|
|
<span>9:41</span>
|
|
<div class="right-icons">
|
|
<svg width="17" height="11" viewBox="0 0 17 11" fill="currentColor">
|
|
<rect x="0" y="7" width="3" height="4" rx="0.5"></rect>
|
|
<rect x="4.5" y="5" width="3" height="6" rx="0.5"></rect>
|
|
<rect x="9" y="2.5" width="3" height="8.5" rx="0.5"></rect>
|
|
<rect x="13.5" y="0" width="3" height="11" rx="0.5"></rect>
|
|
</svg>
|
|
<svg width="15" height="11" viewBox="0 0 15 11" fill="currentColor">
|
|
<path d="M7.5 1C5.3 1 3.2 1.7 1.5 3C-0.5 4.7 -0.5 7.5 1.5 9.2C1.9 9.6 2.5 9.6 2.9 9.2C3.3 8.8 3.3 8.2 2.9 7.8C1.6 6.5 1.6 4.4 2.9 3.1C4.2 1.8 6.3 1.4 8 2C10.1 2.7 11.7 4.4 12.2 6.5C12.5 7.3 12.4 8.1 11.8 8.7C11.4 9.1 11.4 9.7 11.8 10.1C12.2 10.5 12.8 10.5 13.2 10.1C14.2 9.1 14.5 7.7 14.2 6.3C13.6 4 12.1 2.3 10.2 1.3C9.3 1 8.4 0.9 7.5 1Z"></path>
|
|
<path d="M7.5 4.5C6 4.5 4.5 5 3.4 6.2C2.3 7.4 2 9 2.4 10.4C2.5 10.8 2.8 11 3.2 11C3.5 11 3.8 10.8 3.9 10.5C4.2 9.5 4.8 8.6 5.7 8C6.6 7.4 7.6 7.1 8.6 7.2C9.8 7.3 10.9 7.8 11.6 8.7C12.3 9.6 12.6 10.7 12.4 11.8L12.4 12C12.3 12.4 12.6 12.7 13 12.8C13.4 12.9 13.7 12.6 13.8 12.2C14.1 10.5 13.5 8.8 12.4 7.5C11.3 6.2 9.6 5.3 7.8 4.9L7.5 4.5Z"></path>
|
|
</svg>
|
|
<svg width="25" height="12" viewBox="0 0 25 12" fill="none">
|
|
<rect x="0.5" y="0.5" width="21" height="11" rx="2.5" stroke="currentColor" opacity="0.5"></rect>
|
|
<rect x="2" y="2" width="18" height="8" rx="1.5" fill="currentColor"></rect>
|
|
<rect x="22.5" y="4" width="1.5" height="4" rx="0.5" fill="currentColor" opacity="0.5"></rect>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 顶部导航 -->
|
|
<div class="top-nav">
|
|
<div class="nav-left">
|
|
<button class="nav-btn" data-dom-id="btn-back" onclick="goBack()">
|
|
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<polyline points="15 18 9 12 15 6"></polyline>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
<div class="nav-title">黑名单</div>
|
|
<div class="nav-right" style="width: 36px;"></div>
|
|
</div>
|
|
|
|
<!-- 提示条 -->
|
|
<div class="tip-bar">
|
|
<svg width="16" height="16" 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>
|
|
<line x1="12" y1="16" x2="12" y2="12"></line>
|
|
<line x1="12" y1="8" x2="12.01" y2="8"></line>
|
|
</svg>
|
|
<div class="tip-text">拉黑后对方将无法关注你、给你发消息或查看你的动态</div>
|
|
</div>
|
|
|
|
<!-- 列表区(有数据状态) -->
|
|
<div class="list-section" id="state-list" data-dom-id="state-list">
|
|
<div class="list-count">共 5 位拉黑用户</div>
|
|
|
|
<div class="user-card" data-dom-id="user-card-1">
|
|
<div class="user-avatar-wrap">
|
|
<div class="user-avatar" style="background: linear-gradient(135deg, #FFB0C7, #FF6B9D);">李</div>
|
|
<div class="blocked-badge">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
|
<circle cx="12" cy="12" r="10"></circle>
|
|
<line x1="4.93" y1="4.93" x2="19.07" y2="19.07"></line>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<div class="user-info">
|
|
<div class="user-name-row">
|
|
<span class="user-name">李雨桐</span>
|
|
</div>
|
|
<div class="user-school">
|
|
北京大学 <span class="dot"></span> 新闻与传播学院
|
|
</div>
|
|
<div class="block-time">2024-03-15 拉黑</div>
|
|
</div>
|
|
<button class="unblock-btn" data-dom-id="btn-unblock-1" onclick="unblockUser(this)">
|
|
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<polyline points="20 6 9 17 4 12"></polyline>
|
|
</svg>
|
|
移出
|
|
</button>
|
|
</div>
|
|
|
|
<div class="user-card" data-dom-id="user-card-2">
|
|
<div class="user-avatar-wrap">
|
|
<div class="user-avatar" style="background: linear-gradient(135deg, #A29BFE, #6C5CE7);">王</div>
|
|
<div class="blocked-badge">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
|
<circle cx="12" cy="12" r="10"></circle>
|
|
<line x1="4.93" y1="4.93" x2="19.07" y2="19.07"></line>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<div class="user-info">
|
|
<div class="user-name-row">
|
|
<span class="user-name">王思远_alex</span>
|
|
</div>
|
|
<div class="user-school">
|
|
清华大学 <span class="dot"></span> 土木工程系
|
|
</div>
|
|
<div class="block-time">2024-02-28 拉黑</div>
|
|
</div>
|
|
<button class="unblock-btn" data-dom-id="btn-unblock-2" onclick="unblockUser(this)">
|
|
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<polyline points="20 6 9 17 4 12"></polyline>
|
|
</svg>
|
|
移出
|
|
</button>
|
|
</div>
|
|
|
|
<div class="user-card" data-dom-id="user-card-3">
|
|
<div class="user-avatar-wrap">
|
|
<div class="user-avatar" style="background: linear-gradient(135deg, #FD79A8, #E84393);">赵</div>
|
|
<div class="blocked-badge">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
|
<circle cx="12" cy="12" r="10"></circle>
|
|
<line x1="4.93" y1="4.93" x2="19.07" y2="19.07"></line>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<div class="user-info">
|
|
<div class="user-name-row">
|
|
<span class="user-name">赵大宝</span>
|
|
</div>
|
|
<div class="user-school">
|
|
人民大学 <span class="dot"></span> 法学院
|
|
</div>
|
|
<div class="block-time">2024-01-12 拉黑</div>
|
|
</div>
|
|
<button class="unblock-btn" data-dom-id="btn-unblock-3" onclick="unblockUser(this)">
|
|
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<polyline points="20 6 9 17 4 12"></polyline>
|
|
</svg>
|
|
移出
|
|
</button>
|
|
</div>
|
|
|
|
<div class="user-card" data-dom-id="user-card-4">
|
|
<div class="user-avatar-wrap">
|
|
<div class="user-avatar" style="background: linear-gradient(135deg, #74B9FF, #0984E3);">孙</div>
|
|
<div class="blocked-badge">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
|
<circle cx="12" cy="12" r="10"></circle>
|
|
<line x1="4.93" y1="4.93" x2="19.07" y2="19.07"></line>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<div class="user-info">
|
|
<div class="user-name-row">
|
|
<span class="user-name">孙行者</span>
|
|
</div>
|
|
<div class="user-school">
|
|
北京理工 <span class="dot"></span> 计算机学院
|
|
</div>
|
|
<div class="block-time">2023-12-05 拉黑</div>
|
|
</div>
|
|
<button class="unblock-btn" data-dom-id="btn-unblock-4" onclick="unblockUser(this)">
|
|
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<polyline points="20 6 9 17 4 12"></polyline>
|
|
</svg>
|
|
移出
|
|
</button>
|
|
</div>
|
|
|
|
<div class="user-card" data-dom-id="user-card-5">
|
|
<div class="user-avatar-wrap">
|
|
<div class="user-avatar" style="background: linear-gradient(135deg, #FDCB6E, #E17055);">周</div>
|
|
<div class="blocked-badge">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
|
<circle cx="12" cy="12" r="10"></circle>
|
|
<line x1="4.93" y1="4.93" x2="19.07" y2="19.07"></line>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<div class="user-info">
|
|
<div class="user-name-row">
|
|
<span class="user-name">周某某</span>
|
|
</div>
|
|
<div class="user-school">
|
|
北京邮电 <span class="dot"></span> 信通院
|
|
</div>
|
|
<div class="block-time">2023-11-20 拉黑</div>
|
|
</div>
|
|
<button class="unblock-btn" data-dom-id="btn-unblock-5" onclick="unblockUser(this)">
|
|
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<polyline points="20 6 9 17 4 12"></polyline>
|
|
</svg>
|
|
移出
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 空状态(默认隐藏) -->
|
|
<div class="list-section" id="state-empty" style="display: none;" data-dom-id="state-empty">
|
|
<div class="empty-state">
|
|
<div class="empty-icon">
|
|
<svg width="42" height="42" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"></path>
|
|
<circle cx="9" cy="7" r="4"></circle>
|
|
<line x1="17" y1="11" x2="23" y2="17"></line>
|
|
<line x1="23" y1="11" x2="17" y2="17"></line>
|
|
</svg>
|
|
</div>
|
|
<div class="empty-title">暂无拉黑用户</div>
|
|
<div class="empty-desc">
|
|
你还没有拉黑任何人<br>尊重每一次相遇 ㆁωㆁ
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 底部状态切换 + 主题 -->
|
|
<div class="state-toggle">
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<script>// 主题切换
|
|
icon.innerHTML = '<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>';
|
|
}
|
|
}
|
|
|
|
// 返回
|
|
function goBack() {
|
|
window.history.back();
|
|
}
|
|
|
|
// 移出黑名单
|
|
function unblockUser(btn) {
|
|
if (confirm('确定将该用户移出黑名单吗?移出后对方将可以重新关注你。')) {
|
|
const card = btn.closest('.user-card');
|
|
card.style.transition = 'all 0.3s ease';
|
|
card.style.opacity = '0';
|
|
card.style.transform = 'translateX(100px)';
|
|
setTimeout(function() {
|
|
card.remove();
|
|
updateCount();
|
|
}, 300);
|
|
}
|
|
}
|
|
|
|
// 更新计数
|
|
function updateCount() {
|
|
const count = document.querySelectorAll('.user-card').length;
|
|
const countEl = document.querySelector('.list-count');
|
|
if (count === 0) {
|
|
setState('empty');
|
|
} else {
|
|
countEl.textContent = '共 ' + count + ' 位拉黑用户';
|
|
}
|
|
}
|
|
|
|
// 状态切换
|
|
function setState(state) {
|
|
const listEl = document.getElementById('state-list');
|
|
const emptyEl = document.getElementById('state-empty');
|
|
const btnList = document.getElementById('btn-state-list');
|
|
const btnEmpty = document.getElementById('btn-state-empty');
|
|
|
|
if (state === 'empty') {
|
|
listEl.style.display = 'none';
|
|
emptyEl.style.display = 'block';
|
|
btnList.classList.remove('active');
|
|
btnEmpty.classList.add('active');
|
|
} else {
|
|
listEl.style.display = 'block';
|
|
emptyEl.style.display = 'none';
|
|
btnList.classList.add('active');
|
|
btnEmpty.classList.remove('active');
|
|
}
|
|
}</script>
|
|
</body>
|
|
</html>
|
|
|