From 0cb51f8bd6e7a12bb6304dae0b832c1b6235b3fd Mon Sep 17 00:00:00 2001
From: py <1760142047@qq.com>
Date: Sat, 8 Feb 2025 17:56:37 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/Banner/BannerForm.vue | 5 ++---
src/views/Banner/Index.vue | 7 +++++++
src/views/Board/components/addBarrage.vue | 14 +++++++-------
src/views/Board/components/welcome.vue | 18 +++++++++++++++---
4 files changed, 31 insertions(+), 13 deletions(-)
diff --git a/src/views/Banner/BannerForm.vue b/src/views/Banner/BannerForm.vue
index fe489c6..b25ef13 100644
--- a/src/views/Banner/BannerForm.vue
+++ b/src/views/Banner/BannerForm.vue
@@ -117,7 +117,7 @@ const formItemList = computed(()=>{
},
{label: '姓名', prop: 'fullName',placeholder:'格式:张三,李四,xx'},
{label: '祝福弹幕', prop: 'barrage', type: 'textarea'},
- {label: '背景图片', prop: 'backgroundImages', type: 'image'},
+ {label: '背景图片', prop: 'backgroundImages', type: 'image',limit: 4},
{label: '个人图片', prop: 'images', type: 'image', limit: 6, hide:formData.value.category === 1},
],
4: [
@@ -149,7 +149,7 @@ const getAIContent = async () => {
if (AILoading.value) return
try {
AILoading.value = true
- const res = await BannerApi.getContentBanner(`帮我生成三句生日祝福,姓名叫${formData.value.fullName},名字可能为空,空就直接祝福,返回数组格式,一个大数组,嵌套2个数组,里面的数组是生成的祝福语句,可以混一起,其他多余的字符不要,前面加个类似🎉 🌼 🎂 🎈 🌟 💐 这种小图标,数组格式不是字符串`)
+ const res = await BannerApi.getContentBanner(`帮我生成生日祝福,返回数组格式,一个大数组,嵌套2个数组,里面的数组是生成的祝福语句,可以混一起,其他多余的字符不要,前面加个类似🎉 🌼 🎂 🎈 🌟 💐 这种小图标,数组格式不是字符串,姓名叫${formData.value.fullName},一人两条祝福,,名字可能为空,空就直接三条生日祝福。`)
console.log(res, '===')
formData.value.barrage = res
AILoading.value = false
@@ -173,7 +173,6 @@ defineExpose({open}) // 提供 open 方法,用于打开弹窗
/** 提交表单 */
const submitForm = async () => {
// 校验表单
- console.log(formData.value,'===category')
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
diff --git a/src/views/Banner/Index.vue b/src/views/Banner/Index.vue
index 1b69777..cecd290 100644
--- a/src/views/Banner/Index.vue
+++ b/src/views/Banner/Index.vue
@@ -79,6 +79,13 @@
+