【bug】手机号必填校验

This commit is contained in:
fengachen
2021-11-03 20:42:56 +08:00
parent 1fa3901e5d
commit 481fe7629c
2 changed files with 42 additions and 24 deletions
+9
View File
@@ -175,6 +175,15 @@ Page({
}) })
return return
} }
// 手机号验证
if(formData.phone === '' || formData.phone === undefined ){
wx.showToast({
title: '请输入手机号',
icon: 'none',
duration: 2000
})
return
}
// 缴费方式 // 缴费方式
if (formData.payMode === '') { if (formData.payMode === '') {
wx.showToast({ wx.showToast({
+9
View File
@@ -532,6 +532,15 @@ Page({
}) })
return return
} }
// 手机号验证
if (formData.phone === '' || formData.phone === undefined) {
wx.showToast({
title: '请输入手机号',
icon: 'none',
duration: 2000
})
return
}
// 缴费方式 选择嘉宾不需要校验 // 缴费方式 选择嘉宾不需要校验
if (formData.payMode === '' && this.data.guestType !== '1') { if (formData.payMode === '' && this.data.guestType !== '1') {
wx.showToast({ wx.showToast({