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 {