Authored by 王水玲

Merge branch 'feature/installment2a' into release/4.9.2

... ... @@ -463,6 +463,7 @@ const checkVerifyCode = (uid, mobile, code) => {
method: method,
mobile: mobile,
snsCheckCode: code,
codeType: 1, // 授信
debug: 'XYZ'
}, {
timeout: API_TIMEOUT
... ...
... ... @@ -43,18 +43,12 @@ var debounceFn = debounce(function(cardNo, formModel) {
var checkCard = function(formModel) {
// 银行卡格式化
$('#cardNo').keyup(function() {
$('#cardNo').on('input', function() {
var value = $(this).val();
var cardNo = $(this).val().replace(/\s/g, '');
$(this).val(value.replace(/[^\d]/g, '').replace(/(\d{4})(?=\d)/g, '$1 ')).trigger('change');
if (cardNo && cardNo.length < 16) {
$('#bank-desc').hide();
}
}).blur(function() {
var cardNo = $(this).val().replace(/\s/g, '');
if (cardNo && cardNo.length >= 16) {
debounceFn(cardNo, formModel);
} else {
... ...
... ... @@ -35,14 +35,15 @@ var validateForm = function() {
checkCard(formData);
// 输入框改变时同时更新模型
$('input').on('input', function() {
// 定时更新模型,解决各种浏览器奇葩问题终极办法
setInterval(function() {
$('input').each(function() {
var name = $(this).attr('name');
formData[name] = $(this).val();
});
validateForm();
});
}, 500);
applyButton.on('click', function() {
var self = this;
... ...
... ... @@ -139,6 +139,8 @@ $('#send-sms').click(function() {
return false;
}
$(self).data('running', true);
$.get('/home/installment/starting-service/verify-code', {
mobile: formModel.mobile
}).then(function(result) {
... ... @@ -158,6 +160,8 @@ $('#send-sms').click(function() {
tip.show(result.message);
$(self).data('running', false);
}
}).done(function() {
$(self).data('running', false);
});
return false;
... ...
... ... @@ -73,7 +73,7 @@ a {
display: none;
text-align: center;
width: 70%;
padding: 34PX 0;
padding: 18PX 55PX;
top: 50%;
left: 50%;
margin-left: -35%;
... ...