From ad1acf29b86155d944beab87daad52e2956c0ce9 Mon Sep 17 00:00:00 2001 From: WUSIJIAN <13825895+wsj0228@user.noreply.gitee.com> Date: Mon, 1 Dec 2025 16:54:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=9E=E7=A9=BA=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/customerService/product/component/editRole.vue | 6 ++++++ src/views/customerService/script/component/editRole.vue | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/views/customerService/product/component/editRole.vue b/src/views/customerService/product/component/editRole.vue index caab1e9..1d970f2 100644 --- a/src/views/customerService/product/component/editRole.vue +++ b/src/views/customerService/product/component/editRole.vue @@ -164,6 +164,12 @@ const onSubmit = async () => { return; } + // 额外验证话术内容 + if (!state.formData.description || state.formData.description === '


' || state.formData.description.trim() === '


') { + ElMessage.warning('产品详情内容不能为空'); + return; + } + // 根据ID判断是新增还是修改 if (state.formData.id === 0) { // 新增产品 diff --git a/src/views/customerService/script/component/editRole.vue b/src/views/customerService/script/component/editRole.vue index a66bc0c..69ec898 100644 --- a/src/views/customerService/script/component/editRole.vue +++ b/src/views/customerService/script/component/editRole.vue @@ -10,7 +10,7 @@ - + @@ -133,10 +133,17 @@ const onSubmit = async () => { const valid = await formRef.value.validate(); if (!valid) return; + // 额外验证话术内容 + if (!state.formData.content || state.formData.content === '


' || state.formData.content.trim() === '


') { + ElMessage.warning('话术内容不能为空'); + return; + } + state.loading = true; if (state.formData.id === 0) { // 新增模式 + console.log(state.formData.content, '话术内容'); await getscriptAdd(state.formData); ElMessage.success('添加成功'); } else {