feat: show api balance (#582)

* feat: show api balance

* Update index.ts

* 保留小数点后五位

* perf: 判断优化

---------

Co-authored-by: Redon <790348264@qq.com>
This commit is contained in:
pzcn
2023-03-17 09:21:25 +08:00
committed by GitHub
parent 116ed7b0bf
commit e46d3685a0
8 changed files with 90 additions and 6 deletions

View File

@@ -10,6 +10,7 @@ interface ConfigState {
apiModel?: string
socksProxy?: string
httpsProxy?: string
balance?: string
}
const loading = ref(false)
@@ -55,6 +56,7 @@ onMounted(() => {
</p>
</div>
<p>{{ $t("setting.api") }}{{ config?.apiModel ?? '-' }}</p>
<p>{{ $t("setting.balance") }}{{ config?.balance ?? '-' }}</p>
<p>{{ $t("setting.reverseProxy") }}{{ config?.reverseProxy ?? '-' }}</p>
<p>{{ $t("setting.timeout") }}{{ config?.timeoutMs ?? '-' }}</p>
<p>{{ $t("setting.socks") }}{{ config?.socksProxy ?? '-' }}</p>

View File

@@ -63,6 +63,7 @@ export default {
timeout: 'Timeout',
socks: 'Socks',
httpsProxy: 'HTTPS Proxy',
balance: 'API Balance',
},
store: {
local: 'Local',

View File

@@ -63,6 +63,7 @@ export default {
timeout: '超时',
socks: 'Socks',
httpsProxy: 'HTTPS Proxy',
balance: 'API余额',
},
store: {
local: '本地',

View File

@@ -63,6 +63,7 @@ export default {
timeout: '逾時',
socks: 'Socks',
httpsProxy: 'HTTPS Proxy',
balance: 'API余額',
},
store: {
local: '本機',