Authored by 徐炜

Merge branch 'feature/installment1' into release/4.9.1.0

... ... @@ -105,7 +105,7 @@ const index = (req, res, next) => {
return params;
});
} else if (openStatus === 1 || openStatus === 3) {
} else if (openStatus === '1' || openStatus === '3') {
res.redirect('/home/installment/review?status=' + openStatus);
}
}).then((result) => {
... ...
... ... @@ -320,7 +320,7 @@ const activateService = (params) => {
method: 'user.instalment.activate',
debug: 'XYZ' // TODO: remove this
}, params), {
timeout: API_TIMEOUT
timeout: 30000
});
};
... ...
... ... @@ -48,16 +48,16 @@
min="1"
pattern="\d*"
placeholder="请输入验证码" size="6" maxlength="6" />
<button id="send-sms" class="count-down">获取验证码</button>
<button id="send-sms" class="count-down disabled">获取验证码</button>
<div class="clearfix"></div>
</div>
<div class="agreements">
<input id="accept-agreements" name="agreements" type="checkbox" class="installment-check-btn"/>
<label for="accept-agreements">
<span>免费开通,详情请见
<div class="text-label">免费开通,详情请见
<a id="agreements" href="" data-href="/home/installment/agreement">《有货分期-信而富用户服务协议&借款服务协议》</a>
</span>
</div>
</label>
<div class="clearfix"></div>
</div>
... ...

20.1 KB | W: | H:

18.6 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
... ... @@ -43,6 +43,13 @@ var validateForm = function() {
ret = true;
}
// 检查手机号码
if (formModel.cardNo && formModel.cardNo.length >= 16 &&
formModel.mobile && formModel.mobile.length === 11) {
$('#send-sms').removeClass('disabled');
} else {
$('#send-sms').addClass('disabled');
}
return ret;
};
... ... @@ -150,6 +157,11 @@ Timer.prototype.reset = function() {
$('#send-sms').click(function() {
var self = this;
// 数据不完整情况下不能发送验证码
if ($(this).hasClass('disabled')) {
return false;
}
if ($(this).data('running')) {
return false;
}
... ... @@ -200,8 +212,7 @@ $('#cardNo').keyup(function() {
}
});
// 输入框改变时同时更新模型
/*
$('input').on('change', function() {
var name = $(this).attr('name');
... ... @@ -213,10 +224,21 @@ $('input').on('change', function() {
validateForm();
});
*/
validateForm();
// validateForm();
// 定时更新模型,解决各种浏览器奇葩问题终极办法
setInterval(function() {
$('input').each(function() {
var name = $(this).attr('name');
if ($(this).is(':checkbox')) {
formModel[name] = $(this).is(':checked') ? $(this).val() : null;
} else {
formModel[name] = $(this).val();
}
});
validateForm();
}, 500);
... ...
... ... @@ -40,7 +40,7 @@
color: #444;
}
span {
.text-label {
margin-left: 12px;
}
... ... @@ -82,6 +82,11 @@
padding: 0;
margin-top: -8px;
margin-right: 6px;
&.disabled {
color: #e0e0e0;
border-color: #e0e0e0;
}
}
.data-encryption {
... ...