|
|
var $ = require('yoho-jquery');
|
|
|
var tip = require('../plugin/tip');
|
|
|
var debounce = require('lodash/debounce');
|
|
|
|
|
|
var Timer = function() {
|
|
|
this.counter = 0;
|
...
|
...
|
@@ -137,19 +138,25 @@ $('#cardNo').keyup(function() { |
|
|
$(this).val(value.replace(/[^\d]/g, '').replace(/(\d{4})(?=\d)/g, '$1 ')).trigger('change');
|
|
|
|
|
|
|
|
|
// 获取银行信息
|
|
|
$.get('/home/installment/bank-info', {cardNo: cardNo}).then(function(result) {
|
|
|
if (result.code === 200) {
|
|
|
// 设置银行名称
|
|
|
$('#bank-name').text(result.data.bankName);
|
|
|
if (cardNo && cardNo.length >= 15) {
|
|
|
debounce(function() {
|
|
|
// 获取银行信息
|
|
|
$.get('/home/installment/bank-info', {cardNo: cardNo}).then(function(result) {
|
|
|
if (result.code === 200) {
|
|
|
// 设置银行名称
|
|
|
$('#bank-name').text(result.data.bankName);
|
|
|
|
|
|
// 设置银行图标
|
|
|
$('#bank-icon').attr('src', '/img/home/bank-icons/' + result.data.bankCode + '.png');
|
|
|
$('#bank-desc').show();
|
|
|
} else {
|
|
|
$('#bank-desc').hide();
|
|
|
}
|
|
|
});
|
|
|
// 设置银行图标
|
|
|
$('#bank-icon').attr('src', '/img/home/bank-icons/' + result.data.bankCode + '.png');
|
|
|
$('#bank-desc').show();
|
|
|
} else {
|
|
|
$('#bank-desc').hide();
|
|
|
}
|
|
|
});
|
|
|
}, 1000)();
|
|
|
} else {
|
|
|
$('#bank-desc').hide();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
...
|
...
|
|