2025-06-12 15:13:36 +08:00
|
|
|
|
<!DOCTYPE html>
|
2025-06-12 20:24:14 +08:00
|
|
|
|
<html lang="zh-CN" data-theme="light" xmlns="http://www.w3.org/1999/html">
|
2025-06-12 00:13:57 +08:00
|
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2025-06-12 13:47:00 +08:00
|
|
|
|
<title>OpenList Token 获取工具</title>
|
2025-06-15 11:07:21 +08:00
|
|
|
|
<link rel="stylesheet" type="text/css" href="/static/style.css">
|
2025-06-16 17:26:19 +08:00
|
|
|
|
<link href="https://jsd.oplist.org/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
|
|
|
<script src="https://jsd.oplist.org/npm/sweetalert2@11.22.0/dist/sweetalert2.all.min.js"></script>
|
2025-06-12 00:13:57 +08:00
|
|
|
|
</head>
|
|
|
|
|
<body>
|
2025-06-12 13:47:00 +08:00
|
|
|
|
<div class="toggle-theme">
|
|
|
|
|
<button class="btn btn-outline-secondary" onclick="toggleTheme()">切换主题</button>
|
2025-06-12 15:10:28 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="container form-container">
|
|
|
|
|
<h2 class="text-center mb-4">🔐 OpenList Token 获取工具</h2>
|
2025-06-12 15:13:36 +08:00
|
|
|
|
<div class="mb-3">
|
|
|
|
|
<label for="site-select" class="form-label">网盘名称</label>
|
|
|
|
|
<select id="site-select" class="form-select">
|
2025-06-13 17:21:19 +08:00
|
|
|
|
<!-- <option value="onedrive_pr" selected>OneDrive 个人账户</option>-->
|
2025-06-13 19:26:04 +08:00
|
|
|
|
<option value="onedrive_go" selected>OneDrive 企业版本</option>
|
2025-06-12 15:13:36 +08:00
|
|
|
|
<option value="onedrive_cn">OneDrive 世纪互联</option>
|
|
|
|
|
<option value="onedrive_us">OneDrive 美国版本</option>
|
|
|
|
|
<option value="onedrive_de">OneDrive 德国版本</option>
|
2025-06-15 11:07:21 +08:00
|
|
|
|
<option value="alicloud_qr">阿里网盘 应用登录</option>
|
|
|
|
|
<option value="alicloud_oa">阿里云盘 直接登录</option>
|
2025-06-13 17:21:19 +08:00
|
|
|
|
<option value="baiduyun_go">百度网盘 验证登录</option>
|
2025-06-16 17:26:19 +08:00
|
|
|
|
<option value="baiduyun_ob">百度网盘 OOB 验证</option>
|
2025-06-13 17:21:19 +08:00
|
|
|
|
<option value="115cloud_go">115 网盘 验证登录</option>
|
2025-06-13 19:26:04 +08:00
|
|
|
|
<option value="123cloud_go">123 网盘 直接登录</option>
|
2025-06-15 11:07:21 +08:00
|
|
|
|
<option value="googleui_go">GoogleDrive Login</option>
|
|
|
|
|
<option value="yandexui_go">YandexDrive Login</option>
|
2025-06-12 15:13:36 +08:00
|
|
|
|
</select>
|
2025-06-13 19:26:04 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="mb-3" style="margin-top: 15px">
|
|
|
|
|
<input type="checkbox" id="server_use" class="form-check-input">
|
2025-06-14 21:23:30 +08:00
|
|
|
|
<label for="server_use" class="form-check-label">使用 OpenList 提供的参数</label>
|
2025-06-13 19:26:04 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
2025-06-14 21:23:30 +08:00
|
|
|
|
<div class="mb-3" id="client-id-view">
|
2025-06-15 11:07:21 +08:00
|
|
|
|
<label for="client-id" class="form-label">客户端ID(ClientID/AppID)</label>
|
2025-06-13 19:26:04 +08:00
|
|
|
|
<input type="text" id="client-id" class="form-control">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="mb-3">
|
2025-06-15 11:07:21 +08:00
|
|
|
|
<label for="app-secret" class="form-label">应用秘钥 (AppKey/Secret)</label>
|
2025-06-13 19:26:04 +08:00
|
|
|
|
<input type="text" id="app-secret" class="form-control">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="mb-3" id="secret-key-view">
|
2025-06-15 11:07:21 +08:00
|
|
|
|
<label for="secret-key" class="form-label">访问秘钥(SecretKey/Key)</label>
|
2025-06-13 19:26:04 +08:00
|
|
|
|
<input type="text" id="secret-key" class="form-control">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
<label for="callback-url" class="form-label">回调地址</label>
|
|
|
|
|
<input type="text" id="callback-url" class="form-control" value="https://api.oplist.org/onedrive/callback"
|
2025-06-15 11:07:21 +08:00
|
|
|
|
readonly onclick="autoCopy(this)">
|
2025-06-13 19:26:04 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="d-grid gap-2 mb-3">
|
|
|
|
|
<button class="btn btn-primary" onclick="getLogin()">获取 Token</button>
|
|
|
|
|
</div>
|
2025-06-12 15:13:36 +08:00
|
|
|
|
|
2025-06-16 00:48:18 +08:00
|
|
|
|
<div class="d-grid gap-2 mb-3">
|
|
|
|
|
<button class="btn btn-primary" onclick="getLogin(true)">刷新 Token</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-06-13 19:26:04 +08:00
|
|
|
|
<div class="mb-3">
|
|
|
|
|
<label for="access-token" class="form-label">访问秘钥</label>
|
|
|
|
|
<textarea id="access-token" class="form-control" rows="3" readonly onclick="autoCopy(this)"></textarea>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
<label for="refresh-token" class="form-label">刷新秘钥</label>
|
|
|
|
|
<textarea id="refresh-token" class="form-control" rows="3" readonly onclick="autoCopy(this)"></textarea>
|
|
|
|
|
</div>
|
2025-06-15 11:07:21 +08:00
|
|
|
|
<div class="mb-3" id="sharepoint-url-view">
|
2025-06-15 09:56:34 +08:00
|
|
|
|
<label for="sharepoint-url" class="form-label">SharePoint Site URL</label>
|
|
|
|
|
<label for="sharepoint-url"></label><input type="text" id="sharepoint-url" class="form-control">
|
|
|
|
|
</div>
|
2025-06-15 11:07:21 +08:00
|
|
|
|
<div class="d-grid gap-2 mb-3" id="sharepoint-btn-view">
|
2025-06-15 09:56:34 +08:00
|
|
|
|
<button class="btn btn-primary" onclick="getSiteID()">获取 SharePoint 站点ID</button>
|
|
|
|
|
</div>
|
2025-06-15 11:07:21 +08:00
|
|
|
|
<div class="mb-3" id="sharepoint-uid-view">
|
|
|
|
|
<label for="sharepoint-id" class="form-label">SharePoint Site ID</label>
|
2025-06-15 09:56:34 +08:00
|
|
|
|
<textarea id="sharepoint-id" class="form-control" rows="3" readonly onclick="autoCopy(this)"></textarea>
|
|
|
|
|
</div>
|
2025-06-13 19:26:04 +08:00
|
|
|
|
<div class="text-muted text-center">
|
|
|
|
|
<p style="text-align:center">
|
|
|
|
|
本工具所有信息只以Cookie形式存储于浏览器本地<br>
|
|
|
|
|
开源于 <a href="https://github.com/OpenListTeam/cf-worker-api" target="_blank">GitHub</a> | By <a
|
|
|
|
|
href="https://github.com/OpenListTeam"
|
|
|
|
|
target="_blank">OpenListTeam</a>
|
|
|
|
|
</p>
|
2025-06-12 00:13:57 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-06-14 18:46:18 +08:00
|
|
|
|
|
2025-06-15 09:59:12 +08:00
|
|
|
|
|
2025-06-14 18:46:18 +08:00
|
|
|
|
<!-- 阿里云盘扫码v2模态框 -->
|
|
|
|
|
<div id="qr-modal" class="qr-modal">
|
|
|
|
|
<div class="qr-modal-content">
|
|
|
|
|
<span class="close-btn" onclick="closeQRModal()">×</span>
|
|
|
|
|
<h4>阿里云盘扫码登录v2</h4>
|
|
|
|
|
<div id="qr-code-container" class="qr-code-container" style="display: none;">
|
|
|
|
|
<div id="qr-code-display"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="qr-status" class="qr-status" style="display: none;"></div>
|
|
|
|
|
<div class="mt-3">
|
|
|
|
|
<button id="refresh-qr-btn" class="btn btn-secondary" onclick="refreshQRCode()" style="display: none;">刷新二维码</button>
|
|
|
|
|
<button class="btn btn-secondary" onclick="closeQRModal()">关闭</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-06-15 11:07:21 +08:00
|
|
|
|
<script src="/static/login.js"></script>
|
|
|
|
|
<script src="/static/token.js"></script>
|
|
|
|
|
<script src="/static/theme.js"></script>
|
|
|
|
|
<script src="/static/aliv2.js"></script>
|
|
|
|
|
<script src="/static/spoid.js"></script>
|
|
|
|
|
<script src="/static/input.js"></script>
|
2025-06-12 00:13:57 +08:00
|
|
|
|
<script>
|
2025-06-13 17:21:19 +08:00
|
|
|
|
getToken();
|
2025-06-14 18:46:18 +08:00
|
|
|
|
// 阿里云盘扫码v2相关变量
|
|
|
|
|
let alicloud2SessionId = null;
|
|
|
|
|
let alicloud2CheckInterval = null;
|
|
|
|
|
let alicloud2StartTime = null;
|
|
|
|
|
let clientFingerprint = null;
|
|
|
|
|
// 点击模态框外部关闭
|
2025-06-15 11:07:21 +08:00
|
|
|
|
window.onclick = function (event) {
|
2025-06-14 18:46:18 +08:00
|
|
|
|
const modal = document.getElementById('qr-modal');
|
|
|
|
|
if (event.target === modal) {
|
|
|
|
|
closeQRModal();
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-06-12 15:13:36 +08:00
|
|
|
|
</script>
|
|
|
|
|
</body>
|
2025-06-12 13:47:00 +08:00
|
|
|
|
</html>
|