From 2ff21aa65e98840df4142a8b94599c5f06547f1d Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 30 Jul 2024 00:00:44 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91AI=EF=BC=9Aimage=20=E4=BD=9C=E5=93=81=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/ai/image/index.ts | 8 +-- src/router/modules/remaining.ts | 41 +++++++------ .../ai/image/index/components/ImageList.vue | 14 ++++- src/views/ai/image/square/index.vue | 61 ++++++++++++------- 4 files changed, 76 insertions(+), 48 deletions(-) diff --git a/src/api/ai/image/index.ts b/src/api/ai/image/index.ts index f1905cac..2f276c7e 100644 --- a/src/api/ai/image/index.ts +++ b/src/api/ai/image/index.ts @@ -53,13 +53,9 @@ export interface ImageMidjourneyButtonsVO { // AI 图片 API export const ImageApi = { // 获取【我的】绘图分页 - getImagePageMy: async (params: PageParam) => { + getImagePageMy: async (params: any) => { return await request.get({ url: `/ai/image/my-page`, params }) }, - // 获取公开的绘图记录 - getImagePagePublic: async (params) => { - return await request.get({ url: `/ai/image/public-page`, params }) - }, // 获取【我的】绘图记录 getImageMy: async (id: number) => { return await request.get({ url: `/ai/image/get-my?id=${id}` }) @@ -97,7 +93,7 @@ export const ImageApi = { // 更新绘画发布状态 updateImage: async (data: any) => { - return await request.put({ url: '/ai/image/update-public-status', data }) + return await request.put({ url: '/ai/image/update', data }) }, // 删除绘画 diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 380e48aa..f19d93ec 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -70,26 +70,6 @@ const remainingRouter: AppRouteRecordRaw[] = [ } ] }, - // { - // path: '/ai/music', - // component: Layout, - // redirect: '/index', - // name: 'AIMusic', - // meta: {}, - // children: [ - // { - // path: 'index', - // component: () => import('@/views/ai/music/components/index.vue'), - // name: 'AIMusicIndex', - // meta: { - // title: 'AI 音乐', - // icon: 'ep:home-filled', - // noCache: false, - // affix: true - // } - // } - // ] - // }, { path: '/user', component: Layout, @@ -593,6 +573,27 @@ const remainingRouter: AppRouteRecordRaw[] = [ component: () => import('@/views/crm/product/detail/index.vue') } ] + }, + { + path: '/ai', + component: Layout, + name: 'Ai', + meta: { + hidden: true + }, + children: [ + { + path: 'image/square', + component: () => import('@/views/ai/image/square/index.vue'), + name: 'AiImageSquare', + meta: { + title: '绘图作品', + icon: 'ep:home-filled', + noCache: false, + affix: true + } + } + ] } ] diff --git a/src/views/ai/image/index/components/ImageList.vue b/src/views/ai/image/index/components/ImageList.vue index cdd1e208..9ffde77e 100644 --- a/src/views/ai/image/index/components/ImageList.vue +++ b/src/views/ai/image/index/components/ImageList.vue @@ -1,6 +1,10 @@