From 4adc5677a040f447e97b6f0b7c8eb6bab5d58dba Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 5 Jun 2024 16:41:21 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=20action=20=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/ai/image/index.ts | 21 +++++++++++++++++---- src/views/ai/image/ImageTask.vue | 12 ++++++++++-- src/views/ai/image/ImageTaskCard.vue | 2 +- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/src/api/ai/image/index.ts b/src/api/ai/image/index.ts index dfa60c8e..4fd35abe 100644 --- a/src/api/ai/image/index.ts +++ b/src/api/ai/image/index.ts @@ -27,6 +27,12 @@ export interface ImageMjButtonsVO { style: number // 样式: 2(Primary)、3(Green) } +export interface ImageMjActionVO { + id: string // MJ::JOB::upsample::1::85a4b4c1-8835-46c5-a15c-aea34fad1862 动作标识 + customId: string // MJ::JOB::upsample::1::85a4b4c1-8835-46c5-a15c-aea34fad1862 动作标识 +} + + export interface ImagePageReqVO { pageNo: number // 分页编号 pageSize: number // 分页大小 @@ -74,12 +80,19 @@ export const ImageApi = { drawImage: async (data: ImageDrawReqVO)=> { return await request.post({ url: `/ai/image/draw`, data }) }, - // midjourney - imagine - midjourneyImagine: async (data: ImageMidjourneyImagineReqVO)=> { - return await request.post({ url: `/ai/image/midjourney/imagine`, data }) - }, // 删除 deleteImage: async (id: number)=> { return await request.delete({ url: `/ai/image/delete-my?id=${id}`}) }, + + // ------------ midjourney + + // midjourney - imagine + midjourneyImagine: async (data: ImageMidjourneyImagineReqVO)=> { + return await request.post({ url: `/ai/image/midjourney/imagine`, data }) + }, + // midjourney - action + midjourneyAction: async (params: ImageMjActionVO)=> { + return await request.get({ url: `/ai/image/midjourney/action`, params }) + }, } diff --git a/src/views/ai/image/ImageTask.vue b/src/views/ai/image/ImageTask.vue index 15a0f206..8ada16a6 100644 --- a/src/views/ai/image/ImageTask.vue +++ b/src/views/ai/image/ImageTask.vue @@ -16,7 +16,7 @@ />