feat: 去除所有接口中的 vo
This commit is contained in:
@@ -11,7 +11,7 @@ import { requestClient } from '#/api/request';
|
||||
const { apiURL } = useAppConfig(import.meta.env, import.meta.env.PROD);
|
||||
const accessStore = useAccessStore();
|
||||
export namespace AiWriteApi {
|
||||
export interface WriteVO {
|
||||
export interface Write {
|
||||
type: AiWriteTypeEnum.REPLY | AiWriteTypeEnum.WRITING; // 1:撰写 2:回复
|
||||
prompt: string; // 写作内容提示 1。撰写 2回复
|
||||
originalContent: string; // 原文
|
||||
@@ -27,14 +27,14 @@ export namespace AiWriteApi {
|
||||
createTime?: Date; // 创建时间
|
||||
}
|
||||
|
||||
export interface AiWritePageReqVO extends PageParam {
|
||||
export interface AiWritePageReq extends PageParam {
|
||||
userId?: number; // 用户编号
|
||||
type?: AiWriteTypeEnum; // 写作类型
|
||||
platform?: string; // 平台
|
||||
createTime?: [string, string]; // 创建时间
|
||||
}
|
||||
|
||||
export interface AiWriteRespVo {
|
||||
export interface AiWriteResp {
|
||||
id: number;
|
||||
userId: number;
|
||||
type: number;
|
||||
@@ -60,7 +60,7 @@ export function writeStream({
|
||||
ctrl,
|
||||
}: {
|
||||
ctrl: AbortController;
|
||||
data: Partial<AiWriteApi.WriteVO>;
|
||||
data: Partial<AiWriteApi.Write>;
|
||||
onClose?: (...args: any[]) => void;
|
||||
onError?: (...args: any[]) => void;
|
||||
onMessage?: (res: any) => void;
|
||||
@@ -83,7 +83,7 @@ export function writeStream({
|
||||
|
||||
// 获取写作列表
|
||||
export function getWritePage(params: any) {
|
||||
return requestClient.get<PageResult<AiWriteApi.AiWritePageReqVO>>(
|
||||
return requestClient.get<PageResult<AiWriteApi.AiWritePageReq>>(
|
||||
`/ai/write/page`,
|
||||
{ params },
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user