Commit a4199347 by renyizhao

获取apiKey 充值流程已完成

parent cb9ca950
...@@ -13,6 +13,11 @@ ...@@ -13,6 +13,11 @@
<span class="secret-text">{{ maskedKey }}</span> <span class="secret-text">{{ maskedKey }}</span>
</el-tooltip> </el-tooltip>
</el-form-item> </el-form-item>
<el-form-item label="服务地址:">
<el-tooltip effect="dark" :content="baseUrl" placement="top">
<span class="secret-text">{{ baseUrl }}</span>
</el-tooltip>
</el-form-item>
</el-form> </el-form>
<el-form :model="rechargeForm" label-width="100px" label-position="left"> <el-form :model="rechargeForm" label-width="100px" label-position="left">
<el-form-item label="充值金额:"> <el-form-item label="充值金额:">
...@@ -55,6 +60,7 @@ const hasToken = ref(false); ...@@ -55,6 +60,7 @@ const hasToken = ref(false);
const balance = ref("0.00"); const balance = ref("0.00");
const apiKey = ref(""); const apiKey = ref("");
const maskedKey = ref(""); const maskedKey = ref("");
const baseUrl = ref("");
const rechargeLoading = ref(false); const rechargeLoading = ref(false);
// 轮询相关 // 轮询相关
...@@ -86,6 +92,10 @@ function loadTokenInfo() { ...@@ -86,6 +92,10 @@ function loadTokenInfo() {
if (response.balance) { if (response.balance) {
balance.value = response.balance; balance.value = response.balance;
} }
// 显示 New API 服务地址
if (response.baseUrl) {
baseUrl.value = response.baseUrl;
}
} }
}).catch(() => { }).catch(() => {
// 忽略错误,保持当前状态 // 忽略错误,保持当前状态
...@@ -174,6 +184,7 @@ const createQueryInterval = (rechargeId) => { ...@@ -174,6 +184,7 @@ const createQueryInterval = (rechargeId) => {
} }
).then(() => { ).then(() => {
qrCode.value.visible = false; qrCode.value.visible = false;
loadTokenInfo()
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment