refactor(@vben/web-antd): 调整 API 路由和请求配置

- 移除未使用的 repository API 导出
- 优化 PPT 和 Spider 视图中的数据处理
- 调整请求客户端的默认超时时间
- 更新 Vite 配置中的代理设置
This commit is contained in:
vertoryao 2025-05-05 01:52:39 +08:00
parent e39433e49c
commit d12ea7dd83
5 changed files with 13 additions and 14 deletions

View File

@ -1,7 +1,6 @@
export * from './auth';
export * from './chatflow';
export * from './menu';
export * from './repository';
export * from './server';
export * from './user';
export * from './workflow';

View File

@ -386,13 +386,13 @@ const getConversationList = async () => {
},
{
userId: '1563',
lastId: '4dfa17e1-364a-4c98-af5d-1109c8f28212',
lastId: '',
sortBy: '',
limit: '5',
},
);
if (res.status === 200) {
conversationsItems.value = res.data.data.map((item: any) => {
conversationsItems.value = res.data.map((item: any) => {
return {
key: item.id,
label: item.name,

View File

@ -50,7 +50,7 @@ const getChatflowList = async () => {
mode: '',
name: '',
});
tools.value = res.data;
tools.value = res;
} catch (error) {
console.error(error);
}
@ -76,9 +76,8 @@ const startFetching = async () => {
inputs: {},
},
);
//
fetchResult.value = res.data.data.outputs.result;
fetchResult.value = res.data.outputs.result;
} catch (error) {
console.error(error);
}

View File

@ -13,18 +13,19 @@ export default defineConfig(async () => {
target: 'http://localhost:8081/api',
ws: true,
},
'/v1': {
target: 'http://localhost:8081/v1',
rewrite: (path) => path.replace(/^\/v1/, ''),
changeOrigin: true,
},
'/static': {
target: 'http://47.112.173.8:6802',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/static/, ''),
target: 'http://47.112.173.8:6802',
},
'/static/*.docx': {
target: 'http://47.112.173.8:6805',
changeOrigin: true,
target: 'http://47.112.173.8:6805',
},
'/v1': {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/v1/, ''),
target: 'http://localhost:8081/v1',
},
},
},

View File

@ -60,7 +60,7 @@ class RequestClient {
},
responseReturn: 'raw',
// 默认超时时间
timeout: 10_000,
timeout: 1_800_000,
};
const { ...axiosConfig } = options;
const requestConfig = merge(axiosConfig, defaultConfig);