Commit 15951d6166d547c74673ff6133de83307e007270

Authored by boyang
1 parent 66ed627c

fix: 修改contact us填写限制,prod2-73/74

deploy/prod2.sh
1 1 #!/bin/bash
2 2 # 变量定义
3   -LAST_TAG="1.0.72"
4   -TAG="1.0.73"
  3 +LAST_TAG="1.0.73"
  4 +TAG="1.0.74"
5 5 TARGET_PATH="/root/web/canrud-outside-nuxt-front"
6 6 DOCKERFILE_PATH="/root/web/canrud-outside-nuxt-front/canrud-nuxt-front"
7 7 IMAGE_NAME="canrud-outside-front"
... ...
pages/contact.vue
... ... @@ -254,7 +254,13 @@ const state = reactive({
254 254 });
255 255  
256 256 const handleSubmit = async () => {
257   - // Removed verification condition since recaptcha is commented out
  257 + // Directly check if any field is empty
  258 + if (!state.firstName || !state.lastName || !state.email || !state.text) {
  259 + // At least one field is empty, stop here
  260 + return;
  261 + }
  262 +
  263 + // All fields have values, proceed with form submission
258 264 let { data } = await useAsyncData(
259 265 "sendEmail",
260 266 () =>
... ... @@ -265,7 +271,6 @@ const handleSubmit = async () => {
265 271 lastName: state.lastName,
266 272 email: state.email,
267 273 message: state.text,
268   - subject: "",
269 274 },
270 275 }),
271 276 {
... ...