feat: 请求增加requestid
This commit is contained in:
@ -3,6 +3,7 @@ import axios from 'axios';
|
||||
import { glsWithCatch } from '@/utils/stroage';
|
||||
import { useEnterpriseStore } from '@/stores/modules/enterprise';
|
||||
export const BASE_PYTHON_URL = 'https://agent.lvfunai.com';
|
||||
import { genRandomId } from '@/utils/tools';
|
||||
|
||||
// 历史记录-列表
|
||||
export const getAgentHistory = (id: string) => {
|
||||
@ -32,10 +33,11 @@ export const getConversationList = (params: {}) => {
|
||||
export const getHeaders = () => {
|
||||
const store = useEnterpriseStore();
|
||||
return {
|
||||
'Authorization': glsWithCatch('accessToken'),
|
||||
Authorization: glsWithCatch('accessToken'),
|
||||
'enterprise-id': store.enterpriseInfo?.id,
|
||||
'Accept': 'application/json',
|
||||
Accept: 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
requestid: genRandomId(),
|
||||
};
|
||||
};
|
||||
|
||||
@ -57,4 +59,4 @@ export const createSession = async () => {
|
||||
headers: getHeaders(),
|
||||
});
|
||||
return data;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user