Authored by 姜枫

fix bugs

... ... @@ -94,12 +94,12 @@ const index = (req, res, next) => {
}
});
_.forEach(result.date.selectMonth, function(x) {
if (x.value === a[1]) {
if (parseInt(x.value, 10) === parseInt(a[1], 10)) {
x.isSelected = 'selected';
}
});
_.forEach(result.date.selectDay, function(x) {
if (x.value === a[2]) {
if (parseInt(x.value, 10) === parseInt(a[2], 10)) {
x.isSelected = 'selected';
}
});
... ...
... ... @@ -39,17 +39,17 @@ var Bll = {
var birthdayForm = $('#birthday');
var nickForm = $('#nick_name');
var realNameForm = $('#username');
var addressForm = $('.form-group-address');
// var addressForm = $('.form-group-address');
var flag = true;
!regBirth.test(info.birthday) ? birthdayForm.next().show() : birthdayForm.next().hide();
!regName.test(info.nick_name) ? nickForm.next().show() : nickForm.next().hide();
!regRealName.test(info.username) ? realNameForm.next().show() : realNameForm.next().hide();
typeof (info.area_code) === 'undefined' ?
addressForm.css('margin-bottom', '20px').find('.error-tips').show() :
addressForm.css('margin-bottom', '70px').find('.error-tips').hide();
if (!regBirth.test(info.birthday) || !regName.test(info.nick_name) || !regRealName.test(info.username) ||
typeof (info.area_code) === 'undefined') {
// typeof (info.area_code) === 'undefined' ?
// addressForm.css('margin-bottom', '20px').find('.error-tips').show() :
// addressForm.css('margin-bottom', '70px').find('.error-tips').hide();
if (!regBirth.test(info.birthday) || !regName.test(info.nick_name) || !regRealName.test(info.username)) {
flag = false;
}
return flag;
... ...