Commit 15951d6166d547c74673ff6133de83307e007270
1 parent
66ed627c
fix: 修改contact us填写限制,prod2-73/74
Showing
2 changed files
with
9 additions
and
4 deletions
deploy/prod2.sh
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 | { | ... | ... |