This commit is contained in:
hkyc
2025-03-13 17:53:21 +08:00
parent 433715b78a
commit 3a61bd1ddb
7 changed files with 1275 additions and 575 deletions

293
api-docs.html Normal file
View File

@@ -0,0 +1,293 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>API文档 - 听泉科技</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<style>
.api-docs {
padding: 160px 0 80px;
}
.api-section {
background: white;
border-radius: 1rem;
padding: 2rem;
margin-bottom: 2rem;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.endpoint {
margin-bottom: 2rem;
padding: 1.5rem;
background: #f8f9fa;
border-radius: 0.5rem;
}
.method {
display: inline-block;
padding: 0.25rem 0.75rem;
border-radius: 0.25rem;
font-weight: bold;
margin-right: 1rem;
background: #28a745;
color: white;
}
.code-block {
background: #2d2d2d;
color: #fff;
padding: 1rem;
border-radius: 0.5rem;
margin: 1rem 0;
font-family: monospace;
white-space: pre;
}
.params-table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
}
.params-table th, .params-table td {
padding: 0.75rem;
border: 1px solid #dee2e6;
text-align: left;
}
.params-table th {
background: #f8f9fa;
}
.api-url {
font-family: monospace;
background: #f8f9fa;
padding: 0.5rem;
border-radius: 0.25rem;
border: 1px solid #dee2e6;
}
</style>
</head>
<body>
<div class="overlay"></div>
<!-- 导航栏 -->
<header>
<div class="container">
<div class="logo">
<h1>听泉科技</h1>
</div>
<nav>
<ul>
<li><a href="index.html">首页</a></li>
<li><a href="products.html">产品</a></li>
<li><a href="pricing.html">价格</a></li>
<li><a href="contact.html">联系我们</a></li>
<li><a href="api-docs.html" class="active">API文档</a></li>
</ul>
</nav>
<button class="menu-button">
<span class="menu-icon"></span>
</button>
</div>
</header>
<section class="api-docs">
<div class="container">
<h1>获取账号API - 快速指南</h1>
<div class="api-section">
<div class="endpoint">
<h3><span class="method">POST</span> 获取账号</h3>
<p>获取一个可用的Cursor账号</p>
<h4>接口地址</h4>
<div class="api-url">https://api.cursorpro.com.cn/admin/api.pool/getAccount</div>
<h4>请求方式</h4>
<p>POST</p>
<h4>参数说明</h4>
<table class="params-table">
<tr>
<th>参数名</th>
<th>类型</th>
<th>必填</th>
<th>说明</th>
</tr>
<tr>
<td>identity_key</td>
<td>String</td>
<td></td>
<td>用户身份标识</td>
</tr>
</table>
<h4>请求示例</h4>
<div class="code-block">curl -X POST \
https://api.cursorpro.com.cn/admin/api.pool/getAccount \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'identity_key=您的身份标识'</div>
<h4>返回示例</h4>
<div class="code-block">{
"code": 0,
"msg": "获取账号成功",
"data": {
"email": "example@domain.com",
"password": "password123",
"first_name": "John",
"last_name": "Doe",
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVzJ9...",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVzJ9...",
"machine_id": "DESKTOP-ABC123",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)...",
"registration_time": "2023-01-01 12:00:00",
"account_id": 123,
"remaining_balance": "99.50",
"is_test": false
}
}</div>
<h4>返回参数说明</h4>
<table class="params-table">
<tr>
<th>参数名</th>
<th>类型</th>
<th>说明</th>
</tr>
<tr>
<td>email</td>
<td>String</td>
<td>账号邮箱,可直接用于登录</td>
</tr>
<tr>
<td>password</td>
<td>String</td>
<td>账号密码,可直接用于登录</td>
</tr>
<tr>
<td>access_token</td>
<td>String</td>
<td>访问令牌用于API认证可直接用于开源换号器</td>
</tr>
<tr>
<td>refresh_token</td>
<td>String</td>
<td>刷新令牌用于更新access_token</td>
</tr>
<tr>
<td>machine_id</td>
<td>String</td>
<td>机器ID用于设备识别</td>
</tr>
<tr>
<td>user_agent</td>
<td>String</td>
<td>用户代理,建议在请求时保持一致</td>
</tr>
<tr>
<td>remaining_balance</td>
<td>String</td>
<td>账号剩余额度</td>
</tr>
</table>
<h4>使用建议</h4>
<div style="margin-top: 1rem;">
<h5>方式一:直接登录</h5>
<p>使用返回的email和password可直接在Cursor客户端登录无需额外配置。</p>
<h5>方式二:使用听泉开源换号助手</h5>
<div style="background: #f8f9fa; padding: 1rem; border-radius: 0.5rem; margin: 1rem 0;">
<p><i class="fas fa-info-circle"></i> 推荐使用方式:</p>
<ol style="margin-left: 1.5rem; margin-top: 0.5rem;">
<li>下载我们的开源换号助手:<a href="https://github.com/maticarmy/free_cursor_pro.git" target="_blank" style="color: #007bff;">GitHub下载地址</a></li>
<li>运行程序后,只需输入您购买的身份标识(identity_key)</li>
<li>程序会自动完成账号获取、登录和切换,无需其他配置</li>
</ol>
<p style="margin-top: 0.5rem;"><i class="fas fa-check-circle" style="color: #28a745;"></i> 一次配置,永久使用,自动管理所有账号相关操作</p>
<div style="margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #dee2e6;">
<p><i class="fas fa-terminal"></i> 快速开始:</p>
<div class="code-block" style="background: #f8f9fa; color: #333;">
# Windows用户以管理员身份运行
python tingquan_cursor_pro.py
# Linux/macOS用户
sudo python tingquan_cursor_pro.py</div>
</div>
</div>
<h5>方式三:自定义开发</h5>
<p>可以使用完整的返回参数进行自定义开发,支持更复杂的场景:</p>
<ul style="list-style-type: disc; margin-left: 2rem;">
<li>使用access_token和refresh_token实现自动更新认证</li>
<li>通过machine_id和user_agent确保设备一致性</li>
<li>利用remaining_balance实现额度管理</li>
</ul>
</div>
</div>
</div>
</div>
</section>
<!-- 页脚 -->
<footer>
<div class="container">
<div class="footer-grid">
<div class="footer-col">
<h3>听泉科技</h3>
<p>专注于智能软件解决方案</p>
</div>
<div class="footer-col">
<h3>快速链接</h3>
<ul>
<li><a href="index.html">首页</a></li>
<li><a href="products.html">产品</a></li>
<li><a href="pricing.html">价格</a></li>
<li><a href="contact.html">联系我们</a></li>
<li><a href="api-docs.html">API文档</a></li>
</ul>
</div>
<div class="footer-col">
<h3>联系我们</h3>
<p><i class="fas fa-envelope"></i> maticarmy@gmail.com</p>
<div class="social-links">
<a href="https://github.com/maticarmy/free_cursor_pro.git" target="_blank" title="GitHub"><i class="fab fa-github"></i></a>
<a href="javascript:void(0)" onclick="showWechatModal()" title="微信"><i class="fab fa-weixin"></i></a>
</div>
</div>
</div>
<div class="copyright">
<p>&copy; 2024 听泉科技. 保留所有权利.</p>
</div>
</div>
</footer>
<!-- 微信弹窗 -->
<div id="wechatModal" class="modal" style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000;">
<div style="position: relative; background: white; max-width: 400px; margin: 100px auto; padding: 2rem; border-radius: 1rem; text-align: center;">
<span onclick="closeWechatModal()" style="position: absolute; right: 1rem; top: 1rem; cursor: pointer; font-size: 1.5rem;">&times;</span>
<img src="img/wechat_qr.png" alt="微信二维码" style="width: 200px; border-radius: 0.5rem;">
<p style="margin-top: 1rem; font-weight: bold;">
<i class="fab fa-weixin"></i> 微信号behikcigar
</p>
</div>
</div>
<script src="js/main.js"></script>
<script>
// 微信弹窗功能
function showWechatModal() {
document.getElementById('wechatModal').style.display = 'block';
document.body.style.overflow = 'hidden';
}
function closeWechatModal() {
document.getElementById('wechatModal').style.display = 'none';
document.body.style.overflow = 'auto';
}
// 点击空白处关闭弹窗
document.getElementById('wechatModal').addEventListener('click', function(e) {
if (e.target === this) {
closeWechatModal();
}
});
</script>
</body>
</html>