1
zhang
9 小时以前 6c229bdd8c538ef4990a6c54ecfc081a7e95c923
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<!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>