diff --git a/src/api/ai/image/index.ts b/src/api/ai/image/index.ts index ffc5a091..8e52d427 100644 --- a/src/api/ai/image/index.ts +++ b/src/api/ai/image/index.ts @@ -40,6 +40,7 @@ export interface ImageDallReqVO { export interface ImageMidjourneyImagineReqVO { prompt: string // 提示词 + model: string // 模型 mj nijj base64Array: string[] // size不能为空 } diff --git a/src/views/ai/image/midjourney/index.vue b/src/views/ai/image/midjourney/index.vue index 5b4e257e..c08ca625 100644 --- a/src/views/ai/image/midjourney/index.vue +++ b/src/views/ai/image/midjourney/index.vue @@ -77,17 +77,17 @@ interface ImageSizeVO { // 定义属性 const prompt = ref('') // 提示词 -const selectHotWord = ref('') // 选中的热词 +const selectHotWord = ref('midjourney') // 选中的热词 const hotWords = ref(['中国旗袍', '古装美女', '卡通头像', '机甲战士', '童话小屋', '中国长城']) // 热词 const selectModel = ref() // 选中的热词 const models = ref([ { - key: 'qinxi', + key: 'midjourney', name: 'MJ', image: 'https://bigpt8.com/pc/_nuxt/mj.34a61377.png', }, { - key: 'ziran', + key: 'niji', name: 'NIJI', image: 'https://bigpt8.com/pc/_nuxt/nj.ca79b143.png', }, @@ -122,18 +122,6 @@ const handlerModelClick = async (model: ImageModelVO) => { selectModel.value = model } -/** - * size - click - */ -const handlerSizeClick = async (imageSize: ImageSizeVO) => { - if (selectImageSize.value === imageSize) { - selectImageSize.value = {} as ImageSizeVO - return - } - selectImageSize.value = imageSize - console.log(imageSize) -} - /** * 图片生产 */ @@ -145,6 +133,7 @@ const handlerGenerateImage = async () => { // 发送请求 const req = { prompt: prompt.value, + model: selectModel.value.key, base64Array: [], } as ImageMidjourneyImagineReqVO await ImageApi.midjourneyImagine(req)