mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-03-21 11:03:15 +00:00
* chore(deps): bump actions/checkout from 4 to 6 Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Squashed commit of the following: commit f73cbbeec37d40383e2b7d411e34048146776345 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun Feb 1 12:47:57 2026 +0000 chore(deps): bump actions/download-artifact from 4 to 7 Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 7. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v4...v7) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Squashed commit of the following: commit 4da2d5f3600f52c7087ea350e3ec87a3c7cac535 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun Feb 1 12:48:00 2026 +0000 chore(deps): bump actions/github-script from 7 to 8 Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 8. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v7...v8) --- updated-dependencies: - dependency-name: actions/github-script dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Squashed commit of the following: commit 9e65b176252a554decf5574ca6a3463838a7a32f Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun Feb 1 12:47:49 2026 +0000 chore(deps): bump actions/setup-node from 4 to 6 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 6. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v4...v6) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Squashed commit of the following: commit a060f3c4cc5c3a4baf9c4827163acde1589ef26d Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun Feb 1 12:47:53 2026 +0000 chore(deps): bump actions/upload-artifact from 4 to 6 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 6. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v6) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * build(version): bump 4.30.0 * refactor: QR login and voice upload pages with improved UI and error handling - 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 * fix: Potential fix for code scanning alert no. 6: DOM text reinterpreted as HTML Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 15: DOM text reinterpreted as HTML Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * build: update utils --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
220 lines
4.9 KiB
HTML
220 lines
4.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh">
|
|
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>登录</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;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 20px;
|
|
}
|
|
|
|
.container {
|
|
background: white;
|
|
border-radius: 12px;
|
|
padding: 40px;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
max-width: 400px;
|
|
width: 100%;
|
|
text-align: center;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 24px;
|
|
font-weight: 600;
|
|
color: #333;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.subtitle {
|
|
font-size: 14px;
|
|
color: #666;
|
|
margin-bottom: 32px;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 20px;
|
|
text-align: left;
|
|
}
|
|
|
|
label {
|
|
display: block;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
color: #555;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
input {
|
|
width: 100%;
|
|
padding: 12px 14px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 6px;
|
|
font-size: 15px;
|
|
outline: none;
|
|
}
|
|
|
|
input:focus {
|
|
border-color: #333;
|
|
}
|
|
|
|
.btn {
|
|
width: 100%;
|
|
padding: 14px;
|
|
background: #333;
|
|
color: white;
|
|
font-size: 15px;
|
|
font-weight: 500;
|
|
border: none;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
transition: background 0.2s ease;
|
|
}
|
|
|
|
.btn:hover {
|
|
background: #555;
|
|
}
|
|
|
|
.btn:disabled {
|
|
background: #999;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.result {
|
|
margin-top: 24px;
|
|
padding: 16px;
|
|
background: #f9f9f9;
|
|
border-radius: 6px;
|
|
font-size: 13px;
|
|
color: #666;
|
|
text-align: left;
|
|
white-space: pre-wrap;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.error {
|
|
color: #ef4444;
|
|
background: #fef2f2;
|
|
}
|
|
|
|
.success {
|
|
color: #10b981;
|
|
background: #f0fdf4;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container">
|
|
<h1>登录</h1>
|
|
<p class="subtitle">使用手机号和密码登录网易云音乐</p>
|
|
|
|
<div class="form-group">
|
|
<label for="phone">手机号</label>
|
|
<input type="tel" id="phone" placeholder="请输入手机号" />
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="password">密码</label>
|
|
<input type="password" id="password" placeholder="请输入密码" />
|
|
</div>
|
|
|
|
<button id="loginBtn" class="btn" onclick="handleLogin()">登录</button>
|
|
|
|
<div id="result" class="result" style="display: none;"></div>
|
|
</div>
|
|
|
|
<script src="https://fastly.jsdelivr.net/npm/axios@0.26.1/dist/axios.min.js"></script>
|
|
<script>
|
|
const fileUpdateTime = {}
|
|
|
|
async function login(phone, password) {
|
|
const res = await axios({
|
|
url: `/login/cellphone`,
|
|
method: 'post',
|
|
data: {
|
|
phone: phone,
|
|
password: password,
|
|
},
|
|
})
|
|
return res.data.cookie
|
|
}
|
|
|
|
async function handleLogin() {
|
|
const phoneInput = document.getElementById('phone')
|
|
const passwordInput = document.getElementById('password')
|
|
const loginBtn = document.getElementById('loginBtn')
|
|
const resultDiv = document.getElementById('result')
|
|
|
|
const phone = phoneInput.value.trim()
|
|
const password = passwordInput.value
|
|
|
|
if (!phone || !password) {
|
|
showResult('请输入手机号和密码', 'error')
|
|
return
|
|
}
|
|
|
|
loginBtn.disabled = true
|
|
loginBtn.textContent = '登录中...'
|
|
showResult('正在登录...', 'info')
|
|
|
|
try {
|
|
const cookieToken = await login(phone, password)
|
|
localStorage.setItem('cookie', cookieToken)
|
|
|
|
const res = await axios({
|
|
url: `/login/status`,
|
|
method: 'post',
|
|
data: {
|
|
cookie: cookieToken,
|
|
},
|
|
})
|
|
|
|
showResult(`登录成功!\n${JSON.stringify(res.data, null, 2)}`, 'success')
|
|
} catch (error) {
|
|
console.error('登录失败:', error)
|
|
const errorMsg = error.response?.data?.message || error.message || '登录失败,请重试'
|
|
showResult(`登录失败:${errorMsg}`, 'error')
|
|
} finally {
|
|
loginBtn.disabled = false
|
|
loginBtn.textContent = '登录'
|
|
}
|
|
}
|
|
|
|
function showResult(message, type = 'info') {
|
|
const resultDiv = document.getElementById('result')
|
|
resultDiv.style.display = 'block'
|
|
resultDiv.textContent = message
|
|
resultDiv.className = 'result ' + type
|
|
}
|
|
|
|
// 支持回车登录
|
|
document.getElementById('password').addEventListener('keypress', function(e) {
|
|
if (e.key === 'Enter') {
|
|
handleLogin()
|
|
}
|
|
})
|
|
|
|
document.getElementById('phone').addEventListener('keypress', function(e) {
|
|
if (e.key === 'Enter') {
|
|
document.getElementById('password').focus()
|
|
}
|
|
})
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|