perf: usages list;perf: move components (#3654)
* perf: usages list * team sub plan load * perf: usage dashboard code * perf: dashboard ui * perf: move components
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { POST } from '@/web/common/api/request';
|
||||
import {
|
||||
CreateTrainingUsageProps,
|
||||
GetTotalPointsProps,
|
||||
GetUsageDashboardProps,
|
||||
GetUsageDashboardResponseItem,
|
||||
GetUsageProps
|
||||
} from '@fastgpt/global/support/wallet/usage/api.d';
|
||||
import type { UsageItemType } from '@fastgpt/global/support/wallet/usage/type';
|
||||
@@ -10,11 +11,8 @@ import { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/t
|
||||
export const getUserUsages = (data: PaginationProps<GetUsageProps>) =>
|
||||
POST<PaginationResponse<UsageItemType>>(`/proApi/support/wallet/usage/getUsage`, data);
|
||||
|
||||
export const getTotalPoints = (data: GetTotalPointsProps) =>
|
||||
POST<{ totalPoints: number; date: string }[]>(
|
||||
`/proApi/support/wallet/usage/getTotalPoints`,
|
||||
data
|
||||
);
|
||||
export const getDashboardData = (data: GetUsageDashboardProps) =>
|
||||
POST<GetUsageDashboardResponseItem[]>(`/proApi/support/wallet/usage/getDashboardData`, data);
|
||||
|
||||
export const postCreateTrainingUsage = (data: CreateTrainingUsageProps) =>
|
||||
POST<string>(`/support/wallet/usage/createTrainingUsage`, data);
|
||||
|
||||
Reference in New Issue
Block a user