Commit 6d83970d authored by xinzhedeai's avatar xinzhedeai

better:消费者页面校验优化

parent 32e723cf
...@@ -165,7 +165,7 @@ window.addEventListener("load", function () { ...@@ -165,7 +165,7 @@ window.addEventListener("load", function () {
gemhoUtil.navigatePage(strurl, '跳转中...') gemhoUtil.navigatePage(strurl, '跳转中...')
}, },
submitForm() { submitForm() {
if (!this.formData.content) { if (!gemhoUtil.validateRequire(this.formData.content)) {
vant.Dialog.alert({ vant.Dialog.alert({
message: '安全建议不可为空', message: '安全建议不可为空',
}) })
...@@ -194,6 +194,13 @@ window.addEventListener("load", function () { ...@@ -194,6 +194,13 @@ window.addEventListener("load", function () {
return; return;
} }
if (this.formData.contactName && !gemhoUtil.validateChineseName(this.formData.contactName)) {
vant.Dialog.alert({
message: '联系人格式不正确',
})
return;
}
vant.Toast.loading({ vant.Toast.loading({
message: '正在处理...', message: '正在处理...',
forbidClick: true, forbidClick: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment