From 8d33476472ddd6667c72ba59f5e7f3f4319fe11c Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 27 Jun 2024 23:08:50 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E3=80=91AI=EF=BC=9A=E9=9F=B3=E4=B9=90=E7=AE=A1=E7=90=86=2050%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/ai/image/index.ts | 4 +- src/api/ai/music/index.ts | 40 +++++ src/views/ai/image/ImageDetailDrawer.vue | 34 ++-- src/views/ai/image/ImageTask.vue | 46 ++--- src/views/ai/image/ImageTaskCard.vue | 48 +++-- src/views/ai/image/manager/index.vue | 6 +- src/views/ai/music/manager/index.vue | 215 +++++++++++++++++++++++ 7 files changed, 329 insertions(+), 64 deletions(-) create mode 100644 src/api/ai/music/index.ts create mode 100644 src/views/ai/music/manager/index.vue diff --git a/src/api/ai/image/index.ts b/src/api/ai/image/index.ts index cb5a5afd..b895986d 100644 --- a/src/api/ai/image/index.ts +++ b/src/api/ai/image/index.ts @@ -1,7 +1,7 @@ import request from '@/config/axios' -// AI API 密钥 VO -export interface ImageRespVO { +// AI 绘图 VO +export interface ImageVO { id: number // 编号 platform: string // 平台 model: string // 模型 diff --git a/src/api/ai/music/index.ts b/src/api/ai/music/index.ts new file mode 100644 index 00000000..9415d3a2 --- /dev/null +++ b/src/api/ai/music/index.ts @@ -0,0 +1,40 @@ +import request from '@/config/axios' + +// AI 音乐 VO +export interface MusicVO { + id: number // 编号 + userId: number // 用户编号 + title: string // 音乐名称 + lyric: string // 歌词 + imageUrl: string // 图片地址 + audioUrl: string // 音频地址 + videoUrl: string // 视频地址 + status: number // 音乐状态 + gptDescriptionPrompt: string // 描述词 + prompt: string // 提示词 + platform: string // 模型平台 + model: string // 模型 + generateMode: number // 生成模式 + tags: string // 音乐风格标签 + publicStatus: boolean // 是否发布 + taskId: string // 任务id + errorMessage: string // 错误信息 +} + +// AI 音乐 API +export const MusicApi = { + // 查询音乐分页 + getMusicPage: async (params: any) => { + return await request.get({ url: `/ai/music/page`, params }) + }, + + // 修改音乐 + updateMusic: async (data: MusicVO) => { + return await request.put({ url: `/ai/music/update`, data }) + }, + + // 删除音乐 + deleteMusic: async (id: number) => { + return await request.delete({ url: `/ai/music/delete?id=` + id }) + } +} diff --git a/src/views/ai/image/ImageDetailDrawer.vue b/src/views/ai/image/ImageDetailDrawer.vue index 7c74ef35..fca087da 100644 --- a/src/views/ai/image/ImageDetailDrawer.vue +++ b/src/views/ai/image/ImageDetailDrawer.vue @@ -7,11 +7,11 @@ >
- - - - - + + + + +
@@ -21,30 +21,30 @@
时间
-
提交时间:{{imageDetail.createTime}}
+
提交时间:{{ imageDetail.createTime }}
-
生成时间:{{imageDetail.updateTime}}
+
生成时间:{{ imageDetail.updateTime }}
模型
- {{imageDetail.model}}({{imageDetail.height}}x{{imageDetail.width}}) + {{ imageDetail.model }}({{ imageDetail.height }}x{{ imageDetail.width }})
提示词
- {{imageDetail.prompt}} + {{ imageDetail.prompt }}
图片地址
- {{imageDetail.picUrl}} + {{ imageDetail.picUrl }}
@@ -53,18 +53,18 @@
- {{imageDetail?.options?.style}} + {{ imageDetail?.options?.style }}
diff --git a/src/views/ai/image/manager/index.vue b/src/views/ai/image/manager/index.vue index ef505036..d7ac6c81 100644 --- a/src/views/ai/image/manager/index.vue +++ b/src/views/ai/image/manager/index.vue @@ -163,7 +163,7 @@