Bläddra i källkod

feat: 邮件为空判断 为空时不请求接口

Jack Zhou 3 månader sedan
förälder
incheckning
4424ffc20f

+ 4 - 0
src/views/Booking/src/components/BookingDetail/src/components/EmailView.vue

@@ -137,6 +137,10 @@ const handleFocusEditor = () => {
 const sendEmail = () => {
   const html = editorRef.value.getHtml()
   const text = editorRef.value.getText()
+  if (!text) {
+    ElMessage.warning('Please enter the email content')
+    return
+  }
   $api
     .sendEmailApi({
       action: 'ocean_booking',

+ 4 - 0
src/views/DestinationDelivery/src/components/TableView/src/components/EmailDialog.vue

@@ -151,6 +151,10 @@ const handleFocusEditor = () => {
 const sendEmail = () => {
   const html = editorRef.value.getHtml()
   const text = editorRef.value.getText()
+  if (!text) {
+    ElMessage.warning('Please enter the email content')
+    return
+  }
   $api
     .saveDliveryBookingEmail({
       email: emailData.value.email,

+ 4 - 0
src/views/Tracking/src/components/TrackingDetail/src/components/EmailDrawer.vue

@@ -138,6 +138,10 @@ const emit = defineEmits<{
 const sendEmail = () => {
   const html = editorRef.value.getHtml()
   const text = editorRef.value.getText()
+  if (!text) {
+    ElMessage.warning('Please enter the email content')
+    return
+  }
   $api
     .sendEmailApi({
       action: 'ocean_order',