fix: 1.将合同模板和交叉评查中的文件下载改用通过后端api进行转发获取文件来下载。 2.修复登录过程中token认证的代码问题。 3.完善api-config文件中不同端口号不同的回调地址配置。
This commit is contained in:
+35
-54
@@ -14,15 +14,15 @@ interface ApiConfig {
|
||||
// OAuth2.0配置
|
||||
oauth: {
|
||||
// IDaaS服务器地址
|
||||
serverUrl: string;
|
||||
serverUrl?: string;
|
||||
// OAuth2应用Client ID
|
||||
clientId: string;
|
||||
clientId?: string;
|
||||
// OAuth2应用Client Secret
|
||||
clientSecret: string;
|
||||
clientSecret?: string;
|
||||
// 回调地址
|
||||
redirectUri: string;
|
||||
redirectUri?: string;
|
||||
// 应用ID(用于登出)
|
||||
appId: string;
|
||||
appId?: string;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -30,51 +30,15 @@ interface ApiConfig {
|
||||
// 根据不同端口提供不同的API配置
|
||||
const portConfigs: Record<string, Partial<ApiConfig>> = {
|
||||
|
||||
// 测试主要服务实例
|
||||
'5173': {
|
||||
baseUrl: 'http://172.16.0.55:8000',
|
||||
documentUrl: 'http://172.16.0.55:8000/docauditai/',
|
||||
uploadUrl: 'http://172.16.0.55:8000/admin/documents'
|
||||
},
|
||||
// 测试客户端实例
|
||||
'5174': {
|
||||
baseUrl: 'http://172.16.0.55:5174',
|
||||
documentUrl: 'http://172.16.0.55:5174/docauditai/',
|
||||
uploadUrl: 'http://172.16.0.55:5174/admin/documents'
|
||||
},
|
||||
// 测试客户端实例
|
||||
'5175': {
|
||||
baseUrl: 'http://172.16.0.55:5175',
|
||||
documentUrl: 'http://172.16.0.55:5175/docauditai/',
|
||||
uploadUrl: 'http://172.16.0.55:5175/admin/documents'
|
||||
},
|
||||
// 测试客户端实例
|
||||
'5176': {
|
||||
baseUrl: 'http://172.16.0.55:5176',
|
||||
documentUrl: 'http://172.16.0.55:5176/docauditai/',
|
||||
uploadUrl: 'http://172.16.0.55:5176/admin/documents'
|
||||
},
|
||||
// 测试客户端实例
|
||||
'5177': {
|
||||
baseUrl: 'http://172.16.0.55:5177',
|
||||
documentUrl: 'http://172.16.0.55:5177/docauditai/',
|
||||
uploadUrl: 'http://172.16.0.55:5177/admin/documents'
|
||||
},
|
||||
// 测试客户端实例
|
||||
'5178': {
|
||||
baseUrl: 'http://172.16.0.55:8008',
|
||||
documentUrl: 'http://172.16.0.55:8008/docauditai/',
|
||||
uploadUrl: 'http://172.16.0.55:8008/admin/documents'
|
||||
},
|
||||
|
||||
|
||||
|
||||
// 主要
|
||||
// 梅州
|
||||
'51703': {
|
||||
baseUrl: 'http://nas.7bm.co:8073',
|
||||
documentUrl: 'http://nas.7bm.co:8073/docauditai/',
|
||||
uploadUrl: 'http://nas.7bm.co:8073/admin/documents'
|
||||
uploadUrl: 'http://nas.7bm.co:8073/admin/documents',
|
||||
oauth: {
|
||||
redirectUri: 'http://10.79.97.17:51703/callback'
|
||||
}
|
||||
// baseUrl: 'http://nas.7bm.co:8873',
|
||||
// documentUrl: 'http://nas.7bm.co:8873/docauditai/',
|
||||
// uploadUrl: 'http://nas.7bm.co:8873/admin/documents'
|
||||
@@ -85,21 +49,30 @@ const portConfigs: Record<string, Partial<ApiConfig>> = {
|
||||
'51704': {
|
||||
baseUrl: 'http://10.79.97.17:8001',
|
||||
documentUrl: 'http://10.79.97.17:8001/docauditai/',
|
||||
uploadUrl: 'http://10.79.97.17:8001/admin/documents'
|
||||
uploadUrl: 'http://10.79.97.17:8001/admin/documents',
|
||||
oauth: {
|
||||
redirectUri: 'http://10.79.97.17:51704/callback'
|
||||
}
|
||||
},
|
||||
|
||||
// 揭阳
|
||||
'51705': {
|
||||
baseUrl: 'http://10.79.97.17:8002',
|
||||
documentUrl: 'http://10.79.97.17:8002/docauditai/',
|
||||
uploadUrl: 'http://10.79.97.17:8002/admin/documents'
|
||||
uploadUrl: 'http://10.79.97.17:8002/admin/documents',
|
||||
oauth: {
|
||||
redirectUri: 'http://10.79.97.17:51705/callback'
|
||||
}
|
||||
},
|
||||
|
||||
// 潮州
|
||||
'51706': {
|
||||
baseUrl: 'http://10.79.97.17:8003',
|
||||
documentUrl: 'http://10.79.97.17:8003/docauditai/',
|
||||
uploadUrl: 'http://10.79.97.17:8003/admin/documents'
|
||||
uploadUrl: 'http://10.79.97.17:8003/admin/documents',
|
||||
oauth: {
|
||||
redirectUri: 'http://10.79.97.17:51706/callback'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -107,8 +80,12 @@ const portConfigs: Record<string, Partial<ApiConfig>> = {
|
||||
'51707': {
|
||||
baseUrl: 'http://10.79.97.17:8004',
|
||||
documentUrl: 'http://10.79.97.17:8004/docauditai/',
|
||||
uploadUrl: 'http://10.79.97.17:8004/admin/documents'
|
||||
uploadUrl: 'http://10.79.97.17:8004/admin/documents',
|
||||
oauth: {
|
||||
redirectUri: 'http://10.79.97.17:51707/callback'
|
||||
}
|
||||
},
|
||||
|
||||
//test
|
||||
'51708': {
|
||||
baseUrl: 'http://10.79.97.17:8005',
|
||||
@@ -312,13 +289,17 @@ const getCurrentConfig = (): ApiConfig => {
|
||||
|
||||
// 如果有端口特定配置,则合并配置
|
||||
if (port && portConfigs[port]) {
|
||||
console.log(`🔧 使用端口特定配置: ${port}`, portConfigs[port]);
|
||||
console.log(`🔧 使用端口特定配置: ${port}`);
|
||||
const portConfig = portConfigs[port];
|
||||
defaultConfig = {
|
||||
...defaultConfig,
|
||||
...portConfigs[port],
|
||||
// 保持oauth配置不变,只覆盖API相关配置
|
||||
oauth: defaultConfig.oauth
|
||||
...defaultConfig,
|
||||
...portConfig,
|
||||
// 如果端口配置中有oauth,需要深度合并oauth配置
|
||||
oauth: portConfig.oauth
|
||||
? { ...defaultConfig.oauth, ...portConfig.oauth }
|
||||
: defaultConfig.oauth
|
||||
};
|
||||
console.log(`🔧 使用端口特定配置---深度合并后: ${JSON.stringify(defaultConfig.oauth)}`)
|
||||
} else {
|
||||
console.log(`🔧 使用环境配置: ${env}`, defaultConfig);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user