Authored by 郭成尧

login-setpassword-error-log-handle

... ... @@ -285,7 +285,8 @@ const wechat = {
doPassportCallback(openId, nickname, 'wechat', req, res).catch(next);
})(req, res, next);
} else {
return next('Auth State Mismatch');
log.error('Auth State Mismatch:' + req.originalUrl);
return res.redirect(loginPage);
}
}
};
... ... @@ -310,7 +311,8 @@ const sina = {
doPassportCallback(openId, nickname, 'sina', req, res).catch(next);
})(req, res, next);
} else {
return next('Auth State Mismatch');
log.error('Auth State Mismatch:' + req.originalUrl);
return res.redirect(loginPage);
}
}
};
... ... @@ -336,7 +338,8 @@ const qq = {
doPassportCallback(openId, nickname, 'qq', req, res).catch(next);
})(req, res, next);
} else {
return next('Auth State Mismatch' + req.originalUrl);
log.error('Auth State Mismatch:' + req.originalUrl);
return res.redirect(loginPage);
}
}
};
... ...
... ... @@ -65,6 +65,7 @@ $('.pitch').on('click', function() {
});
function setPassword() {
$btnSure.addClass('disable');
return $.ajax({
type: 'POST',
url: '/passport/reg/setpassword',
... ... @@ -96,8 +97,12 @@ function setPassword() {
location.href = res.href;
}, 1500);
} else {
$btnSure.removeClass('disable');
showErrTip(data.message);
}
},
error: function() {
$btnSure.removeClass('disable');
}
});
}
... ... @@ -114,6 +119,7 @@ $btnSure.on('touchstart', function() {
} else {
if ($('.pitch').hasClass('select')) {
setPassword();
} else {
$('.prompt').show();
... ...