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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="zh-CN">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Meting API - 强大的音乐服务接口</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');
|
| 11 |
+
|
| 12 |
+
body {
|
| 13 |
+
font-family: 'Noto Sans SC', sans-serif;
|
| 14 |
+
/* MODIFIED: Slightly softer gradient */
|
| 15 |
+
background: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 100%);
|
| 16 |
+
min-height: 100vh;
|
| 17 |
+
color: #374151; /* Default text color */
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
.card {
|
| 21 |
+
transition: all 0.3s ease-in-out; /* MODIFIED: Smoother transition */
|
| 22 |
+
box-shadow: 0 8px 16px rgba(0,0,0,0.08); /* MODIFIED: Softer base shadow */
|
| 23 |
+
border-radius: 12px;
|
| 24 |
+
overflow: hidden;
|
| 25 |
+
background: rgba(255,255,255,0.95); /* MODIFIED: Slightly more opaque for readability */
|
| 26 |
+
backdrop-filter: blur(8px); /* MODIFIED: Slightly stronger blur */
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
.card:hover {
|
| 30 |
+
transform: translateY(-6px); /* MODIFIED: Slightly more lift */
|
| 31 |
+
box-shadow: 0 12px 24px rgba(0,0,0,0.12); /* MODIFIED: More pronounced hover shadow */
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
.gradient-text {
|
| 35 |
+
background: linear-gradient(90deg, #3b82f6, #8b5cf6);
|
| 36 |
+
-webkit-background-clip: text;
|
| 37 |
+
background-clip: text;
|
| 38 |
+
color: transparent;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
.nav-link {
|
| 42 |
+
position: relative;
|
| 43 |
+
padding-bottom: 4px; /* ADDED: Space for underline */
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
.nav-link::after {
|
| 47 |
+
content: '';
|
| 48 |
+
position: absolute;
|
| 49 |
+
width: 0;
|
| 50 |
+
height: 2px;
|
| 51 |
+
bottom: 0;
|
| 52 |
+
left: 50%; /* MODIFIED: Start from center */
|
| 53 |
+
transform: translateX(-50%); /* MODIFIED: Center align */
|
| 54 |
+
background-color: #3b82f6;
|
| 55 |
+
transition: width 0.3s ease-in-out;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
.nav-link:hover::after, .nav-link.active::after { /* ADDED: Active state for underline */
|
| 59 |
+
width: 100%;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
.btn-primary {
|
| 63 |
+
background: linear-gradient(90deg, #3b82f6, #8b5cf6);
|
| 64 |
+
transition: all 0.3s ease-in-out;
|
| 65 |
+
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); /* ADDED: Base shadow for button */
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
.btn-primary:hover {
|
| 69 |
+
transform: translateY(-3px); /* MODIFIED: Consistent lift */
|
| 70 |
+
box-shadow: 0 7px 20px rgba(59, 130, 246, 0.45); /* MODIFIED: Enhanced hover shadow */
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
.fade-in {
|
| 74 |
+
/* JS will handle opacity and transform, this class is a marker */
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
/* Removed @keyframes fadeIn as JS handles this with IntersectionObserver and direct style manipulation */
|
| 78 |
+
|
| 79 |
+
.music-platform-badge { /* ADDED: Wrapper for platform icons + text */
|
| 80 |
+
transition: all 0.3s ease-in-out;
|
| 81 |
+
}
|
| 82 |
+
.music-platform-badge:hover {
|
| 83 |
+
transform: scale(1.05);
|
| 84 |
+
box-shadow: 0 6px 12px rgba(0,0,0,0.1);
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
.music-platform-icon {
|
| 88 |
+
width: 36px; /* MODIFIED: Slightly smaller */
|
| 89 |
+
height: 36px;
|
| 90 |
+
border-radius: 8px;
|
| 91 |
+
display: flex;
|
| 92 |
+
align-items: center;
|
| 93 |
+
justify-content: center;
|
| 94 |
+
color: white;
|
| 95 |
+
font-size: 18px; /* MODIFIED: Slightly smaller */
|
| 96 |
+
margin-right: 12px; /* MODIFIED: Adjusted margin */
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
.api-endpoint {
|
| 100 |
+
background-color: #f9fafb; /* MODIFIED: Slightly different bg */
|
| 101 |
+
border-left: 4px solid #3b82f6;
|
| 102 |
+
padding: 16px; /* MODIFIED: Adjusted padding */
|
| 103 |
+
border-radius: 0 8px 8px 0;
|
| 104 |
+
transition: all 0.3s ease-in-out;
|
| 105 |
+
border: 1px solid #e5e7eb; /* ADDED: Subtle border */
|
| 106 |
+
border-left-width: 4px; /* Keep colored border prominent */
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
.api-endpoint:hover {
|
| 110 |
+
background-color: #eff6ff;
|
| 111 |
+
transform: translateY(-3px); /* ADDED: Lift effect */
|
| 112 |
+
box-shadow: 0 6px 12px rgba(0,0,0,0.07); /* ADDED: Subtle shadow */
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
.tab-content {
|
| 116 |
+
display: none;
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
.tab-content.active {
|
| 120 |
+
display: block;
|
| 121 |
+
animation: tabFadeIn 0.5s ease-in-out; /* MODIFIED: Renamed and adjusted animation */
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
@keyframes tabFadeIn { /* ADDED: Specific animation for tab content */
|
| 125 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 126 |
+
to { opacity: 1; transform: translateY(0); }
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
.tab-btn { /* ADDED: Base styling for tab button */
|
| 130 |
+
transition: all 0.3s ease-in-out;
|
| 131 |
+
padding-bottom: 8px; /* ADDED: Space for border */
|
| 132 |
+
border-bottom: 2px solid transparent; /* ADDED: Placeholder for border */
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
.tab-btn.active {
|
| 136 |
+
color: #3b82f6;
|
| 137 |
+
border-bottom-color: #3b82f6; /* MODIFIED: Use border-bottom-color */
|
| 138 |
+
font-weight: 500; /* ADDED: Slightly bolder active tab */
|
| 139 |
+
}
|
| 140 |
+
/* ADDED: Code block styling */
|
| 141 |
+
.code-block {
|
| 142 |
+
background-color: #1f2937; /* Tailwind gray-800 */
|
| 143 |
+
color: #d1d5db; /* Tailwind gray-300 */
|
| 144 |
+
padding: 1rem;
|
| 145 |
+
border-radius: 8px;
|
| 146 |
+
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
| 147 |
+
font-size: 0.875rem;
|
| 148 |
+
line-height: 1.6;
|
| 149 |
+
overflow-x: auto;
|
| 150 |
+
box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* ADDED: Subtle shadow for code blocks */
|
| 151 |
+
}
|
| 152 |
+
.code-block code, .code-block pre {
|
| 153 |
+
background: transparent !important; /* Override any other background */
|
| 154 |
+
color: inherit !important;
|
| 155 |
+
}
|
| 156 |
+
</style>
|
| 157 |
+
</head>
|
| 158 |
+
<body class="antialiased">
|
| 159 |
+
<!-- Header -->
|
| 160 |
+
<header class="bg-white/80 backdrop-blur-md shadow-sm sticky top-0 z-50"> <!-- MODIFIED: Added backdrop-blur for glassy effect -->
|
| 161 |
+
<div class="container mx-auto px-6 py-4">
|
| 162 |
+
<div class="flex items-center justify-between">
|
| 163 |
+
<a href="#" class="flex items-center"> <!-- ADDED: Make logo a link -->
|
| 164 |
+
<i class="fas fa-music text-3xl text-blue-500 mr-3"></i> <!-- MODIFIED: Color -->
|
| 165 |
+
<h1 class="text-2xl font-bold gradient-text">Meting API</h1>
|
| 166 |
+
</a>
|
| 167 |
+
<nav id="main-nav" class="hidden md:flex md:items-center space-x-6 lg:space-x-8"> <!-- MODIFIED: id for JS, adjusted spacing -->
|
| 168 |
+
<a href="#features" class="nav-link text-gray-700 hover:text-blue-600 font-medium">功能特性</a>
|
| 169 |
+
<a href="#documentation" class="nav-link text-gray-700 hover:text-blue-600 font-medium">接口文档</a>
|
| 170 |
+
<a href="#examples" class="nav-link text-gray-700 hover:text-blue-600 font-medium">示例代码</a>
|
| 171 |
+
<a href="#authentication" class="nav-link text-gray-700 hover:text-blue-600 font-medium">鉴权说明</a>
|
| 172 |
+
</nav>
|
| 173 |
+
<button id="mobile-menu-button" class="md:hidden text-gray-700 hover:text-blue-600 focus:outline-none" aria-label="Toggle menu"> <!-- MODIFIED: id and aria-label -->
|
| 174 |
+
<i id="menu-icon" class="fas fa-bars text-2xl"></i> <!-- MODIFIED: id for icon change -->
|
| 175 |
+
</button>
|
| 176 |
+
</div>
|
| 177 |
+
</div>
|
| 178 |
+
<!-- Mobile Menu Container -->
|
| 179 |
+
<div id="mobile-menu-container" class="hidden md:hidden bg-white shadow-xl absolute top-full left-0 right-0 z-40">
|
| 180 |
+
<a href="#features" class="block py-3 px-6 text-gray-700 hover:bg-blue-50 hover:text-blue-600">功能特性</a>
|
| 181 |
+
<a href="#documentation" class="block py-3 px-6 text-gray-700 hover:bg-blue-50 hover:text-blue-600">接口文档</a>
|
| 182 |
+
<a href="#examples" class="block py-3 px-6 text-gray-700 hover:bg-blue-50 hover:text-blue-600">示例代码</a>
|
| 183 |
+
<a href="#authentication" class="block py-3 px-6 text-gray-700 hover:bg-blue-50 hover:text-blue-600">鉴权说明</a>
|
| 184 |
+
</div>
|
| 185 |
+
</header>
|
| 186 |
+
|
| 187 |
+
<!-- Hero Section -->
|
| 188 |
+
<section class="py-20 lg:py-28"> <!-- MODIFIED: Increased padding -->
|
| 189 |
+
<div class="container mx-auto px-6 text-center">
|
| 190 |
+
<div class="max-w-4xl mx-auto">
|
| 191 |
+
<h1 class="text-4xl md:text-5xl lg:text-6xl font-bold mb-6">强大而优雅的<span class="gradient-text">音乐服务接口</span></h1> <!-- MODIFIED: Slightly larger on lg -->
|
| 192 |
+
<p class="text-lg md:text-xl text-gray-600 mb-10">支持多平台无缝集成,为您的应用提供全面的音乐服务能力</p>
|
| 193 |
+
<div class="flex flex-wrap justify-center gap-4 mb-12">
|
| 194 |
+
<!-- MODIFIED: Added music-platform-badge class for hover effect -->
|
| 195 |
+
<div class="music-platform-badge flex items-center bg-white px-4 py-2 rounded-full shadow-md">
|
| 196 |
+
<div class="music-platform-icon bg-red-500"><i class="fab fa-napster"></i></div>
|
| 197 |
+
<span class="text-gray-700 font-medium">网易云音乐</span>
|
| 198 |
+
</div>
|
| 199 |
+
<div class="music-platform-badge flex items-center bg-white px-4 py-2 rounded-full shadow-md">
|
| 200 |
+
<div class="music-platform-icon bg-blue-500"><i class="fab fa-qq"></i></div>
|
| 201 |
+
<span class="text-gray-700 font-medium">QQ音乐</span>
|
| 202 |
+
</div>
|
| 203 |
+
<div class="music-platform-badge flex items-center bg-white px-4 py-2 rounded-full shadow-md">
|
| 204 |
+
<div class="music-platform-icon bg-green-500"><i class="fas fa-headphones-alt"></i></div> <!-- MODIFIED: Icon for Kugou -->
|
| 205 |
+
<span class="text-gray-700 font-medium">酷狗音乐</span>
|
| 206 |
+
</div>
|
| 207 |
+
<div class="music-platform-badge flex items-center bg-white px-4 py-2 rounded-full shadow-md">
|
| 208 |
+
<div class="music-platform-icon bg-purple-500"><i class="fas fa-compact-disc"></i></div> <!-- MODIFIED: Icon for Kuwo -->
|
| 209 |
+
<span class="text-gray-700 font-medium">酷我音乐</span>
|
| 210 |
+
</div>
|
| 211 |
+
</div>
|
| 212 |
+
<div>
|
| 213 |
+
<a href="#documentation" class="btn-primary text-white font-semibold py-3 px-10 rounded-full inline-block text-lg">开始使用</a> <!-- MODIFIED: font-semibold, px-10, text-lg -->
|
| 214 |
+
</div>
|
| 215 |
+
</div>
|
| 216 |
+
</div>
|
| 217 |
+
</section>
|
| 218 |
+
|
| 219 |
+
<!-- Features Section -->
|
| 220 |
+
<section id="features" class="py-16 bg-white">
|
| 221 |
+
<div class="container mx-auto px-6">
|
| 222 |
+
<h2 class="text-3xl lg:text-4xl font-bold text-center mb-16">核心<span class="gradient-text">功能特性</span></h2>
|
| 223 |
+
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8"> <!-- MODIFIED: md:grid-cols-2 for better spacing on medium screens -->
|
| 224 |
+
<div class="card p-8 fade-in">
|
| 225 |
+
<div class="text-blue-500 mb-4">
|
| 226 |
+
<i class="fas fa-bolt text-4xl"></i>
|
| 227 |
+
</div>
|
| 228 |
+
<h3 class="text-xl font-bold mb-3 text-gray-800">多平台支持</h3>
|
| 229 |
+
<p class="text-gray-600">集成网易云音乐、QQ音乐、酷狗音乐、酷我音乐四大平台,一站式解决音乐服务需求。</p>
|
| 230 |
+
</div>
|
| 231 |
+
<div class="card p-8 fade-in" style="animation-delay: 0.15s;"> <!-- MODIFIED: animation-delay if using CSS animations -->
|
| 232 |
+
<div class="text-blue-500 mb-4">
|
| 233 |
+
<i class="fas fa-shield-alt text-4xl"></i>
|
| 234 |
+
</div>
|
| 235 |
+
<h3 class="text-xl font-bold mb-3 text-gray-800">安全鉴权</h3>
|
| 236 |
+
<p class="text-gray-600">采用HMAC-SHA256签名算法,包含时间戳和随机数,有效防止重放攻击。</p>
|
| 237 |
+
</div>
|
| 238 |
+
<div class="card p-8 fade-in md:col-span-2 lg:col-span-1" style="animation-delay: 0.3s;"> <!-- MODIFIED: Spanning for 2-col layout -->
|
| 239 |
+
<div class="text-blue-500 mb-4">
|
| 240 |
+
<i class="fas fa-tachometer-alt text-4xl"></i>
|
| 241 |
+
</div>
|
| 242 |
+
<h3 class="text-xl font-bold mb-3 text-gray-800">高性能</h3>
|
| 243 |
+
<p class="text-gray-600">优化的接口设计,毫秒级响应,支持高并发请求,满足各种业务场景需求。</p>
|
| 244 |
+
</div>
|
| 245 |
+
</div>
|
| 246 |
+
</div>
|
| 247 |
+
</section>
|
| 248 |
+
|
| 249 |
+
<!-- Documentation Section -->
|
| 250 |
+
<section id="documentation" class="py-16 bg-gray-50"> <!-- MODIFIED: bg-gray-50 to bg-slate-50 (Tailwind v3+) or keep bg-gray-50 -->
|
| 251 |
+
<div class="container mx-auto px-6">
|
| 252 |
+
<h2 class="text-3xl lg:text-4xl font-bold text-center mb-12">接口<span class="gradient-text">文档</span></h2>
|
| 253 |
+
|
| 254 |
+
<div class="max-w-5xl mx-auto"> <!-- MODIFIED: max-w-5xl for wider content area -->
|
| 255 |
+
<div class="flex border-b border-gray-300 mb-8 justify-center"> <!-- MODIFIED: Centered tabs -->
|
| 256 |
+
<button class="tab-btn py-3 px-6 font-medium text-gray-600 hover:text-blue-600 active" onclick="openTab(event, 'parameters')">接口参数</button>
|
| 257 |
+
<button class="tab-btn py-3 px-6 font-medium text-gray-600 hover:text-blue-600" onclick="openTab(event, 'endpoints')">API端点</button>
|
| 258 |
+
<button class="tab-btn py-3 px-6 font-medium text-gray-600 hover:text-blue-600" onclick="openTab(event, 'responses')">返回示例</button>
|
| 259 |
+
</div>
|
| 260 |
+
|
| 261 |
+
<div id="parameters" class="tab-content active">
|
| 262 |
+
<div class="card p-6 mb-6">
|
| 263 |
+
<h3 class="text-xl font-bold mb-4 flex items-center text-gray-800">
|
| 264 |
+
<i class="fas fa-sliders-h text-blue-500 mr-3"></i> 基本参数
|
| 265 |
+
</h3>
|
| 266 |
+
<div class="overflow-x-auto">
|
| 267 |
+
<table class="min-w-full bg-white">
|
| 268 |
+
<thead class="bg-gray-100">
|
| 269 |
+
<tr>
|
| 270 |
+
<th class="py-3 px-4 text-left text-sm font-semibold text-gray-600 uppercase">参数</th>
|
| 271 |
+
<th class="py-3 px-4 text-left text-sm font-semibold text-gray-600 uppercase">可选值</th>
|
| 272 |
+
<th class="py-3 px-4 text-left text-sm font-semibold text-gray-600 uppercase">说明</th>
|
| 273 |
+
</tr>
|
| 274 |
+
</thead>
|
| 275 |
+
<tbody>
|
| 276 |
+
<tr class="border-b border-gray-200">
|
| 277 |
+
<td class="py-3 px-4 font-medium text-gray-700">server</td>
|
| 278 |
+
<td class="py-3 px-4 text-blue-600">netease, tencent, kugou, kuwo</td>
|
| 279 |
+
<td class="py-3 px-4 text-gray-600">数据源,默认为netease</td>
|
| 280 |
+
</tr>
|
| 281 |
+
<tr class="border-b border-gray-200">
|
| 282 |
+
<td class="py-3 px-4 font-medium text-gray-700">type</td>
|
| 283 |
+
<td class="py-3 px-4 text-blue-600">name, artist, url, pic, lrc, song, playlist</td>
|
| 284 |
+
<td class="py-3 px-4 text-gray-600">请求类型,如获取URL、歌词、封面等</td>
|
| 285 |
+
</tr>
|
| 286 |
+
<tr>
|
| 287 |
+
<td class="py-3 px-4 font-medium text-gray-700">id</td>
|
| 288 |
+
<td class="py-3 px-4 text-gray-500">-</td>
|
| 289 |
+
<td class="py-3 px-4 text-gray-600">歌曲或歌单ID</td>
|
| 290 |
+
</tr>
|
| 291 |
+
</tbody>
|
| 292 |
+
</table>
|
| 293 |
+
</div>
|
| 294 |
+
</div>
|
| 295 |
+
</div>
|
| 296 |
+
|
| 297 |
+
<div id="endpoints" class="tab-content">
|
| 298 |
+
<div class="space-y-6">
|
| 299 |
+
<div class="api-endpoint card"> <!-- MODIFIED: added card class to share hover effects if desired, or keep distinct -->
|
| 300 |
+
<div class="flex items-start">
|
| 301 |
+
<div class="bg-blue-100 text-blue-600 rounded-full p-3 mr-4 mt-1"> <!-- MODIFIED: color, padding -->
|
| 302 |
+
<i class="fas fa-link text-lg"></i>
|
| 303 |
+
</div>
|
| 304 |
+
<div>
|
| 305 |
+
<h4 class="font-bold text-lg mb-1 text-gray-800">获取音乐URL</h4>
|
| 306 |
+
<p class="text-gray-600 mb-3 text-sm">获取指定歌曲的播放地址(需要鉴权)</p>
|
| 307 |
+
<div class="code-block"> <!-- MODIFIED: Use .code-block class -->
|
| 308 |
+
<code>GET https://api.ixingchen.org.cn/unms/u/?type=url&id=416892104&auth={SIGNATURE}|{TIMESTAMP}|{NONCE}</code>
|
| 309 |
+
</div>
|
| 310 |
+
</div>
|
| 311 |
+
</div>
|
| 312 |
+
</div>
|
| 313 |
+
|
| 314 |
+
<div class="api-endpoint card">
|
| 315 |
+
<div class="flex items-start">
|
| 316 |
+
<div class="bg-green-100 text-green-600 rounded-full p-3 mr-4 mt-1">
|
| 317 |
+
<i class="fas fa-info-circle text-lg"></i>
|
| 318 |
+
</div>
|
| 319 |
+
<div>
|
| 320 |
+
<h4 class="font-bold text-lg mb-1 text-gray-800">获取歌曲信息</h4>
|
| 321 |
+
<p class="text-gray-600 mb-3 text-sm">获取歌曲的详细信息,包括名称、歌手、封面等</p>
|
| 322 |
+
<div class="code-block">
|
| 323 |
+
<code>GET https://api.ixingchen.org.cn/unms/u/?type=song&id=591321</code>
|
| 324 |
+
</div>
|
| 325 |
+
</div>
|
| 326 |
+
</div>
|
| 327 |
+
</div>
|
| 328 |
+
|
| 329 |
+
<div class="api-endpoint card">
|
| 330 |
+
<div class="flex items-start">
|
| 331 |
+
<div class="bg-purple-100 text-purple-600 rounded-full p-3 mr-4 mt-1">
|
| 332 |
+
<i class="fas fa-list-alt text-lg"></i> <!-- MODIFIED: Icon -->
|
| 333 |
+
</div>
|
| 334 |
+
<div>
|
| 335 |
+
<h4 class="font-bold text-lg mb-1 text-gray-800">获取歌单</h4>
|
| 336 |
+
<p class="text-gray-600 mb-3 text-sm">获取指定歌单的所有歌曲列表</p>
|
| 337 |
+
<div class="code-block">
|
| 338 |
+
<code>GET https://api.ixingchen.org.cn/unms/u/?type=playlist&id=2619366284</code>
|
| 339 |
+
</div>
|
| 340 |
+
</div>
|
| 341 |
+
</div>
|
| 342 |
+
</div>
|
| 343 |
+
</div>
|
| 344 |
+
</div>
|
| 345 |
+
|
| 346 |
+
<div id="responses" class="tab-content">
|
| 347 |
+
<div class="card p-6">
|
| 348 |
+
<h3 class="text-xl font-bold mb-4 flex items-center text-gray-800">
|
| 349 |
+
<i class="fas fa-code text-blue-500 mr-3"></i> 返回示例
|
| 350 |
+
</h3>
|
| 351 |
+
|
| 352 |
+
<div class="mb-6">
|
| 353 |
+
<h4 class="font-semibold mb-2 text-blue-600">获取歌曲信息响应</h4>
|
| 354 |
+
<div class="code-block"> <!-- MODIFIED: Use .code-block class -->
|
| 355 |
+
<pre>{
|
| 356 |
+
"code": 200,
|
| 357 |
+
"data": {
|
| 358 |
+
"name": "起风了",
|
| 359 |
+
"artist": "买辣椒也用券",
|
| 360 |
+
"url": "https://api.ixingchen.org.cn/unms/u/?type=url&id=416892104&auth=...",
|
| 361 |
+
"pic": "https://api.ixingchen.org.cn/unms/u/?type=pic&id=416892104&auth=...",
|
| 362 |
+
"lrc": "https://api.ixingchen.org.cn/unms/u/?type=lrc&id=416892104&auth=..."
|
| 363 |
+
}
|
| 364 |
+
}</pre>
|
| 365 |
+
</div>
|
| 366 |
+
</div>
|
| 367 |
+
|
| 368 |
+
<div>
|
| 369 |
+
<h4 class="font-semibold mb-2 text-blue-600">获取歌单响应</h4>
|
| 370 |
+
<div class="code-block"> <!-- MODIFIED: Use .code-block class -->
|
| 371 |
+
<pre>{
|
| 372 |
+
"code": 200,
|
| 373 |
+
"data": [
|
| 374 |
+
{
|
| 375 |
+
"id": "1363948882",
|
| 376 |
+
"name": "晴天",
|
| 377 |
+
"artist": "周杰伦",
|
| 378 |
+
"url": "https://api.ixingchen.org.cn/unms/u/?type=url&id=1363948882&auth=..."
|
| 379 |
+
},
|
| 380 |
+
{
|
| 381 |
+
"id": "1824045033",
|
| 382 |
+
"name": "七里香",
|
| 383 |
+
"artist": "周杰伦",
|
| 384 |
+
"url": "https://api.ixingchen.org.cn/unms/u/?type=url&id=1824045033&auth=..."
|
| 385 |
+
}
|
| 386 |
+
// ... more songs
|
| 387 |
+
]
|
| 388 |
+
}</pre>
|
| 389 |
+
</div>
|
| 390 |
+
</div>
|
| 391 |
+
</div>
|
| 392 |
+
</div>
|
| 393 |
+
</div>
|
| 394 |
+
</div>
|
| 395 |
+
</section>
|
| 396 |
+
|
| 397 |
+
<!-- Authentication Section -->
|
| 398 |
+
<section id="authentication" class="py-16 bg-white">
|
| 399 |
+
<div class="container mx-auto px-6">
|
| 400 |
+
<h2 class="text-3xl lg:text-4xl font-bold text-center mb-12">鉴权<span class="gradient-text">说明</span></h2>
|
| 401 |
+
|
| 402 |
+
<div class="max-w-4xl mx-auto">
|
| 403 |
+
<div class="card p-8">
|
| 404 |
+
<div class="flex items-start mb-6">
|
| 405 |
+
<div class="bg-red-100 text-red-600 rounded-full p-3 mr-4 flex-shrink-0"> <!-- MODIFIED: color, padding -->
|
| 406 |
+
<i class="fas fa-lock text-xl"></i>
|
| 407 |
+
</div>
|
| 408 |
+
<div>
|
| 409 |
+
<h3 class="text-xl font-bold mb-2 text-gray-800">需要鉴权的API</h3>
|
| 410 |
+
<p class="text-gray-600 mb-4">以下API请求需要添加鉴权参数:</p>
|
| 411 |
+
<ul class="list-disc list-inside pl-1 space-y-2 text-gray-700"> <!-- MODIFIED: list-inside -->
|
| 412 |
+
<li>获取音乐URL (<code class="text-sm bg-gray-100 px-1 rounded">type=url</code>)</li>
|
| 413 |
+
<li>获取封面图片 (<code class="text-sm bg-gray-100 px-1 rounded">type=pic</code>)</li>
|
| 414 |
+
<li>获取歌词 (<code class="text-sm bg-gray-100 px-1 rounded">type=lrc</code>)</li>
|
| 415 |
+
</ul>
|
| 416 |
+
</div>
|
| 417 |
+
</div>
|
| 418 |
+
|
| 419 |
+
<!-- MODIFIED: Alert styling -->
|
| 420 |
+
<div class="bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-6 rounded-md">
|
| 421 |
+
<div class="flex">
|
| 422 |
+
<div class="flex-shrink-0">
|
| 423 |
+
<i class="fas fa-exclamation-triangle text-yellow-500 mt-0.5"></i> <!-- MODIFIED: icon and margin -->
|
| 424 |
+
</div>
|
| 425 |
+
<div class="ml-3">
|
| 426 |
+
<p class="text-sm text-yellow-800">
|
| 427 |
+
鉴权参数有效期为<strong class="font-medium">300秒</strong>,过期后需要重新生成。
|
| 428 |
+
</p>
|
| 429 |
+
</div>
|
| 430 |
+
</div>
|
| 431 |
+
</div>
|
| 432 |
+
|
| 433 |
+
<div class="mb-6">
|
| 434 |
+
<h4 class="font-bold text-lg mb-3 text-gray-800">鉴权参数格式</h4>
|
| 435 |
+
<div class="code-block mb-3"> <!-- MODIFIED: Use .code-block class -->
|
| 436 |
+
<code>auth=签名|时间戳|随机数</code>
|
| 437 |
+
</div>
|
| 438 |
+
<p class="text-gray-600">签名由服务器使用HMAC-SHA256算法生成,包含时间戳和随机数以防止重放攻击。</p>
|
| 439 |
+
</div>
|
| 440 |
+
|
| 441 |
+
<div>
|
| 442 |
+
<h4 class="font-bold text-lg mb-3 text-gray-800">示例请求</h4>
|
| 443 |
+
<div class="code-block"> <!-- MODIFIED: Use .code-block class -->
|
| 444 |
+
<code>GET https://api.ixingchen.org.cn/unms/u/?type=url&id=416892104&auth={SIGNATURE}|{TIMESTAMP}|{NONCE}</code>
|
| 445 |
+
</div>
|
| 446 |
+
</div>
|
| 447 |
+
</div>
|
| 448 |
+
</div>
|
| 449 |
+
</div>
|
| 450 |
+
</section>
|
| 451 |
+
|
| 452 |
+
<!-- Footer -->
|
| 453 |
+
<footer class="bg-slate-800 text-slate-300 py-12"> <!-- MODIFIED: Tailwind v3 slate colors, adjust if using older Tailwind -->
|
| 454 |
+
<div class="container mx-auto px-6">
|
| 455 |
+
<div class="flex flex-col md:flex-row justify-between items-center">
|
| 456 |
+
<div class="mb-6 md:mb-0 text-center md:text-left">
|
| 457 |
+
<div class="flex items-center justify-center md:justify-start">
|
| 458 |
+
<i class="fas fa-music text-2xl text-blue-400 mr-3"></i>
|
| 459 |
+
<span class="text-xl font-bold text-white">Meting API</span>
|
| 460 |
+
</div>
|
| 461 |
+
<p class="text-slate-400 mt-2 text-sm">强大而优雅的音乐服务接口</p>
|
| 462 |
+
</div>
|
| 463 |
+
<div class="flex space-x-6">
|
| 464 |
+
<a href="#" class="text-slate-400 hover:text-blue-400 transition-colors duration-300" aria-label="GitHub">
|
| 465 |
+
<i class="fab fa-github text-2xl"></i>
|
| 466 |
+
</a>
|
| 467 |
+
<a href="#" class="text-slate-400 hover:text-blue-400 transition-colors duration-300" aria-label="Weixin">
|
| 468 |
+
<i class="fab fa-weixin text-2xl"></i>
|
| 469 |
+
</a>
|
| 470 |
+
<a href="#" class="text-slate-400 hover:text-blue-400 transition-colors duration-300" aria-label="Email">
|
| 471 |
+
<i class="fas fa-envelope text-2xl"></i>
|
| 472 |
+
</a>
|
| 473 |
+
</div>
|
| 474 |
+
</div>
|
| 475 |
+
<div class="border-t border-slate-700 mt-8 pt-8 text-center text-slate-400 text-sm">
|
| 476 |
+
<p>此API基于 <a href="https://github.com/metowolf/Meting" target="_blank" rel="noopener noreferrer" class="text-blue-400 hover:underline">Meting</a> 构建</p>
|
| 477 |
+
<p class="mt-2">© <script>document.write(new Date().getFullYear())</script> Meting API. All rights reserved.</p>
|
| 478 |
+
</div>
|
| 479 |
+
</div>
|
| 480 |
+
</footer>
|
| 481 |
+
|
| 482 |
+
<script>
|
| 483 |
+
// Tab functionality
|
| 484 |
+
function openTab(evt, tabName) {
|
| 485 |
+
const tabContents = document.getElementsByClassName("tab-content");
|
| 486 |
+
for (let i = 0; i < tabContents.length; i++) {
|
| 487 |
+
tabContents[i].classList.remove("active");
|
| 488 |
+
}
|
| 489 |
+
|
| 490 |
+
const tabButtons = document.getElementsByClassName("tab-btn");
|
| 491 |
+
for (let i = 0; i < tabButtons.length; i++) {
|
| 492 |
+
tabButtons[i].classList.remove("active");
|
| 493 |
+
}
|
| 494 |
+
|
| 495 |
+
document.getElementById(tabName).classList.add("active");
|
| 496 |
+
evt.currentTarget.classList.add("active");
|
| 497 |
+
}
|
| 498 |
+
|
| 499 |
+
// Smooth scrolling for anchor links
|
| 500 |
+
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
| 501 |
+
anchor.addEventListener('click', function (e) {
|
| 502 |
+
e.preventDefault();
|
| 503 |
+
const targetElement = document.querySelector(this.getAttribute('href'));
|
| 504 |
+
if (targetElement) {
|
| 505 |
+
targetElement.scrollIntoView({
|
| 506 |
+
behavior: 'smooth'
|
| 507 |
+
});
|
| 508 |
+
}
|
| 509 |
+
// Close mobile menu if open after clicking a link
|
| 510 |
+
const mobileMenu = document.getElementById('mobile-menu-container');
|
| 511 |
+
const menuIcon = document.getElementById('menu-icon');
|
| 512 |
+
if (!mobileMenu.classList.contains('hidden')) {
|
| 513 |
+
mobileMenu.classList.add('hidden');
|
| 514 |
+
menuIcon.classList.remove('fa-times');
|
| 515 |
+
menuIcon.classList.add('fa-bars');
|
| 516 |
+
}
|
| 517 |
+
});
|
| 518 |
+
});
|
| 519 |
+
|
| 520 |
+
// Mobile menu toggle
|
| 521 |
+
const mobileMenuButton = document.getElementById('mobile-menu-button');
|
| 522 |
+
const mobileMenuContainer = document.getElementById('mobile-menu-container');
|
| 523 |
+
const menuIcon = document.getElementById('menu-icon');
|
| 524 |
+
|
| 525 |
+
if (mobileMenuButton && mobileMenuContainer && menuIcon) {
|
| 526 |
+
mobileMenuButton.addEventListener('click', function() {
|
| 527 |
+
mobileMenuContainer.classList.toggle('hidden');
|
| 528 |
+
if (mobileMenuContainer.classList.contains('hidden')) {
|
| 529 |
+
menuIcon.classList.remove('fa-times');
|
| 530 |
+
menuIcon.classList.add('fa-bars');
|
| 531 |
+
} else {
|
| 532 |
+
menuIcon.classList.remove('fa-bars');
|
| 533 |
+
menuIcon.classList.add('fa-times');
|
| 534 |
+
}
|
| 535 |
+
});
|
| 536 |
+
}
|
| 537 |
+
|
| 538 |
+
// Animation on scroll (Intersection Observer)
|
| 539 |
+
const fadeElements = document.querySelectorAll('.fade-in');
|
| 540 |
+
|
| 541 |
+
const fadeInObserver = new IntersectionObserver((entries, observer) => { // ADDED: observer parameter
|
| 542 |
+
entries.forEach(entry => {
|
| 543 |
+
if (entry.isIntersecting) {
|
| 544 |
+
// Use a timeout to allow CSS animation-delay to work if defined inline
|
| 545 |
+
// Or, directly apply transition with JS controlled delay
|
| 546 |
+
const delay = parseFloat(entry.target.style.animationDelay) * 1000 || 0;
|
| 547 |
+
|
| 548 |
+
setTimeout(() => {
|
| 549 |
+
entry.target.style.opacity = 1;
|
| 550 |
+
entry.target.style.transform = 'translateY(0)';
|
| 551 |
+
}, delay);
|
| 552 |
+
observer.unobserve(entry.target); // ADDED: Unobserve after animation
|
| 553 |
+
}
|
| 554 |
+
});
|
| 555 |
+
}, { threshold: 0.1 }); // Trigger when 10% of the element is visible
|
| 556 |
+
|
| 557 |
+
fadeElements.forEach(element => {
|
| 558 |
+
element.style.opacity = 0; // Initial state for JS transition
|
| 559 |
+
element.style.transform = 'translateY(20px)'; // Initial state
|
| 560 |
+
element.style.transition = 'opacity 0.6s ease-out, transform 0.6s ease-out'; // JS driven transition
|
| 561 |
+
// Note: if you use CSS @keyframes, the JS above might conflict.
|
| 562 |
+
// The provided HTML had inline animation-delay, which works with CSS animations.
|
| 563 |
+
// This JS version makes the animation itself JS-driven.
|
| 564 |
+
fadeInObserver.observe(element);
|
| 565 |
+
});
|
| 566 |
+
|
| 567 |
+
// Active Nav Link highlighting on scroll (Optional, but nice for UX)
|
| 568 |
+
const sections = document.querySelectorAll("section[id]");
|
| 569 |
+
const navLinks = document.querySelectorAll("header nav a.nav-link");
|
| 570 |
+
|
| 571 |
+
window.addEventListener("scroll", () => {
|
| 572 |
+
let current = "";
|
| 573 |
+
sections.forEach((section) => {
|
| 574 |
+
const sectionTop = section.offsetTop;
|
| 575 |
+
const sectionHeight = section.clientHeight;
|
| 576 |
+
// Adjust offset if header is sticky and tall
|
| 577 |
+
if (pageYOffset >= sectionTop - sectionHeight / 3 - 60) {
|
| 578 |
+
current = section.getAttribute("id");
|
| 579 |
+
}
|
| 580 |
+
});
|
| 581 |
+
|
| 582 |
+
navLinks.forEach((link) => {
|
| 583 |
+
link.classList.remove("active"); // Assumes .active class handles the underline via .nav-link.active::after
|
| 584 |
+
if (link.getAttribute("href") === `#${current}`) {
|
| 585 |
+
link.classList.add("active");
|
| 586 |
+
}
|
| 587 |
+
});
|
| 588 |
+
});
|
| 589 |
+
|
| 590 |
+
</script>
|
| 591 |
+
</body>
|
| 592 |
+
</html>
|