修复bug

This commit is contained in:
2025-07-08 16:44:04 +08:00
parent aa2416c5d6
commit 1af79c4111
22 changed files with 400 additions and 1036 deletions

View File

@@ -10,20 +10,12 @@ export default defineConfig({
'@': resolve(__dirname, 'src'),
},
},
define: {
// 定义环境变量,使其在客户端可用
VITE_API_URL: JSON.stringify(process.env.VITE_API_URL || 'http://localhost:3001'),
VITE_APP_NAME: JSON.stringify(process.env.VITE_APP_NAME || 'Pandora'),
VITE_CLAUDE_TARGET_URL: JSON.stringify(process.env.CLAUDE_TARGET_URL || 'https://claude.ai'),
VITE_CHATGPT_TARGET_URL: JSON.stringify(process.env.CHATGPT_TARGET_URL || 'https://chat.openai.com'),
VITE_GROK_TARGET_URL: JSON.stringify(process.env.GROK_TARGET_URL || 'https://grok.x.ai'),
},
server: {
port: 3000,
host: '0.0.0.0',
proxy: {
'/api': {
target: 'http://localhost:3001',
target: 'http://backend:3001',
changeOrigin: true,
secure: false,
},