Authored by 王水玲

分期3bug 修改

... ... @@ -20,7 +20,7 @@
<input type="number" placeholder="请输入银行预留手机号" id="mobile" name="mobile" pattern="\d*" maxlength="11">
</li>
</ul>
<a href="" class="open-btn disabled">下一步</a>
<div class="open-btn disabled">下一步</div>
<a href="" class="jumpResult">&nbsp;</a>
{{/bindCard}}
... ...
... ... @@ -7,6 +7,7 @@
var $ = require('yoho-jquery');
var tip = require('../plugin/tip');
var checkCard = require('./bind-card-check');
var loading = require('../plugin/loading');
var applyButton = $('.open-btn');
var flag = true;
var formData = {
... ... @@ -48,9 +49,6 @@ setInterval(function() {
}, 500);
applyButton.on('click', function() {
var self = this;
var ret = false;
if (!flag || $(this).hasClass('disabled') || !validateForm()) {
return false;
}
... ... @@ -60,13 +58,14 @@ applyButton.on('click', function() {
return false;
}
loading.showLoadingMask();
flag = false;
$.ajax({
type: 'GET',
url: '/home/installment/post-account',
data: formData,
async: false,
success: function(data) {
var params = {
action: 'go.bindCardResult',
... ... @@ -83,24 +82,25 @@ applyButton.on('click', function() {
if (data.code === 200) {
params.params.status = 1;
ret = true;
} else if (data.code === 500) {
tip.show('连接超时');
flag = true;
} else {
params.params.message = data.message;
ret = true;
}
url += encodeURIComponent(JSON.stringify(params));
$(self).attr('href', url);
loading.hideLoadingMask();
$('body').append('<a href=' + url + '><span class="jump">&npsb;</span></a>');
$('.jump').click();
},
error: function() {
loading.hideLoadingMask();
tip.show('网络断开连接了~');
flag = true;
}
});
return ret;
});
... ...