1 回答
TA贡献1条经验 获得超0个赞
var verification = {
phoexist: function (param) {
var zhi = 0; //标识手机号是否被绑定,zhi=1绑定
if (param) {
$.ajax({
url: "../regist/checkMobileNumExist.htm?param=" + param,
type: "post",
dataType: "json",
async: false,
cache: false,
success: function (data) {
if (data.status == "n") {
layer.alert(param + "手机号已经被绑定!");
zhi = 1;
}
}
});
} else {
console.log("电话号码不能为空")
}
return zhi;
},
addClickListener: function (param) { //注册click事件
$("#btnCode").click(function () {
//调用phoexist方法
if (this.phoexist(param) == 0) {
console.log("phoexist == 0")
} else {
console.log(phoexist == 1)
}
}.bind(this)
);
}
}
添加回答
举报