Files
wecom_it_smart_desk/docs/01-产品文档/05-用户端H5/原型-REQ-用户-005-头像菜单退出-v1.0.html
T
Simon 44e77dcb0e chore(docs): docs/ 目录全面重新编号 + 重组
**重构前**(旧编号 02-11):
- docs/02-产品需求/      → 00 产品规划/PRD
- docs/03-技术架构/      → 01-05 子目录散落
- docs/04-原型设计/      → 01-02 产品设计(HTML 原型)
- docs/05-原型设计/      → screens/
- docs/06-测试素材/      → 02-E2E / 03-功能 / 04-版本测试
- docs/07-项目管理/      → 任务说明书/日报/计划
- docs/08-安全审计/      → 审计报告
- docs/09-堡垒运维/      → toolbox / deploy
- docs/10-项目管理/      → 任务说明书(重复)
- docs/11-历史归档/      → deploy-nas-archived

**重构后**(新编号 00-07,语义化):
- docs/00-产品开发流程与文档管理规范.md
- docs/00-版本迭代总览.md
- docs/01-产品文档/      (PRD/原型/认证/会话/AI 服务/坐席/集成)
- docs/02-技术文档/      (技术方案/架构图/重构记录/前端改造/实现配置)
- docs/03-测试文档/      (E2E/功能用例/版本报告/缺陷单)
- docs/04-运维文档/      (部署运维/运维指南)
- docs/05-运营文档/      (品牌推广/用户手册)
- docs/06-安全审计/      (审计报告)
- docs/07-项目管理/      (任务说明书/日报/计划/看板)

**净收益**:
- 目录编号与产品文档管理规范对齐(按文档阶段 01-07 编号)
- 消除 02-产品需求 与 10-项目管理 的编号重叠
- 子目录按文档类型分组(如 01-产品文档/00-产品规划、01-产品文档/01-认证与登录)
- 把运维/安全/项目管理从 0X 散落改为 04/06/07

合计 494 文件 + 78495 行 / - 14076 行
2026-08-03 18:46:55 +08:00

388 lines
9.0 KiB
HTML

<!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>员工端结束会话固定按钮 - 交互原型</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background: #f5f5f5;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.phone-frame {
width: 390px;
height: 844px;
background: #fff;
border-radius: 36px;
box-shadow: 0 20px 60px rgba(0,0,0,.15);
overflow: hidden;
position: relative;
}
/* 标题栏 */
.header {
height: 56px;
background: #fff;
border-bottom: 1px solid #eee;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 16px;
position: relative;
}
.header-left {
display: flex;
align-items: center;
gap: 8px;
}
.logo-block {
width: 28px; height: 28px;
background: #07C160;
color: #fff;
border-radius: 6px;
display: flex;
align-items: center;
justify-content: center;
font-size: 11px;
font-weight: 700;
}
.header-title {
font-size: 15px;
font-weight: 600;
color: #333;
}
.header-actions {
display: flex;
align-items: center;
gap: 12px;
}
/* 头像区域 - 纯展示 */
.user-info {
display: flex;
align-items: center;
gap: 8px;
}
.avatar {
width: 32px; height: 32px;
border-radius: 6px;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='11' r='6' fill='%2307C160'/%3E%3Cellipse cx='16' cy='28' rx='12' ry='8' fill='%2307C160'/%3E%3C/svg%3E");
background-size: cover;
}
.username {
font-size: 13px;
color: #666;
max-width: 60px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* "结束会话"固定按钮 */
.exit-btn {
padding: 4px 12px;
font-size: 12px;
color: #ee0a24;
background: transparent;
border: 1px solid #ee0a24;
border-radius: 14px;
cursor: pointer;
transition: all 0.15s ease;
white-space: nowrap;
line-height: 1.4;
font-family: inherit;
}
.exit-btn:hover, .exit-btn.hover {
background: #ee0a24;
color: #fff;
}
/* 聊天区 */
.chat-area {
height: calc(100% - 56px);
display: flex;
flex-direction: column;
background: #ededed;
}
.messages {
flex: 1;
padding: 16px;
display: flex;
flex-direction: column;
gap: 12px;
overflow-y: auto;
}
.msg {
max-width: 75%;
padding: 10px 14px;
border-radius: 10px;
font-size: 14px;
line-height: 1.5;
}
.msg-ai {
align-self: flex-start;
background: #fff;
color: #333;
border-top-left-radius: 2px;
}
.msg-user {
align-self: flex-end;
background: #07C160;
color: #fff;
border-top-right-radius: 2px;
}
.msg-label {
font-size: 11px;
color: #07C160;
margin-bottom: 4px;
}
/* 确认对话框 */
.dialog-overlay {
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background: rgba(0,0,0,.5);
z-index: 200;
display: flex;
align-items: center;
justify-content: center;
animation: fadeIn .2s ease;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.dialog {
background: #fff;
border-radius: 16px;
width: 300px;
overflow: hidden;
animation: scaleIn .25s ease;
}
@keyframes scaleIn {
from { opacity: 0; transform: scale(.9); }
to { opacity: 1; transform: scale(1); }
}
.dialog-body {
padding: 28px 20px 20px;
text-align: center;
}
.dialog-icon {
font-size: 44px;
margin-bottom: 12px;
}
.dialog-title {
font-size: 17px;
font-weight: 600;
color: #333;
margin-bottom: 8px;
}
.dialog-message {
font-size: 13px;
color: #999;
line-height: 1.5;
}
.dialog-footer {
display: flex;
border-top: 1px solid #eee;
}
.dialog-btn {
flex: 1;
padding: 14px;
text-align: center;
font-size: 15px;
cursor: pointer;
border: none;
background: none;
transition: background .15s;
}
.dialog-btn:hover {
background: #f5f5f5;
}
.dialog-btn-cancel {
color: #666;
border-right: 1px solid #eee;
}
.dialog-btn-confirm {
color: #ee0a24;
font-weight: 600;
}
/* Toast */
.toast {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(0,0,0,.75);
color: #fff;
padding: 12px 24px;
border-radius: 8px;
font-size: 14px;
z-index: 300;
animation: fadeIn .2s ease;
}
/* 状态切换按钮 */
.state-toggle {
position: absolute;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
z-index: 50;
display: flex;
gap: 8px;
}
.state-btn {
padding: 6px 14px;
border-radius: 16px;
border: 1px solid #ddd;
background: #fff;
font-size: 12px;
cursor: pointer;
color: #666;
transition: all .15s;
font-family: inherit;
}
.state-btn.active {
background: #07C160;
color: #fff;
border-color: #07C160;
}
.state-label {
position: absolute;
top: -24px;
left: 0;
right: 0;
text-align: center;
font-size: 11px;
color: #999;
}
.hidden { display: none !important; }
</style>
</head>
<body>
<div class="phone-frame" id="app">
<!-- 标题栏 -->
<div class="header">
<div class="header-left">
<span class="logo-block">IT</span>
<span class="header-title">智能IT服务</span>
</div>
<div class="header-actions">
<!-- 员工头像+姓名(纯展示) -->
<div class="user-info">
<div class="avatar"></div>
<span class="username">宋献</span>
</div>
<!-- "结束会话"固定按钮 -->
<button class="exit-btn" id="exitBtn" onclick="showConfirm()">结束会话</button>
</div>
</div>
<!-- 聊天消息区 -->
<div class="chat-area" id="chatArea">
<div class="messages">
<div class="msg msg-ai">
<div class="msg-label">🤖 AI助手</div>
您好!我是IT智能服务助手,请问有什么可以帮您的?
</div>
<div class="msg msg-user">
我的打印机连不上了
</div>
<div class="msg msg-ai">
<div class="msg-label">🤖 AI助手</div>
了解,打印机连接问题通常有几种可能原因。我先帮您排查一下:<br><br>
1. 请确认打印机电源已开启<br>
2. 检查USB线或网络连接是否正常<br>
3. 在电脑上打开"设备和打印机"查看打印机状态
</div>
</div>
</div>
<!-- 确认对话框 -->
<div class="dialog-overlay hidden" id="dialogOverlay">
<div class="dialog">
<div class="dialog-body">
<div class="dialog-icon">⚠️</div>
<div class="dialog-title">结束会话</div>
<div class="dialog-message">退出后会话记录会清空,<br>当前咨询进度将丢失,<br>确定要结束会话吗?</div>
</div>
<div class="dialog-footer">
<button class="dialog-btn dialog-btn-cancel" onclick="cancelExit()">取消</button>
<button class="dialog-btn dialog-btn-confirm" onclick="confirmExit()">确定退出</button>
</div>
</div>
</div>
<!-- Toast -->
<div class="toast hidden" id="toast"></div>
<!-- 状态切换(演示用) -->
<div class="state-toggle">
<button class="state-btn active" onclick="setState('default', this)">默认</button>
<button class="state-btn" onclick="setState('hover', this)">Hover</button>
<button class="state-btn" onclick="setState('confirm', this)">确认退出</button>
</div>
</div>
<script>
function showConfirm() {
document.getElementById('dialogOverlay').classList.remove('hidden')
}
function cancelExit() {
document.getElementById('dialogOverlay').classList.add('hidden')
}
function confirmExit() {
document.getElementById('dialogOverlay').classList.add('hidden')
showToast('已退出登录')
setTimeout(() => {
showToast('正在跳转登录页…')
// 实际场景:window.location.href = '/h5/login' 或 closeWindow
}, 1500)
}
function showToast(msg) {
const toast = document.getElementById('toast')
toast.textContent = msg
toast.classList.remove('hidden')
setTimeout(() => toast.classList.add('hidden'), 2000)
}
function setState(state, btn) {
// 重置按钮
document.querySelectorAll('.state-btn').forEach(b => b.classList.remove('active'))
btn.classList.add('active')
// 重置所有状态
cancelExit()
const exitBtn = document.getElementById('exitBtn')
exitBtn.classList.remove('hover')
switch(state) {
case 'default':
break
case 'hover':
exitBtn.classList.add('hover')
break
case 'confirm':
showConfirm()
break
}
}
</script>
</body>
</html>