File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 128
128
.yarn /build-state.yml
129
129
.yarn /install-state.gz
130
130
.pnp. *
131
+
132
+
133
+ test *
Original file line number Diff line number Diff line change @@ -122,9 +122,14 @@ const app = {
122
122
//总
123
123
const total_granted = subscription . hard_limit_usd ;
124
124
//已用
125
- const total_used = usageData . total_usage / 100 || - 1
125
+ // const total_used = usageData.total_usage / 100 || -1
126
+ const total_used = typeof usageData . total_usage === "number" ? usageData . total_usage / 100 : "查询失败" ;
127
+
128
+ // 剩余额度
129
+ const total_available = typeof total_used === "number" ? total_granted - total_used : "查询失败" ;
130
+
126
131
//剩余额度
127
- const total_available = total_granted - total_used ;
132
+ // const total_available = total_granted - total_used;
128
133
129
134
if ( ! this . total ) {
130
135
this . total = [ ] ;
Original file line number Diff line number Diff line change 41
41
< div class ="page-header " x-data ="{ origin: '' } " x-init ="origin = window.location.origin ">
42
42
< h2 > 查询 OpenaiAPI 余额</ h2 >
43
43
< p > API接口: < span class ="proxy " x-text ="origin " @click ="copyToClipboard(origin) "> </ span >
44
- ;支持批量查询,一行一个;点击清理可以清理失效的key。 (已用额度是-1时该key查询失败) </ p >
44
+ ;支持批量查询,一行一个;点击清理可以清理失效的key。</ p >
45
45
</ div >
46
46
< main x-data ="app " x-cloak >
47
47
< p x-show.transition.opacity ="alert " :class ="alert?.type " x-text ="alert?.message "> </ p >
You can’t perform that action at this time.
0 commit comments