Initial commit: Copilot Toolbox template project
This commit is contained in:
28
src/api/common.ts
Normal file
28
src/api/common.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { cacheGet } from '@/utils/cacheUtil'
|
||||
|
||||
export function getAgentBaseInfo(params: { id: string }) {
|
||||
const Tenantid = cacheGet('tenantId')
|
||||
const Token = cacheGet('token')
|
||||
return fetch(`${import.meta.env.VITE_API_BASE_AI}/agent/baseInfo/info?id=${params.id}`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Tenantid,
|
||||
Token
|
||||
}
|
||||
}).then(res => res.json())
|
||||
}
|
||||
|
||||
// 获取用户信息
|
||||
export async function getUserInfoById() {
|
||||
const Tenantid = cacheGet('tenantId')
|
||||
const Token = cacheGet('token')
|
||||
return fetch(`${import.meta.env['VITE_API_BASE_LAMP']}/oauth/anyone/getUserInfoById`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Tenantid,
|
||||
Token
|
||||
}
|
||||
}).then(res => res.json())
|
||||
}
|
||||
Reference in New Issue
Block a user