fix: 修复创建 API Key 时专属账号下拉框无选项的问题

问题描述:
- 创建 API Key 时,专属账号下拉框中没有显示任何账号选项
- 原因是前端代码使用了错误的过滤条件 `a.isDedicated`

解决方案:
- 将过滤条件修改为 `a.accountType === 'dedicated'`
- 后端返回的账号对象使用 `accountType` 属性(值为 'shared' 或 'dedicated')

其他修改:
- 更新 package.json 中的 build:web 和 install:web 脚本路径

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Alfonsxh
2025-07-30 16:14:07 +08:00
parent 18e67f5632
commit 0fc9fab621
2 changed files with 4 additions and 4 deletions

View File

@@ -6,8 +6,8 @@
"scripts": {
"start": "node src/app.js",
"dev": "nodemon src/app.js",
"build:web": "cd web && npm run build",
"install:web": "cd web && npm install",
"build:web": "cd web/admin-spa && npm run build",
"install:web": "cd web/admin-spa && npm install",
"setup": "node scripts/setup.js",
"cli": "node cli/index.js",
"init:costs": "node src/cli/initCosts.js",

View File

@@ -359,7 +359,7 @@
使用共享账号池
</option>
<option
v-for="account in accounts.claude.filter(a => a.isDedicated)"
v-for="account in accounts.claude.filter(a => a.accountType === 'dedicated')"
:key="account.id"
:value="account.id"
>
@@ -378,7 +378,7 @@
使用共享账号池
</option>
<option
v-for="account in accounts.gemini.filter(a => a.isDedicated)"
v-for="account in accounts.gemini.filter(a => a.accountType === 'dedicated')"
:key="account.id"
:value="account.id"
>