update pay function

This commit is contained in:
2025-11-22 09:36:58 +08:00
parent eceb2e7da0
commit cddf82ce51
2 changed files with 104 additions and 0 deletions

41
fix-basepath.sh Normal file
View File

@@ -0,0 +1,41 @@
#!/bin/bash
echo "修复 basePath 配置..."
cd /home/ubuntu/vf_react/src/views/AgentChat/neuratalk
# 移除 basePath让它在根路径运行
cat > next.config.js << 'EOF'
/** @type {import('next').NextConfig} */
const nextConfig = {
// 不设置 basePath让 Nginx 处理路径重写
// basePath: '/ai-chat',
reactStrictMode: true,
poweredByHeader: false,
outputFileTracingRoot: '/home/ubuntu/vf_react/src/views/AgentChat/neuratalk',
async rewrites() {
return [
{
source: '/api/:path*',
destination: 'http://localhost:5001/api/:path*',
},
{
source: '/mcp/:path*',
destination: 'http://localhost:8900/:path*',
},
];
},
images: {
domains: ['valuefrontier.cn', 'localhost', '49.232.185.254'],
},
};
module.exports = nextConfig;
EOF
echo "✓ 已移除 basePath"
echo ""
echo "请重启 Next.js (Ctrl+C 然后 npm run dev)"