...
|
...
|
@@ -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 {
|
...
|
...
|
|