IH0kIG5E67ZY43M5
10 月 14 日
```js
async function getJson(url) {
const response = await fetch(url);
if (!response.ok) {
throw new Error(请求失败:HTTP ${response.status} (${url}));
}
return response.json();
}
getJson('/api/organizations')
.then(organizations => {
if (!Array.isArray(organizations) || !organizations[0]?.uuid) {
throw new Error('组织列表为空或返回格式不符合预期');
}
const uuid = encodeURIComponent(organizations[0].uuid);
return getJson(/api/organizations/${uuid}/kyc_status);
})
.then(data => {
const messages = {
not_required: '✅ 无需 KYC ,可直接升级',
pending: '⏳ 审核中',
approved: '✅ 已通过,可升级',
denied: '❌ 被拒'
};
console.log(
data.status,
messages[data.status] ?? '未知 KYC 状态'
);
})
.catch(console.error);
```
F12 ,控制台执行一下,可以先看你的账号是不是需要 KYC ,然后再决定是不是续费