<!DOCTYPE html>
|
<html lang="zh-CN">
|
<head>
|
<meta charset="UTF-8">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<style>
|
* {
|
margin: 0;
|
padding: 0;
|
box-sizing: border-box;
|
}
|
|
body {
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
|
background: linear-gradient(135deg, #ffffff, #f8f9fa);
|
padding: 20px;
|
}
|
|
h3 {
|
font-size: 18px;
|
background: linear-gradient(135deg, #0066cc, #00c6ff);
|
-webkit-background-clip: text;
|
-webkit-text-fill-color: transparent;
|
background-clip: text;
|
margin-bottom: 20px;
|
cursor: pointer;
|
font-weight: 700;
|
padding-bottom: 15px;
|
border-bottom: 2px solid #e0e0e0;
|
position: relative;
|
}
|
|
h3::after {
|
content: '';
|
position: absolute;
|
bottom: -2px;
|
left: 0;
|
width: 40px;
|
height: 2px;
|
background: linear-gradient(90deg, #0066cc, #00c6ff);
|
}
|
|
.sidebar-menu {
|
list-style: none;
|
}
|
|
/* 一级菜单项 */
|
.sidebar-menu > li {
|
padding: 12px 15px;
|
cursor: pointer;
|
color: #555;
|
font-size: 14px;
|
border-radius: 8px;
|
margin-bottom: 5px;
|
transition: all 0.3s ease;
|
position: relative;
|
overflow: hidden;
|
font-weight: 600;
|
}
|
|
.sidebar-menu > li::before {
|
content: '';
|
position: absolute;
|
left: 0;
|
top: 0;
|
height: 100%;
|
width: 3px;
|
background: linear-gradient(180deg, #0066cc, #00c6ff);
|
transform: scaleY(0);
|
transition: transform 0.3s ease;
|
}
|
|
.sidebar-menu > li:hover {
|
background: linear-gradient(135deg, #e8f4ff, #d4e9ff);
|
box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
|
}
|
|
.sidebar-menu > li:hover::before {
|
transform: scaleY(1);
|
}
|
|
.sidebar-menu > li.active {
|
background: linear-gradient(135deg, #0066cc, #0052a3);
|
color: #fff;
|
box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
|
}
|
|
/* 二级菜单容器 */
|
.submenu {
|
list-style: none;
|
margin-top: 5px;
|
margin-left: 10px;
|
margin-bottom: 10px;
|
display: none;
|
}
|
|
/* 展开的二级菜单 */
|
.submenu.expanded {
|
display: block;
|
}
|
|
/* 二级菜单项 */
|
.submenu li {
|
padding: 8px 15px;
|
cursor: pointer;
|
color: #666;
|
font-size: 13px;
|
border-radius: 6px;
|
margin-bottom: 3px;
|
transition: all 0.3s ease;
|
position: relative;
|
}
|
|
.submenu li:hover {
|
background: rgba(0, 102, 204, 0.08);
|
padding-left: 20px;
|
}
|
|
.submenu li.active {
|
background: rgba(0, 102, 204, 0.15);
|
color: #0066cc;
|
font-weight: 500;
|
}
|
|
/* 菜单链接 */
|
.sidebar-menu a {
|
color: inherit;
|
text-decoration: none;
|
display: block;
|
transition: color 0.3s ease;
|
}
|
|
/* 展开/折叠图标 */
|
.menu-toggle {
|
float: right;
|
font-size: 12px;
|
transition: transform 0.3s ease;
|
}
|
|
.menu-toggle.expanded {
|
transform: rotate(90deg);
|
}
|
|
/* 滚动条美化 */
|
::-webkit-scrollbar {
|
width: 6px;
|
}
|
|
::-webkit-scrollbar-track {
|
background: #f1f1f1;
|
border-radius: 3px;
|
}
|
|
::-webkit-scrollbar-thumb {
|
background: linear-gradient(135deg, #667eea, #764ba2);
|
border-radius: 3px;
|
}
|
|
::-webkit-scrollbar-thumb:hover {
|
background: linear-gradient(135deg, #764ba2, #667eea);
|
}
|
</style>
|
</head>
|
<body>
|
<h3>RCS接口文档</h3>
|
<ul class="sidebar-menu">
|
<!-- 概览类 -->
|
<li onclick="toggleSubmenu(this)">
|
概览
|
<span class="menu-toggle expanded">▶</span>
|
<ul class="submenu expanded">
|
<li><a href="javascript:void(0);" onclick="scrollToSection('api-overview'); event.stopPropagation(); return false;">接口概览</a></li>
|
<li><a href="javascript:void(0);" onclick="scrollToSection('error-codes'); event.stopPropagation(); return false;">错误码说明</a></li>
|
</ul>
|
</li>
|
|
<!-- 任务管理类 -->
|
<li onclick="toggleSubmenu(this)">
|
任务管理
|
<span class="menu-toggle">▶</span>
|
<ul class="submenu expanded">
|
<li><a href="javascript:void(0);" onclick="scrollToSection('api-task-create'); event.stopPropagation(); return false;">生成任务单*</a></li>
|
<li><a href="javascript:void(0);" onclick="scrollToSection('api-task-cancel'); event.stopPropagation(); return false;">取消任务*</a></li>
|
<li><a href="javascript:void(0);" onclick="scrollToSection('api-task-notice'); event.stopPropagation(); return false;">任务执行通知*</a></li>
|
<li><a href="javascript:void(0);" onclick="scrollToSection('api-task-priority'); event.stopPropagation(); return false;">申请入库任务*</a></li>
|
</ul>
|
</li>
|
|
<!-- 设备管理类 -->
|
<!-- <li onclick="toggleSubmenu(this)">
|
设备管理
|
<span class="menu-toggle">▶</span>
|
<ul class="submenu expanded">
|
<li><a href="javascript:void(0);" onclick="scrollToSection('api-loc-status'); event.stopPropagation(); return false;">库位状态修改</a></li>
|
</ul>
|
</li> -->
|
</ul>
|
|
<script>
|
// 切换二级菜单展开/折叠
|
function toggleSubmenu(element) {
|
const submenu = element.querySelector('.submenu');
|
const menuToggle = element.querySelector('.menu-toggle');
|
|
if (submenu) {
|
submenu.classList.toggle('expanded');
|
}
|
|
if (menuToggle) {
|
menuToggle.classList.toggle('expanded');
|
}
|
}
|
|
// 滚动到指定章节
|
function scrollToSection(sectionId) {
|
window.parent.postMessage({
|
type: 'scrollToSection',
|
sectionId: sectionId
|
}, '*');
|
}
|
</script>
|
</body>
|
</html>
|