mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:43:35 +00:00
fix: 修复codex 添加账号缺少oauth步骤
This commit is contained in:
@@ -1760,7 +1760,12 @@ const initProxyConfig = () => {
|
||||
// 表单数据
|
||||
const form = ref({
|
||||
platform: props.account?.platform || 'claude',
|
||||
addType: props.account?.platform === 'gemini' ? 'oauth' : 'setup-token',
|
||||
addType: (() => {
|
||||
const platform = props.account?.platform || 'claude'
|
||||
if (platform === 'gemini' || platform === 'openai') return 'oauth'
|
||||
if (platform === 'claude') return 'setup-token'
|
||||
return 'manual'
|
||||
})(),
|
||||
name: props.account?.name || '',
|
||||
description: props.account?.description || '',
|
||||
accountType: props.account?.accountType || 'shared',
|
||||
@@ -2554,6 +2559,9 @@ watch(
|
||||
} else if (newPlatform === 'gemini') {
|
||||
// 切换到 Gemini 时,使用 OAuth 作为默认方式
|
||||
form.value.addType = 'oauth'
|
||||
} else if (newPlatform === 'openai') {
|
||||
// 切换到 OpenAI 时,使用 OAuth 作为默认方式
|
||||
form.value.addType = 'oauth'
|
||||
}
|
||||
|
||||
// 平台变化时,清空分组选择
|
||||
|
||||
Reference in New Issue
Block a user