else if (this.data.Email != '') {
if (!str.test(this.data.Email)) { // 判断邮箱格式是否有误 如果有误就提示用户请输入正确的邮箱
wx.showToast({
title: '请输入正确的邮箱',
icon: 'none',
duration: 2000
})
}
}
判断没问题就是不执行else
else if 里面 if判断验证没有问题就是一直不执行else中的语句这是什么问题?In else if, if there is no problem with the judgment verification, it means that the statement in the else is not executed all the time. What is the problem?
else if 里面 if判断验证没有问题就是一直不执行else中的语句这是什么问题?else if (this.data.Email != '') {
if (!str.test(this.data.Email)) { // 判断邮箱格式是否有误 如果有误就提示用户请输入正确的邮箱
wx.showToast({
title: '请输入正确的邮箱',
icon: 'none',
duration: 2000
})
}
}
判断没问题就是不执行else
Else if (this. Data. Email! = '') {if (! Str.test (this. Data. Email)) {/ / judge whether the email format is incorrect. If there is any error, prompt the user. Enter the correct email Wx. Showtoast ({Title: 'please enter the correct email', Icon: 'none', duration: 2000})}} judge that there is no problem, but do not execute else
回答:
1,走了else if
2,if 验证过不执行弹窗
3,代码执行结束
如何知道没问题的?
贴个完整的代码吧,没看到你else在哪儿