Authored by 王水玲

分期3

... ... @@ -296,7 +296,7 @@ const getRepayRecord = (req, res) => {
// 账号管理
const account = (req, res) => {
var url = req.yoho.isApp || req.cookies.isApp ? '/home/installment/account' : '/home/installment/bank-card';
var url = req.yoho.isApp || req.cookies.appVersion ? '/home/installment/account' : '/home/installment/bank-card';
res.render('installment/account', {
module: 'home',
... ...
... ... @@ -94,7 +94,7 @@ applyButton.on('click', function() {
loading.hideLoadingMask();
$('body').append('<a href=' + url + '><span class="jump">&npsb;</span></a>');
$('body').append('<a href=' + url + ' style="display: none;"><span class="jump">&npsb;</span></a>');
$('.jump').click();
},
... ... @@ -105,3 +105,12 @@ applyButton.on('click', function() {
}
});
});
// 使用H5标签后 maxlength 标签失效
$('input[maxlength]').keyup(function() {
var value = $(this).val(),
length = $(this).attr('maxlength') || 20;
$(this).val(value.slice(0, length));
});
... ...
... ... @@ -7,20 +7,19 @@
var $ = require('yoho-jquery');
var tip = require('../plugin/tip');
var dialog = require('../plugin/dialog');
var yohoApp = require('../yoho-app');
var cardDetail = {
init: function() {
var self = this,
$relieveBtn = $('.relieve-btn'),
$changeBtn = $('.change-btn');
$changeBtn = $('.change-btn'),
asyncMode = yohoApp.isiOS;
self.asyncMode = asyncMode;
self.cardIdNo = $('.card-detail').data('cardId');
$('body').attr('ontouchstart', true);
if (window.queryString.setMaster) {
tip.show('切换成功!');
}
$relieveBtn.on('click', function() {
self.dialogAction({
text: '你确定要解除绑定此卡吗?解除绑定后该银行卡将不出现在还款银行卡列表中。',
... ... @@ -28,7 +27,12 @@ var cardDetail = {
errorText: '解除失败',
successAction: function() {
tip.show('解除成功!');
window.location.href = '/home/installment/bank-card?openby:yohobuy={"action":"go.relieveCardSuccess"}';
if (asyncMode) {
yohoApp.invokeMethod('go.relieveCardSuccess');
} else {
window.location.href = location.href + '&openby:yohobuy={"action":"go.relieveCardSuccess"}';
}
}
});
});
... ... @@ -40,7 +44,11 @@ var cardDetail = {
errorText: '切换失败',
successAction: function() {
tip.show('切换成功!');
window.location.href = '/home/installment/bank-card?openby:yohobuy={"action":"go.instalmentMyCard"}';
if (asyncMode) {
yohoApp.invokeMethod('go.instalmentMyCardList');
} else {
window.location.href = location.href + '&openby:yohobuy={"action":"go.instalmentMyCardList"}';
}
}
});
});
... ...
... ... @@ -174,7 +174,7 @@ var installment = {
window.setCookie('yhChannel', window.queryString.yh_channel);
window.setCookie('udid', window.queryString.udid);
window.setCookie('clientType', window.queryString.client_type);
window.setCookie('isApp', window.queryString.app_version ? true : false);
window.setCookie('appVersion', window.queryString.app_version);
}
};
... ...