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.
 
 

879 lines
26 KiB

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, 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>
* {
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 {
height: 100%;
overflow: hidden;
overflow-x: hidden;}
body {
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
background: var(--youth-bg-page);
color: var(--youth-text-primary);
}
/* ===== 手机容器 ===== */
.phone-container {
width: 375px;
height: 812px;
margin: 0 auto;
background: var(--youth-bg-page);
position: relative;
overflow: hidden;
}
@media (max-width: 375px) {
.phone-container {
width: 100%;
height: 100vh;
}
}
/* ===== iOS状态栏 ===== */
.status-bar {
height: 44px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 24px;
font-size: 15px;
font-weight: 600;
color: var(--youth-text-primary);
position: relative;
z-index: 100;
background: var(--youth-bg-page);
padding-top: 8px;
}
.status-bar .time {
font-weight: 700;
font-size: 15px;
letter-spacing: -0.01em;
}
.status-bar .right-icons {
display: flex;
align-items: center;
gap: 5px;
}
/* ===== 顶部导航栏 ===== */
.top-nav {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 20px 12px;
background: var(--youth-bg-page);
position: relative;
z-index: 99;
}
.nav-title {
font-size: 28px;
font-weight: 800;
line-height: 1.2;
background: var(--youth-gradient-primary);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
letter-spacing: -0.02em;
}
.nav-actions {
display: flex;
align-items: center;
gap: 10px;
}
.nav-icon-btn {
width: 38px;
height: 38px;
border-radius: 12px;
background: var(--youth-gradient-matte-card);
border: 1px solid var(--youth-border-light);
box-shadow:
0 2px 8px rgba(0, 0, 0, 0.06),
inset 0 1px 1px rgba(255, 255, 255, 0.8);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
color: var(--youth-text-primary);
}
.nav-icon-btn:active {
transform: scale(0.93);
box-shadow:
0 1px 4px rgba(0, 0, 0, 0.08),
inset 0 1px 2px rgba(0, 0, 0, 0.06);
}
.nav-icon-btn svg {
width: 20px;
height: 20px;
stroke-width: 2px;
}
/* ===== 搜索框 ===== */
.search-section {
padding: 0 20px 16px;
}
.search-box {
display: flex;
align-items: center;
gap: 8px;
height: 42px;
padding: 0 14px;
border-radius: 8px;
background: var(--youth-bg-input);
border: 1px solid var(--youth-border-light);
box-shadow:
inset 0 2px 4px rgba(0, 0, 0, 0.04),
inset 0 1px 2px rgba(0, 0, 0, 0.02);
cursor: pointer;
transition: all 0.2s ease;
}
.search-box:active {
background: var(--youth-bg-hover);
}
.search-box svg {
width: 18px;
height: 18px;
stroke-width: 2px;
color: var(--youth-text-tertiary);
flex-shrink: 0;
}
.search-placeholder {
font-size: 14px;
color: var(--youth-text-placeholder);
flex: 1;
}
/* ===== 功能入口区 ===== */
.entry-section {
padding: 4px 20px 18px;
}
.entry-row {
display: flex;
justify-content: space-between;
}
.entry-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
cursor: pointer;
transition: all 0.2s ease;
flex: 1;
}
.entry-item:active {
transform: scale(0.94);
}
.entry-icon {
width: 52px;
height: 52px;
border-radius: 16px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
background: var(--youth-gradient-matte-card);
border: 1px solid var(--youth-border-light);
box-shadow:
0 4px 12px rgba(0, 0, 0, 0.06),
inset 0 1px 1px rgba(255, 255, 255, 0.8);
transition: all 0.2s ease;
}
.entry-icon svg {
width: 24px;
height: 24px;
stroke-width: 1.8px;
}
.entry-icon.teal {
background: linear-gradient(145deg, #E6FAF9 0%, #C8F3F1 100%);
border-color: #9AE7E4;
color: #18827E;
}
.entry-icon.orange {
background: linear-gradient(145deg, #FFF4E8 0%, #FFE4C8 100%);
border-color: #FFCF99;
color: #CC751F;
}
.entry-icon.purple {
background: linear-gradient(145deg, #F0EEFF 0%, #DED9FF 100%);
border-color: #BCB3FF;
color: #4C35CC;
}
.entry-icon.pink {
background: linear-gradient(145deg, #FFEBF2 0%, #FFD1E0 100%);
border-color: #FFA8C7;
color: #CC376E;
}
.entry-badge {
position: absolute;
top: -4px;
right: -4px;
min-width: 18px;
height: 18px;
background: #E8A0A0;
color: #fff;
border-radius: 9px;
font-size: 10px;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
padding: 0 5px;
border: 2px solid var(--youth-bg-page);
box-shadow: 0 1px 4px rgba(232, 160, 160, 0.4);
}
.entry-label {
font-size: 12px;
color: var(--youth-text-secondary);
font-weight: 500;
}
/* ===== 会话列表 ===== */
.chat-list-section {
padding: 0 20px;
flex: 1;
overflow: hidden;
}
.chat-list {
display: flex;
flex-direction: column;
}
.chat-item {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 0;
cursor: pointer;
transition: all 0.15s ease;
position: relative;
border-bottom: 1px solid var(--youth-border-light);
}
.chat-item:last-child {
border-bottom: none;
}
.chat-item:active {
background: var(--youth-bg-hover);
margin: 0 -12px;
padding-left: 12px;
padding-right: 12px;
border-radius: 12px;
}
.chat-avatar-wrap {
position: relative;
flex-shrink: 0;
}
.chat-avatar {
width: 48px;
height: 48px;
border-radius: 50%;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
font-weight: 700;
position: relative;
}
.chat-avatar.has-unread::before {
content: '';
position: absolute;
inset: -2px;
border-radius: 50%;
background: var(--youth-gradient-primary);
z-index: -1;
opacity: 0.6;
filter: blur(2px);
}
.chat-avatar.has-unread {
box-shadow: 0 0 0 2px var(--youth-primary);
}
.unread-badge {
position: absolute;
top: -2px;
right: -2px;
min-width: 20px;
height: 20px;
background: #E8A0A0;
color: #fff;
border-radius: 10px;
font-size: 11px;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
padding: 0 6px;
border: 2px solid var(--youth-bg-page);
box-shadow: 0 2px 6px rgba(232, 160, 160, 0.4);
z-index: 2;
}
.chat-content {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 4px;
}
.chat-top {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.chat-name {
font-size: 15px;
font-weight: 600;
color: var(--youth-text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 200px;
}
.chat-time {
font-size: 11px;
color: var(--youth-text-tertiary);
flex-shrink: 0;
}
.chat-preview {
font-size: 13px;
color: var(--youth-text-tertiary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.4;
}
/* 头像颜色变体 */
.avatar-1 {
background: linear-gradient(135deg, #FFE5E5 0%, #FFB8B8 100%);
color: #D45050;
}
.avatar-2 {
background: linear-gradient(135deg, #E5F0FF 0%, #A5C8E0 100%);
color: #3465D4;
}
.avatar-3 {
background: linear-gradient(135deg, #E6FAF9 0%, #9AE7E4 100%);
color: #18827E;
}
.avatar-4 {
background: linear-gradient(135deg, #FFF0E5 0%, #FFD0A5 100%);
color: #D47A34;
}
.avatar-5 {
background: linear-gradient(135deg, #F0E5FF 0%, #C8A5FF 100%);
color: #6A34D4;
}
/* ===== 底部Tab导航 ===== */
.bottom-tab {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 70px;
background: var(--youth-bg-glass);
backdrop-filter: blur(20px) saturate(180%);
-webkit-backdrop-filter: blur(20px) saturate(180%);
border-top: 1px solid var(--youth-glass-border);
display: flex;
align-items: flex-start;
justify-content: space-around;
padding: 8px 0 20px;
z-index: 90;
}
.tab-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
padding: 2px 12px;
cursor: pointer;
transition: all 0.2s ease;
position: relative;
color: var(--youth-gray-400);
}
.tab-item.active {
color: var(--youth-primary);
}
.tab-item:active {
transform: scale(0.9);
}
.tab-item svg {
width: 22px;
height: 22px;
stroke-width: 1.8px;
}
.tab-label {
font-size: 10px;
font-weight: 500;
}
.tab-item.active .tab-label {
font-weight: 600;
}
.tab-dot {
position: absolute;
top: 0;
right: 6px;
width: 8px;
height: 8px;
background: #E8A0A0;
border-radius: 50%;
border: 2px solid var(--youth-bg-glass);
}
/* ===== 滚动容器 ===== */
.scroll-content {
height: calc(812px - 44px - 56px - 58px - 100px - 70px - 20px);
overflow-y: auto;
overflow-x: hidden;
}
@media (max-width: 375px) {
.scroll-content {
height: calc(100vh - 44px - 56px - 58px - 100px - 70px - 20px);
}
}
.scroll-content::-webkit-scrollbar {
display: none;
}
.scroll-content {
-ms-overflow-style: none;
scrollbar-width: none;
}
/* 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="phone-container">
<!-- 状态栏 -->
<div class="status-bar">
<span class="time">9:41</span>
<div class="right-icons">
<!-- 信号 -->
<svg width="18" height="12" viewBox="0 0 18 12" fill="currentColor">
<rect x="0" y="8" width="3" height="4" rx="1" fill="currentColor"></rect>
<rect x="5" y="5" width="3" height="7" rx="1" fill="currentColor"></rect>
<rect x="10" y="2" width="3" height="10" rx="1" fill="currentColor"></rect>
<rect x="15" y="0" width="3" height="12" rx="1" fill="currentColor" opacity="0.3"></rect>
</svg>
<!-- WiFi -->
<svg width="16" height="12" viewBox="0 0 16 12" fill="currentColor">
<path d="M8 2.5C10 2.5 11.5 3.5 13 5L14.5 3.5C12.5 1.5 10.5 0.5 8 0.5C5.5 0.5 3.5 1.5 1.5 3.5L3 5C4.5 3.5 6 2.5 8 2.5ZM8 6.5C9 6.5 10 7 10.5 8L12 6.5C11 5.5 9.5 4.5 8 4.5C6.5 4.5 5 5.5 4 6.5L5.5 8C6 7 7 6.5 8 6.5ZM8 10.5C8.5 10.5 9 10.7 9.25 11L8 12.5L6.75 11C7 10.7 7.5 10.5 8 10.5Z" fill="currentColor"></path>
</svg>
<!-- 电池 -->
<svg width="26" height="12" viewBox="0 0 26 12" fill="none">
<rect x="0.5" y="0.5" width="22" height="11" rx="2.5" stroke="currentColor" opacity="0.4"></rect>
<rect x="2" y="2" width="17" height="8" rx="1.5" fill="currentColor"></rect>
<rect x="23.5" y="4" width="1.5" height="4" rx="0.75" fill="currentColor" opacity="0.4"></rect>
</svg>
</div>
</div>
<!-- 顶部导航栏 -->
<div class="top-nav">
<h1 class="nav-title">消息</h1>
<div class="nav-actions">
<button class="nav-icon-btn" data-dom-id="btn-scan" id="btn-scan" title="扫一扫">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M3 7V5a2 2 0 0 1 2-2h2"></path>
<path d="M17 3h2a2 2 0 0 1 2 2v2"></path>
<path d="M21 17v2a2 2 0 0 1-2 2h-2"></path>
<path d="M7 21H5a2 2 0 0 1-2-2v-2"></path>
<line x1="7" y1="12" x2="17" y2="12"></line>
</svg>
</button>
</div>
</div>
<!-- 搜索框 -->
<div class="search-section">
<div class="search-box" data-dom-id="btn-search" id="btn-search">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<circle cx="11" cy="11" r="8"></circle>
<path d="m21 21-4.3-4.3"></path>
</svg>
<span class="search-placeholder">搜索联系人/群聊</span>
</div>
</div>
<!-- 功能入口区 -->
<div class="entry-section">
<div class="entry-row">
<div class="entry-item" data-dom-id="entry-friend-request" id="entry-friend-request">
<div class="entry-icon teal">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path>
<circle cx="9" cy="7" r="4"></circle>
<path d="M23 21v-2a4 4 0 0 0-3-3.87"></path>
<path d="M16 3.13a4 4 0 0 1 0 7.75"></path>
</svg>
<span class="entry-badge">3</span>
</div>
<span class="entry-label">好友申请</span>
</div>
<div class="entry-item" data-dom-id="entry-notification" id="entry-notification">
<div class="entry-icon orange">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path>
<path d="M13.73 21a2 2 0 0 1-3.46 0"></path>
</svg>
<span class="entry-badge">5</span>
</div>
<span class="entry-label">系统通知</span>
</div>
<div class="entry-item" data-dom-id="entry-group-helper" id="entry-group-helper">
<div class="entry-icon purple">
<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="9"></circle>
<circle cx="12" cy="12" r="5"></circle>
<path d="M12 12 L12 3"></path>
<path d="M12 12 L18.5 5.5"></path>
</svg>
</div>
<span class="entry-label">校园雷达</span>
</div>
<div class="entry-item" data-dom-id="entry-assistant" id="entry-assistant">
<div class="entry-icon pink">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="5" r="2"></circle>
<circle cx="5" cy="12" r="2"></circle>
<circle cx="19" cy="12" r="2"></circle>
<circle cx="12" cy="19" r="2"></circle>
<line x1="12" y1="7" x2="12" y2="17"></line>
<line x1="7" y1="12" x2="17" y2="12"></line>
<line x1="7" y1="7" x2="17" y2="17"></line>
<line x1="17" y1="7" x2="7" y2="17"></line>
</svg>
</div>
<span class="entry-label">社交图谱</span>
</div>
</div>
</div>
<!-- 会话列表 -->
<div class="chat-list-section">
<div class="chat-list">
<!-- 会话1 - 林小雨 -->
<div class="chat-item" data-dom-id="chat-item-1" id="chat-item-1">
<div class="chat-avatar-wrap">
<div class="chat-avatar avatar-1 has-unread">
林
</div>
<span class="unread-badge">2</span>
</div>
<div class="chat-content">
<div class="chat-top">
<span class="chat-name">林小雨</span>
<span class="chat-time">10:30</span>
</div>
<span class="chat-preview">好的,明天见!</span>
</div>
</div>
<!-- 会话2 - 羽毛球约球群 -->
<div class="chat-item" data-dom-id="chat-item-2" id="chat-item-2">
<div class="chat-avatar-wrap">
<div class="chat-avatar avatar-2 has-unread">
羽
</div>
<span class="unread-badge">5</span>
</div>
<div class="chat-content">
<div class="chat-top">
<span class="chat-name">羽毛球约球群</span>
<span class="chat-time">10:12</span>
</div>
<span class="chat-preview">陈明轩:周六有人来吗</span>
</div>
</div>
<!-- 会话3 - 青核小助手 -->
<div class="chat-item" data-dom-id="chat-item-3" id="chat-item-3">
<div class="chat-avatar-wrap">
<div class="chat-avatar avatar-3">
青
</div>
</div>
<div class="chat-content">
<div class="chat-top">
<span class="chat-name">青核小助手</span>
<span class="chat-time">昨天</span>
</div>
<span class="chat-preview">欢迎加入青核</span>
</div>
</div>
<!-- 会话4 - 王思琪 -->
<div class="chat-item" data-dom-id="chat-item-4" id="chat-item-4">
<div class="chat-avatar-wrap">
<div class="chat-avatar avatar-4">
王
</div>
</div>
<div class="chat-content">
<div class="chat-top">
<span class="chat-name">王思琪</span>
<span class="chat-time">昨天</span>
</div>
<span class="chat-preview">[图片]</span>
</div>
</div>
<!-- 会话5 - 自习搭子群 -->
<div class="chat-item" data-dom-id="chat-item-5" id="chat-item-5">
<div class="chat-avatar-wrap">
<div class="chat-avatar avatar-5">
自
</div>
</div>
<div class="chat-content">
<div class="chat-top">
<span class="chat-name">自习搭子群</span>
<span class="chat-time">周一</span>
</div>
<span class="chat-preview">李雷:图书馆见</span>
</div>
</div>
</div>
</div>
<!-- 底部Tab导航 -->
<div class="bottom-tab">
<div class="tab-item" data-dom-id="tab-home" id="tab-home" data-tab="home">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path>
<polyline points="9 22 9 12 15 12 15 22"></polyline>
</svg>
<span class="tab-label">首页</span>
</div>
<div class="tab-item" data-dom-id="tab-friends" id="tab-friends" data-tab="friends">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path>
<circle cx="9" cy="7" r="4"></circle>
<path d="M23 21v-2a4 4 0 0 0-3-3.87"></path>
<path d="M16 3.13a4 4 0 0 1 0 7.75"></path>
</svg>
<span class="tab-label">交友</span>
</div>
<div class="tab-item" data-dom-id="tab-dynamic" id="tab-dynamic" data-tab="dynamic">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"></path>
</svg>
<span class="tab-label">动态</span>
</div>
<div class="tab-item active" data-dom-id="tab-message" id="tab-message" data-tab="message">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" 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>
<span class="tab-label">消息</span>
<span class="tab-dot"></span>
</div>
<div class="tab-item" data-dom-id="tab-profile" id="tab-profile" data-tab="profile">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
<circle cx="12" cy="7" r="4"></circle>
</svg>
<span class="tab-label">我的</span>
</div>
</div>
<!-- 浮动主题切换按钮 -->
</div>
<script>// ===== 主题切换 =====
const html = document.documentElement;
// 初始化主题
}
<circle cx="12" cy="12" r="5"/>
<line x1="12" y1="1" x2="12" y2="3"/>
<line x1="12" y1="21" x2="12" y2="23"/>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/>
<line x1="1" y1="12" x2="3" y2="12"/>
<line x1="21" y1="12" x2="23" y2="12"/>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/>
`;
}
}
// ===== 搜索框点击 =====
document.getElementById('btn-search').addEventListener('click', () => {
window.location.href = 'search-result.html';
});
// ===== 好友申请入口 =====
document.getElementById('entry-friend-request').addEventListener('click', () => {
window.location.href = 'friend-requests.html';
});
// ===== 系统通知入口 =====
document.getElementById('entry-notification').addEventListener('click', () => {
window.location.href = 'notifications.html';
});
// ===== 群聊助手入口 =====
document.getElementById('entry-group-helper').addEventListener('click', () => {
// 群聊助手跳转
console.log('群聊助手');
});
// ===== 青核小助手入口 =====
document.getElementById('entry-assistant').addEventListener('click', () => {
// 点击后跳转到对应会话
document.getElementById('chat-item-3').scrollIntoView({ behavior: 'smooth' });
});
// ===== 扫一扫按钮 =====
document.getElementById('btn-scan').addEventListener('click', () => {
window.location.href = 'scan-page.html';
});
// ===== 添加好友按钮 =====
document.getElementById('btn-add-friend').addEventListener('click', () => {
// 弹出加好友弹窗或跳转
window.location.href = 'add-friend.html';
});
// ===== 会话项点击 =====
const chatItems = document.querySelectorAll('.chat-item');
chatItems.forEach(item => {
item.addEventListener('click', () => {
window.location.href = 'chat-detail.html';
});
});
// ===== 底部Tab切换 =====
const tabItems = document.querySelectorAll('.tab-item');
tabItems.forEach(tab => {
tab.addEventListener('click', () => {
tabItems.forEach(t => t.classList.remove('active'));
tab.classList.add('active');
});
});</script>
</body>
</html>