This commit is contained in:
2025-07-08 23:42:53 +08:00
parent 22691d4dd6
commit ff802e00da
3 changed files with 8 additions and 8 deletions

View File

@@ -442,7 +442,7 @@ export const accountController = {
// Claude 登录处理
async function handleClaudeLogin(token: string, userName: string): Promise<string> {
try {
const baseUrl = process.env.CLAUDE_TARGET_URL || 'https://chat.micar9.com:8443';
const baseUrl = process.env.CLAUDE_TARGET_URL || 'https://chat.micar9.com';
console.log('Claude登录处理:', { token, userName });
// 第一步获取oauth token
const oauthResponse = await fetch(`${baseUrl}/manage-api/auth/oauth_token`, {
@@ -476,7 +476,7 @@ async function handleClaudeLogin(token: string, userName: string): Promise<strin
// ChatGPT 登录处理
async function handleChatGPTLogin(token: string, userName: string): Promise<string> {
try {
const baseUrl = process.env.CLAUDE_TARGET_URL || 'http://127.0.0.1:8181';
const baseUrl = process.env.CHATGPT_TARGET_URL || 'http://127.0.0.1:8181';
const response = await fetch(`${baseUrl}/api/login`, {
method: 'POST',
@@ -512,7 +512,7 @@ async function handleChatGPTLogin(token: string, userName: string): Promise<stri
// Grok 登录处理
async function handleGrokLogin(token: string, userName: string): Promise<string> {
try {
const baseUrl = process.env.CLAUDE_TARGET_URL || 'https://grok-mirror.micar9.com:8443';
const baseUrl = process.env.GROK_TARGET_URL || 'https://grok-mirror.micar9.com';
const response = await fetch(`${baseUrl}/api/login-v2`, {
method: 'POST',