|
我写了代码debug应该走else的结果直接结束?怎么回事代码如下红色部分代码是不成立的,按道理就该执行绿色部分结果debug直接跑到代码最后了: Model.prototype.regBtnClick = function(event){
var phoneInput =this.comp("phoneInput").val();
var pwd = this.comp("password").val();
var rpwd = this.comp("repassword").val();
var regdata =this.comp("regData1");
var phodata =this.comp("phoneData");
debugger;
if(phoneInput !== "")
{
phodata.setFilter("fPhoneNumber", "fPhoneNumber ='"+phoneInput+"'");
phodata.refreshData();
if(phodata.count()>0)
{
justep.Util.hint("该号码已经注册!");
return;
}
}else
{
if(pwd!=="" && pwd == rpwd)
{
regdata.newData({
"defaultValues" : [ {
"fID" : justep.UUID.createUUID(),
"fCreateTime" : new Date(),
"fPhoneNumber": phoneInput
} ]
});
regdata.saveData();
}
else
{
justep.Util.hint("两次密码不一致!");
return;
}
}
};
debug截图
|
|