diff --git a/src/views/mall/product/comment/ReplyForm.vue b/src/views/mall/product/comment/ReplyForm.vue index 4ce36781..4c8bd4d5 100644 --- a/src/views/mall/product/comment/ReplyForm.vue +++ b/src/views/mall/product/comment/ReplyForm.vue @@ -48,16 +48,15 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗 /** 提交表单 */ const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 - const submitReplyForm = async () => { + // 校验表单 const valid = await formRef?.value?.validate() if (!valid) return - + // 提交请求 formLoading.value = true try { await CommentApi.replyComment(formData.value) message.success(t('common.createSuccess')) - dialogVisible.value = false // 发送操作成功的事件 emit('success') diff --git a/src/views/mall/product/comment/index.vue b/src/views/mall/product/comment/index.vue index 4fe65a86..1b0745ba 100644 --- a/src/views/mall/product/comment/index.vue +++ b/src/views/mall/product/comment/index.vue @@ -61,17 +61,24 @@ - + @@ -88,7 +95,7 @@ :src="picUrl" :preview-src-list="scope.row.picUrls" :initial-index="index" - class="w-30px h-30px" + class="w-40px h-40px" preview-teleported /> @@ -151,7 +158,7 @@ import { dateFormatter } from '@/utils/formatTime' import * as CommentApi from '@/api/mall/product/comment' import CommentForm from './CommentForm.vue' -import ReplyForm from '@/views/mall/product/comment/ReplyForm.vue' +import ReplyForm from './ReplyForm.vue' defineOptions({ name: 'ProductComment' }) @@ -164,25 +171,10 @@ const list = ref([]) // 列表的数据 const queryParams = reactive({ pageNo: 1, pageSize: 10, - userId: null, - userNickname: null, - userAvatar: null, - anonymous: null, - orderId: null, - orderItemId: null, - spuId: null, - spuName: null, - skuId: null, - visible: null, - scores: null, - descriptionScores: null, - benefitScores: null, - content: null, - picUrls: null, replyStatus: null, - replyUserId: null, - replyContent: null, - replyTime: [], + spuName: null, + userNickname: null, + orderId: null, createTime: [] }) const queryFormRef = ref() // 搜索的表单