花尔完成 M05 用户中心环节0+1
This commit is contained in:
parent
2082515225
commit
3153963516
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>HoloLake · 用户中心</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<nav class="top-bar">
|
||||
<div class="logo">HoloLake</div>
|
||||
<div class="nav-links">
|
||||
<a href="#" class="active">个人中心</a>
|
||||
<a href="#">消息</a>
|
||||
<a href="#">退出</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="profile-card">
|
||||
<div class="avatar">🧑💻</div>
|
||||
<div class="user-info">
|
||||
<h1 class="username">光湖用户</h1>
|
||||
<p class="user-id">ID: HL-000001</p>
|
||||
<p class="user-status">🟢 在线</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="menu-grid">
|
||||
<div class="menu-item"><span class="menu-icon">👤</span><span class="menu-text">个人资料</span></div>
|
||||
<div class="menu-item"><span class="menu-icon">🧠</span><span class="menu-text">我的记忆</span></div>
|
||||
<div class="menu-item"><span class="menu-icon">🤖</span><span class="menu-text">AI伙伴</span></div>
|
||||
<div class="menu-item"><span class="menu-icon">📊</span><span class="menu-text">使用统计</span></div>
|
||||
<div class="menu-item"><span class="menu-icon">🔐</span><span class="menu-text">安全设置</span></div>
|
||||
<div class="menu-item"><span class="menu-icon">💬</span><span class="menu-text">反馈建议</span></div>
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<p>HoloLake Era · AGE 0S v1.0</p>
|
||||
<p>Powered by 光湖团队</p>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
// HoloLake 用户中心 · 交互脚本
|
||||
|
||||
// 六个菜单的详情内容
|
||||
const menuDetails = {
|
||||
'个人资料': {
|
||||
icon: '👤',
|
||||
title: '个人资料',
|
||||
content: `
|
||||
<div class="detail-item">
|
||||
<label>用户名</label>
|
||||
<span>光湖用户</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<label>ID</label>
|
||||
<span>HL-000001</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<label>邮箱</label>
|
||||
<span>user@hololake.com</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<label>注册时间</label>
|
||||
<span>2026-03-01</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<label>等级</label>
|
||||
<span>初级探索者</span>
|
||||
</div>
|
||||
`
|
||||
},
|
||||
'我的记忆': {
|
||||
icon: '🧠',
|
||||
title: '我的记忆',
|
||||
content: `
|
||||
<div class="memory-stats">
|
||||
<div class="stat-card">
|
||||
<span class="stat-num">128</span>
|
||||
<span class="stat-label">对话次数</span>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<span class="stat-num">3</span>
|
||||
<span class="stat-label">记忆主题</span>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<span class="stat-num">15</span>
|
||||
<span class="stat-label">收藏片段</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="memory-hint">✨ 你的记忆正在慢慢生长</p>
|
||||
`
|
||||
},
|
||||
'AI伙伴': {
|
||||
icon: '🤖',
|
||||
title: 'AI伙伴',
|
||||
content: `
|
||||
<div class="partner-card">
|
||||
<div class="partner-avatar">🧑💻</div>
|
||||
<div class="partner-info">
|
||||
<div class="partner-name">知秋宝宝</div>
|
||||
<div class="partner-status">🟢 在线</div>
|
||||
<div class="partner-desc">你的开发引导伙伴</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="partner-stats">
|
||||
<span>陪伴时长: 3天</span>
|
||||
<span>引导环节: 2个</span>
|
||||
<span>默契度: 98%</span>
|
||||
</div>
|
||||
`
|
||||
},
|
||||
'使用统计': {
|
||||
icon: '📊',
|
||||
title: '使用统计',
|
||||
content: `
|
||||
<div class="usage-item">
|
||||
<span class="usage-label">本月对话</span>
|
||||
<div class="usage-bar"><div class="usage-fill" style="width:65%"></div></div>
|
||||
<span class="usage-num">65次</span>
|
||||
</div>
|
||||
<div class="usage-item">
|
||||
<span class="usage-label">记忆使用</span>
|
||||
<div class="usage-bar"><div class="usage-fill" style="width:30%"></div></div>
|
||||
<span class="usage-num">30MB</span>
|
||||
</div>
|
||||
<div class="usage-item">
|
||||
<span class="usage-label">云盘空间</span>
|
||||
<div class="usage-bar"><div class="usage-fill" style="width:10%"></div></div>
|
||||
<span class="usage-num">1GB/10GB</span>
|
||||
</div>
|
||||
`
|
||||
},
|
||||
'安全设置': {
|
||||
icon: '🔐',
|
||||
title: '安全设置',
|
||||
content: `
|
||||
<div class="setting-item">
|
||||
<span>修改密码</span>
|
||||
<span class="setting-arrow">›</span>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<span>两步验证</span>
|
||||
<span class="setting-status on">已开启</span>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<span>登录设备管理</span>
|
||||
<span class="setting-arrow">›</span>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<span>数据导出</span>
|
||||
<span class="setting-arrow">›</span>
|
||||
</div>
|
||||
`
|
||||
},
|
||||
'反馈建议': {
|
||||
icon: '💬',
|
||||
title: '反馈建议',
|
||||
content: `
|
||||
<div class="feedback-types">
|
||||
<button class="feedback-btn active">功能建议</button>
|
||||
<button class="feedback-btn">问题反馈</button>
|
||||
<button class="feedback-btn">其他</button>
|
||||
</div>
|
||||
<div class="feedback-area">
|
||||
<p class="feedback-placeholder">💡 你的每一条反馈都会被认真阅读</p>
|
||||
<p class="feedback-placeholder">📧 也可以发邮件到 feedback@hololake.com</p>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
};
|
||||
|
||||
// 页面加载完成后绑定事件
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const menuItems = document.querySelectorAll('.menu-item');
|
||||
|
||||
menuItems.forEach(function(item) {
|
||||
item.addEventListener('click', function() {
|
||||
const menuText = item.querySelector('.menu-text').textContent;
|
||||
const detail = menuDetails[menuText];
|
||||
if (detail) {
|
||||
showDetail(detail);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// 显示详情页
|
||||
function showDetail(detail) {
|
||||
// 创建详情页容器
|
||||
const overlay = document.createElement('div');
|
||||
overlay.className = 'detail-overlay';
|
||||
overlay.innerHTML = `
|
||||
<div class="detail-page">
|
||||
<div class="detail-header">
|
||||
<button class="back-btn" onclick="closeDetail()">← 返回</button>
|
||||
<span class="detail-title">${detail.icon} ${detail.title}</span>
|
||||
</div>
|
||||
<div class="detail-content">
|
||||
${detail.content}
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
document.body.appendChild(overlay);
|
||||
|
||||
// 添加动画
|
||||
requestAnimationFrame(function() {
|
||||
overlay.classList.add('show');
|
||||
});
|
||||
}
|
||||
|
||||
// 关闭详情页
|
||||
function closeDetail() {
|
||||
const overlay = document.querySelector('.detail-overlay');
|
||||
if (overlay) {
|
||||
overlay.classList.remove('show');
|
||||
setTimeout(function() {
|
||||
overlay.remove();
|
||||
}, 300);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,400 @@
|
|||
/* HoloLake 用户中心 · 样式表 */
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
|
||||
background: linear-gradient(135deg, #0a1628 0%, #1a2a4a 50%, #0d1f3c 100%);
|
||||
color: #e0e6ed;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 480px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
/* 顶部导航 */
|
||||
.top-bar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16px 0;
|
||||
border-bottom: 1px solid #2a3a5a;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
background: linear-gradient(135deg, #7aa3ff, #b47aff);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
|
||||
.nav-links a {
|
||||
color: #8899aa;
|
||||
text-decoration: none;
|
||||
margin-left: 20px;
|
||||
font-size: 14px;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
.nav-links a.active,
|
||||
.nav-links a:hover {
|
||||
color: #7aa3ff;
|
||||
}
|
||||
|
||||
/* 用户信息卡片 */
|
||||
.profile-card {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border-radius: 24px;
|
||||
padding: 24px;
|
||||
backdrop-filter: blur(10px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
margin-bottom: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
background: linear-gradient(135deg, #2a3a5a, #1a2a4a);
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 40px;
|
||||
border: 2px solid #7aa3ff;
|
||||
}
|
||||
|
||||
.user-info h1 {
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.user-id {
|
||||
color: #8899aa;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.user-status {
|
||||
font-size: 13px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
/* 功能区网格 */
|
||||
.menu-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 16px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
border: 1px solid rgba(255, 255, 255, 0.05);
|
||||
border-radius: 20px;
|
||||
padding: 20px 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
transition: all 0.2s;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.menu-item:hover {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
border-color: rgba(122, 163, 255, 0.3);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.menu-icon {
|
||||
font-size: 32px;
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.menu-text {
|
||||
font-size: 13px;
|
||||
color: #b0bec5;
|
||||
}
|
||||
|
||||
/* 底部 */
|
||||
.footer {
|
||||
text-align: center;
|
||||
padding: 32px 0;
|
||||
color: #556677;
|
||||
font-size: 12px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
/* ===== 详情页样式 ===== */
|
||||
.detail-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(10, 22, 40, 0.95);
|
||||
backdrop-filter: blur(10px);
|
||||
z-index: 1000;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.detail-overlay.show {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* 详情页容器 */
|
||||
.detail-page {
|
||||
max-width: 480px;
|
||||
margin: 0 auto;
|
||||
padding: 0 20px;
|
||||
height: 100vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
/* 详情页头部 */
|
||||
.detail-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 16px 0;
|
||||
border-bottom: 1px solid rgba(255,255,255,0.1);
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.back-btn {
|
||||
background: none;
|
||||
border: 1px solid rgba(255,255,255,0.2);
|
||||
color: #4fc3f7;
|
||||
padding: 6px 12px;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.back-btn:hover {
|
||||
background: rgba(79, 195, 247, 0.1);
|
||||
}
|
||||
|
||||
.detail-title {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #e0e6ed;
|
||||
}
|
||||
|
||||
/* 详情页内容 */
|
||||
.detail-content {
|
||||
padding: 24px 0;
|
||||
}
|
||||
|
||||
/* 个人资料 */
|
||||
.detail-item {
|
||||
display: flex;
|
||||
padding: 16px;
|
||||
background: rgba(255,255,255,0.03);
|
||||
border-radius: 12px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.detail-item label {
|
||||
width: 80px;
|
||||
color: #8899aa;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.detail-item span {
|
||||
color: #e0e6ed;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* 我的记忆 */
|
||||
.memory-stats {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 12px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.stat-card {
|
||||
background: rgba(255,255,255,0.03);
|
||||
border-radius: 12px;
|
||||
padding: 16px 8px;
|
||||
text-align: center;
|
||||
border: 1px solid rgba(255,255,255,0.05);
|
||||
}
|
||||
|
||||
.stat-num {
|
||||
display: block;
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
color: #7aa3ff;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 12px;
|
||||
color: #8899aa;
|
||||
}
|
||||
|
||||
.memory-hint {
|
||||
color: #8899aa;
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
padding: 16px;
|
||||
background: rgba(255,255,255,0.03);
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
/* AI伙伴 */
|
||||
.partner-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
padding: 24px 16px;
|
||||
background: rgba(79, 195, 247, 0.08);
|
||||
border-radius: 16px;
|
||||
border: 1px solid rgba(79, 195, 247, 0.15);
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.partner-avatar {
|
||||
font-size: 48px;
|
||||
}
|
||||
|
||||
.partner-name {
|
||||
font-size: 20px;
|
||||
color: #e0e6ed;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.partner-status {
|
||||
font-size: 13px;
|
||||
color: #4fc3f7;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.partner-desc {
|
||||
font-size: 12px;
|
||||
color: #8899aa;
|
||||
}
|
||||
|
||||
.partner-stats {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 16px;
|
||||
color: #8899aa;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/* 使用统计 */
|
||||
.usage-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.usage-label {
|
||||
width: 70px;
|
||||
color: #8899aa;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.usage-bar {
|
||||
flex: 1;
|
||||
height: 8px;
|
||||
background: rgba(255,255,255,0.1);
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.usage-fill {
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, #7aa3ff, #b47aff);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.usage-num {
|
||||
color: #e0e6ed;
|
||||
font-size: 13px;
|
||||
min-width: 60px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* 安全设置 */
|
||||
.setting-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 18px 0;
|
||||
border-bottom: 1px solid rgba(255,255,255,0.06);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.setting-item span:first-child {
|
||||
color: #e0e6ed;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.setting-arrow {
|
||||
color: #556677;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.setting-status {
|
||||
font-size: 13px;
|
||||
padding: 3px 10px;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.setting-status.on {
|
||||
background: rgba(76, 175, 80, 0.15);
|
||||
color: #66bb6a;
|
||||
}
|
||||
|
||||
/* 反馈建议 */
|
||||
.feedback-types {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.feedback-btn {
|
||||
padding: 8px 16px;
|
||||
border-radius: 20px;
|
||||
border: 1px solid rgba(255,255,255,0.15);
|
||||
background: transparent;
|
||||
color: #8899aa;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.feedback-btn.active {
|
||||
background: rgba(79, 195, 247, 0.15);
|
||||
border-color: #4fc3f7;
|
||||
color: #4fc3f7;
|
||||
}
|
||||
|
||||
.feedback-area {
|
||||
background: rgba(255,255,255,0.03);
|
||||
border-radius: 12px;
|
||||
padding: 24px 16px;
|
||||
}
|
||||
|
||||
.feedback-placeholder {
|
||||
color: #8899aa;
|
||||
font-size: 13px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
Loading…
Reference in New Issue