// HoloLake 用户中心 · 交互脚本 // 六个菜单的详情内容 const menuDetails = { '个人资料': { icon: '👤', title: '个人资料', content: `
光湖用户
HL-000001
user@hololake.com
2026-03-01
初级探索者
` }, '我的记忆': { icon: '🧠', title: '我的记忆', content: `
128 对话次数
3 记忆主题
15 收藏片段

✨ 你的记忆正在慢慢生长

` }, 'AI伙伴': { icon: '🤖', title: 'AI伙伴', content: `
🧑‍💻
知秋宝宝
🟢 在线
你的开发引导伙伴
陪伴时长: 3天 引导环节: 2个 默契度: 98%
` }, '使用统计': { icon: '📊', title: '使用统计', content: `
本月对话
65次
记忆使用
30MB
云盘空间
1GB/10GB
` }, '安全设置': { icon: '🔐', title: '安全设置', content: `
修改密码
两步验证 已开启
登录设备管理
数据导出
` }, '反馈建议': { icon: '💬', title: '反馈建议', content: `

💡 你的每一条反馈都会被认真阅读

📧 也可以发邮件到 feedback@hololake.com

` } }; // 页面加载完成后绑定事件 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 = `
${detail.icon} ${detail.title}
${detail.content}
`; 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); } }