update pay function

This commit is contained in:
2025-11-22 09:10:13 +08:00
parent e778742590
commit 7498e87d31
4 changed files with 317 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
// 开发环境先不设置 basePath方便测试
// basePath: '/ai-chat',
// assetPrefix: '/ai-chat/',
// 启用严格模式
reactStrictMode: true,
// 生产环境优化
poweredByHeader: false,
// 解决多个 lockfile 警告
outputFileTracingRoot: '/home/ubuntu/vf_react/src/views/AgentChat/neuratalk',
// 环境变量
env: {
NEXT_PUBLIC_BASE_PATH: '',
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL || 'http://localhost:5001',
NEXT_PUBLIC_MAIN_APP_URL: process.env.NEXT_PUBLIC_MAIN_APP_URL || 'https://valuefrontier.cn',
},
// 重写规则 - 将 API 请求代理到后端
async rewrites() {
return [
{
source: '/api/:path*',
destination: 'http://localhost:5001/api/:path*',
},
{
source: '/mcp/:path*',
destination: 'http://localhost:8900/:path*',
},
];
},
// 配置允许的域名(用于 Next.js Image 组件)
images: {
domains: ['valuefrontier.cn', 'localhost'],
},
// 允许跨域请求(开发环境)
async headers() {
return [
{
source: '/:path*',
headers: [
{
key: 'Access-Control-Allow-Origin',
value: '*',
},
],
},
];
},
};
module.exports = nextConfig;