mirror of
https://github.com/woodchen-ink/openai-billing-query.git
synced 2025-07-18 05:51:59 +08:00
fix bugs
This commit is contained in:
parent
294a56fffa
commit
77a338ba14
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.vscode/settings.json
|
53
index.html
53
index.html
@ -8,12 +8,12 @@
|
|||||||
<meta name="description" content="批量快速查询OPENAI的余额,支持可视化展现已用比例、额度、已用量、未用量、是否GPT-4、是否GPT4-32K、是否绑卡、绑卡信息、组织信息、是否有效">
|
<meta name="description" content="批量快速查询OPENAI的余额,支持可视化展现已用比例、额度、已用量、未用量、是否GPT-4、是否GPT4-32K、是否绑卡、绑卡信息、组织信息、是否有效">
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
--color-primary: #2EA7E0;
|
--color-primary: #1E3B7A;
|
||||||
--color-primary-dark: #2482AD;
|
--color-primary-dark: #1E3B7A;
|
||||||
--color-primary-alpha: #75C2E6;
|
--color-primary-alpha: #01847f;
|
||||||
--body-color: #ffffff;
|
--body-color: #dadada;
|
||||||
--body-bg: #000000;
|
--body-bg: #000000;
|
||||||
--border-color: #f1ebeb00;
|
--border-color: #f8f8f800;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@ -41,13 +41,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: var(--color-primary-alpha);
|
color: var(--color-primary);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
transition: color .3s;
|
transition: color .3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
color: var(--color-primary-alpha);
|
color: var(--color-primary);
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,7 +111,7 @@
|
|||||||
margin: 1rem 0 2rem;
|
margin: 1rem 0 2rem;
|
||||||
border: 1px solid var(--border-color);
|
border: 1px solid var(--border-color);
|
||||||
border-radius: .25rem;
|
border-radius: .25rem;
|
||||||
/* transition: background .3s; */
|
transition: background .3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
details[open] {
|
details[open] {
|
||||||
@ -192,19 +192,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
|
padding: 1rem;
|
||||||
border-top: 1px solid var(--border-color);
|
border-top: 1px solid var(--border-color);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
/* opacity: .5; */
|
opacity: .5;
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
background-color:#212121;
|
|
||||||
line-height:unset !important;
|
|
||||||
}
|
}
|
||||||
footer .p{
|
|
||||||
padding: 0;
|
footer i {
|
||||||
color: rgb(255, 255, 255);
|
font-style: normal;
|
||||||
|
color: #b32142;
|
||||||
}
|
}
|
||||||
|
|
||||||
.success,
|
.success,
|
||||||
@ -413,15 +409,12 @@
|
|||||||
<th style="width: 50px;">是否有效</th>
|
<th style="width: 50px;">是否有效</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
<tbody></tbody>
|
||||||
</table>
|
</table>
|
||||||
<footer>
|
<footer>
|
||||||
<p>广告链接:
|
<a href="https://chat.czl.net" style="color: white;" target="_blank">CZLChat</a>
|
||||||
<a href="https://chat.czl.net" target="_blank">CZLChat</a>
|
<a href="https://oapi.czl.net" style="color: white;" target="_blank">CZLOapi</a>
|
||||||
<a href="https://oapi.czl.net" target="_blank">CZLOapi</a>
|
|
||||||
</p>
|
|
||||||
<p>本网页由<a href="https://woodchen.ink"
|
|
||||||
target="_blank">woodchen</a>开源于<a href="https://github.com/woodchen-ink/openai-billing-query"
|
|
||||||
target="_blank">Github</a>,欢迎给个star</p>
|
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
|
||||||
@ -571,7 +564,9 @@
|
|||||||
//查询函数
|
//查询函数
|
||||||
function sendRequest() {
|
function sendRequest() {
|
||||||
let button = document.querySelector("button");
|
let button = document.querySelector("button");
|
||||||
|
button.textContent = "加载中...";
|
||||||
|
button.disabled = true;
|
||||||
|
button.classList.add("loading")
|
||||||
|
|
||||||
let apiKeyInput = document.getElementById("api-key-input");
|
let apiKeyInput = document.getElementById("api-key-input");
|
||||||
let apiUrlSelect = document.getElementById("api-url-select");
|
let apiUrlSelect = document.getElementById("api-url-select");
|
||||||
@ -586,7 +581,6 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
document.getElementById("result-table").getElementsByTagName('tbody')[0].innerHTML = "";
|
document.getElementById("result-table").getElementsByTagName('tbody')[0].innerHTML = "";
|
||||||
|
|
||||||
let apiUrl = "";
|
let apiUrl = "";
|
||||||
@ -609,15 +603,10 @@
|
|||||||
if (apiKeys.length === 0) {
|
if (apiKeys.length === 0) {
|
||||||
alert("未匹配到 API-KEY,请检查输入内容");
|
alert("未匹配到 API-KEY,请检查输入内容");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
alert("成功匹配到 API Key,确认后开始查询:" + apiKeys);
|
alert("成功匹配到 API Key,确认后开始查询:" + apiKeys);
|
||||||
|
|
||||||
button.textContent = "加载中...";
|
|
||||||
button.disabled = true;
|
|
||||||
button.classList.add("loading")
|
|
||||||
|
|
||||||
let tableBody = document.querySelector("#result-table tbody");
|
let tableBody = document.querySelector("#result-table tbody");
|
||||||
for (let i = 0; i < apiKeys.length; i++) {
|
for (let i = 0; i < apiKeys.length; i++) {
|
||||||
let apiKey = apiKeys[i].trim();
|
let apiKey = apiKeys[i].trim();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user