Authored by biao

update for bind mobile page. code review by LZF

... ... @@ -39,7 +39,7 @@ function startBind(password) {
location.href = res.data.refer;
}, 2000);
} else {
tip.show(res.message);
tip.show(res.message);
}
},
error: function(err) {
... ... @@ -70,6 +70,6 @@ $btnSure.on('touchstart', function() {
if (api.pwdValidate(pwd) === false) {
showErrTip('密码6-20位,请重新输入');
} else {
startBind(pwd);
startBind(pwd);
}
});
... ...
... ... @@ -43,7 +43,7 @@ module.exports = function(useInRegister, useForBind) {
location.href = res.data.refer;
}, 2000);
} else {
tip.show(res.message);
tip.show(res.message);
}
},
error: function(err) {
... ... @@ -117,21 +117,23 @@ module.exports = function(useInRegister, useForBind) {
token: $('#token').val()
},
success: function(data) {
if (data.code === 200) {
if (useForBind) {
if (isReg) {
startBind();
} else {
location.href = '/passport/bind/password?phoneNum=' + phoneNum + '&areaCode=' + areaCode + '&openId=' + openId + '&sourceType=' + sourceType + '&nickname=' + nickname;
}
} else {
location.href = data.data;
if (data.code === 200) {
if (useForBind) {
if (isReg) {
startBind();
} else {
location.href = '/passport/bind/password?phoneNum=' +
phoneNum + '&areaCode=' + areaCode + '&openId=' +
openId + '&sourceType=' + sourceType + '&nickname=' + nickname;
}
} else {
//验证码不正确,显示提示
showErrTip(data.message);
location.href = data.data;
}
} else {
//验证码不正确,显示提示
showErrTip(data.message);
}
}
});
... ...