fix: 新增 API 验证增加响应完整性检查

- 站点地址字段在无官方地址时改为必填
- 验证成功时检查用户信息和余额是否完整返回
This commit is contained in:
fawney19
2026-01-18 11:40:59 +08:00
parent 1e71d355fc
commit 0f7ba38655
2 changed files with 23 additions and 10 deletions
@@ -21,11 +21,12 @@ export const newApiTemplate: AuthTemplate = {
fields: [
{
key: 'base_url',
label: 'API 地址',
label: '站点地址',
type: 'text',
placeholder: providerWebsite || 'https://api.example.com',
helpText: '提供商的 API 基础地址,留空则使用提供商官网',
required: false,
placeholder: providerWebsite
? `${providerWebsite}`
: '请填写站点地址',
required: !providerWebsite,
},
{
key: 'api_key',