...
|
...
|
@@ -32,6 +32,7 @@ var validateForm = function() { |
|
|
if (formModel.userName &&
|
|
|
formModel.identityCardNo &&
|
|
|
formModel.cardNo &&
|
|
|
formModel.bankCode &&
|
|
|
formModel.mobile &&
|
|
|
formModel.snsCheckCode &&
|
|
|
formModel.agreements === 'on') {
|
...
|
...
|
@@ -51,6 +52,9 @@ const clearVerifyCode = function() { |
|
|
};
|
|
|
|
|
|
var debounceFn = debounce(function(cardNo) {
|
|
|
formModel.bankCode = '';
|
|
|
formModel.bankName = '';
|
|
|
|
|
|
// 获取银行信息
|
|
|
$.get('/home/installment/bank-info', {cardNo: cardNo}).then(function(result) {
|
|
|
if (result.code === 200) {
|
...
|
...
|
@@ -62,11 +66,18 @@ var debounceFn = debounce(function(cardNo) { |
|
|
$('#bank-name').text(result.data.bankName);
|
|
|
|
|
|
// 设置银行图标
|
|
|
$('#bank-icon').attr('src',
|
|
|
$('#bank-icon').show().attr('src',
|
|
|
window.STATIC_RESOURCE_PATH +
|
|
|
'/img/home/bank-icons/' + result.data.bankCode + '.png');
|
|
|
$('#bank-desc').show();
|
|
|
}
|
|
|
|
|
|
// 返回1不支持, 孟令阶
|
|
|
if (result && result.data && result.data.businessSupport === '1') {
|
|
|
$('#bank-name').text('暂不支持此银行卡');
|
|
|
$('#bank-desc').show();
|
|
|
$('#bank-icon').hide();
|
|
|
}
|
|
|
} else {
|
|
|
$('#bank-desc').hide();
|
|
|
}
|
...
|
...
|
@@ -298,3 +309,14 @@ $('input[maxlength]').keyup(function() { |
|
|
|
|
|
$(this).val(value.slice(0, length));
|
|
|
});
|
|
|
|
|
|
$('#agreements').click(function() {
|
|
|
const params = {
|
|
|
action: 'go.instalmentProtocol',
|
|
|
params: {
|
|
|
protocolUrl: location.protocol + '//' + location.hostname + location.port + $(this).data('href')
|
|
|
}
|
|
|
};
|
|
|
|
|
|
$(this).attr('href', location.pathname + '?openby:yohobuy=' + encodeURIComponent(JSON.stringify(params)));
|
|
|
}); |
...
|
...
|
|