mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-03-21 11:03:15 +00:00
- Enhanced styling for better user experience on qrlogin-nocookie.html and qrlogin.html - Added loading indicators and improved status messages during QR code login process - Updated error handling for login status retrieval - Refactored unblock_test.html for better layout and user interaction - Improved voice upload page with a more intuitive design and better feedback for file uploads - Added loading state management for voice list retrieval - Enhanced accessibility and usability across all modified pages
194 lines
4.5 KiB
HTML
194 lines
4.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>API 调试界面</title>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
min-height: 100vh;
|
|
background: #f5f5f5;
|
|
padding: 20px;
|
|
}
|
|
|
|
.container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
background: white;
|
|
border-radius: 12px;
|
|
padding: 32px;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
h1 {
|
|
font-size: 24px;
|
|
font-weight: 600;
|
|
color: #333;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.form-row {
|
|
display: flex;
|
|
gap: 12px;
|
|
align-items: center;
|
|
}
|
|
|
|
label {
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
color: #555;
|
|
min-width: 80px;
|
|
}
|
|
|
|
input, select {
|
|
padding: 10px 14px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
flex: 1;
|
|
outline: none;
|
|
}
|
|
|
|
input:focus, select:focus {
|
|
border-color: #333;
|
|
}
|
|
|
|
button {
|
|
background: #333;
|
|
color: white;
|
|
padding: 10px 24px;
|
|
border: none;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: background 0.2s ease;
|
|
}
|
|
|
|
button:hover {
|
|
background: #555;
|
|
}
|
|
|
|
.data-result {
|
|
display: flex;
|
|
gap: 16px;
|
|
min-height: 400px;
|
|
}
|
|
|
|
.data-result > div {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.data-result label {
|
|
margin-bottom: 8px;
|
|
padding: 0;
|
|
}
|
|
|
|
textarea {
|
|
flex: 1;
|
|
padding: 12px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 6px;
|
|
font-family: 'Courier New', monospace;
|
|
font-size: 13px;
|
|
resize: vertical;
|
|
min-height: 350px;
|
|
outline: none;
|
|
}
|
|
|
|
textarea:focus {
|
|
border-color: #333;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>API 调试界面</h1>
|
|
<form onsubmit="event.preventDefault(); sendRequest();">
|
|
<div class="form-row">
|
|
<label for="uri">URI</label>
|
|
<input type="text" id="uri" name="uri" value="/api/song/lyric/v1">
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="crypto">加密方式</label>
|
|
<select id="crypto" name="crypto">
|
|
<option value="weapi">weapi</option>
|
|
<option value="eapi">eapi</option>
|
|
<option value="api">api</option>
|
|
<option value="linuxapi">linuxapi</option>
|
|
<option value="" selected>(默认)</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-row">
|
|
<label></label>
|
|
<button type="submit">发送请求</button>
|
|
</div>
|
|
</form>
|
|
<div class="data-result">
|
|
<div>
|
|
<label for="result">响应结果</label>
|
|
<textarea id="result" name="result" readonly></textarea>
|
|
</div>
|
|
<div>
|
|
<label for="data">请求数据</label>
|
|
<textarea id="data" name="data">
|
|
{
|
|
"cp": false,
|
|
"id": "2058263032",
|
|
"kv": 0,
|
|
"lv": 0,
|
|
"rv": 0,
|
|
"tv": 0,
|
|
"yrv": 0,
|
|
"ytv": 0,
|
|
"yv": 0
|
|
}</textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="https://fastly.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
|
|
<script>
|
|
async function sendRequest() {
|
|
document.getElementById('result').value = ""
|
|
|
|
const uri = document.getElementById('uri').value;
|
|
const crypto = document.getElementById('crypto').value;
|
|
const data = document.getElementById('data').value;
|
|
|
|
try {
|
|
const res = await axios({
|
|
url: `/api?timestamp=${Date.now()}`,
|
|
method: 'post',
|
|
data: {
|
|
uri: uri,
|
|
data: JSON.parse(data),
|
|
crypto: crypto,
|
|
},
|
|
});
|
|
|
|
document.getElementById('result').value = JSON.stringify(res.data, null, 2);
|
|
} catch (error) {
|
|
document.getElementById('result').value = 'Request failed: ' + error.message;
|
|
}
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|