Authored by 王水玲

分期3修改

... ... @@ -15,6 +15,17 @@ const _serverCrash = (res, params) => {
res.render('installment/server-crash', params);
};
const _banksInit = () => {
const banks = ['农业银行', '中国银行', '工商银行', '建设银行', '光大银行', '兴业银行', '邮储银行', '民生银行', '中信银行', '广发银行'];
if (new Date() >= new Date('2016-10-18 00:00:00')) {
// 2016年10月12日至17日 平安银行业务暂停(平安银行期间不支持服务)
banks.push('平安银行');
}
return banks;
};
// 还款列表公共处理块
const _repaymentList = (req, res, opt, params) => {
params = _.assign({
... ... @@ -285,24 +296,29 @@ const getRepayRecord = (req, res) => {
// 账号管理
const account = (req, res) => {
var url = req.yoho.isApp || req.cookies.isApp ? '/home/installment/account' : '/home/installment/bank-card';
res.render('installment/account', {
module: 'home',
page: 'account',
title: '账号管理',
isInstallmentPage: true,
posId: 7,
url: helpers.appUrlFormat('/home/installment/bank-card', 'go.instalmentMyCard')
url: helpers.appUrlFormat(url, 'go.instalmentMyCard')
});
};
// 添加新银行卡
const bindCard = (req, res) => {
const banks = _banksInit();
res.render('installment/bind-card', {
module: 'home',
page: 'bind-card',
title: req.query.title || '使用新卡还款',
bindCard: {
userName: req.query.name
userName: req.query.name,
banks: banks
},
isInstallmentPage: true
});
... ... @@ -325,12 +341,7 @@ const postAccount = (req, res) => {
};
const startingService = (req, res) => {
const banks = ['农业银行', '中国银行', '工商银行', '建设银行', '光大银行', '兴业银行', '邮储银行', '民生银行', '中信银行', '广发银行'];
if (new Date() >= new Date('2016-10-18 00:00:00')) {
// 2016年10月12日至17日 平安银行业务暂停(平安银行期间不支持服务)
banks.push('平安银行');
}
const banks = _banksInit();
res.render('installment/starting-service', {
module: 'home',
... ...
... ... @@ -8,6 +8,7 @@
<li>
<label>银行卡</label>
<input id="cardNo" name="cardNo" type="tel" placeholder="请输入本人银行卡号" size="26" maxlength="23">
<span class="iconfont notice">&#xe639;</span>
</li>
<li id="bank-desc" style="display: none;">
<div class="bank-info">
... ... @@ -22,6 +23,17 @@
</ul>
<div class="open-btn disabled">下一步</div>
<a href="" class="jumpResult">&nbsp;</a>
<div class="installment-overdue-notice">
<div class="mask-bg"></div>
<div class="notice-area">
<div class="notice-cont">
<h2>支持银行</h2>
<p>{{banks}}</p>
</div>
<div class="think-ok">我知道了</div>
</div>
</div>
{{/bindCard}}
<div class="success">
... ...
... ... @@ -23,7 +23,7 @@
</ul>
<div class="tip-cont">
{{#if isMaster}}
<p>如果您更换银行预留手机号,请先新增其他还款银行卡,并将新增银行卡切换为主卡,并解除绑定此卡,再次重新绑定即可。</p>
<p>如果您更换银行预留手机号,请先新增其他还款银行卡,并将新增银行卡切换为主卡。然后解除绑定此卡,重新绑定即可。</p>
{{else}}
<p>如果您更换银行预留手机号,请先将银行卡解除绑定,再次重新绑定即可。</p>
... ...
<div class="notice-wrap clearfix">
<div class="notice" data-time="{{time}}">
<span class="notice-icon"></span>
{{#list}}
<a class="notice-item item-{{@index}}" href="{{url}}">
{{title}}
</a>
{{/list}}
<div class="swiper-wrapper">
{{#list}}
<a class="notice-item swiper-slide item-{{@index}}" href="{{url}}">
{{title}}
</a>
{{/list}}
</div>
</div>
</div>
... ...
... ... @@ -35,6 +35,7 @@ var validateForm = function() {
};
require('../common');
require('./overdue-notice');
checkCard(formData);
... ...
... ... @@ -39,7 +39,8 @@ var cardDetail = {
url: '/home/installment/setMasterCard',
errorText: '切换失败',
successAction: function() {
window.location.href = '/home/installment/card-detail?cardIdNo=' + window.queryString.cardIdNo + '&setMaster=true';
tip.show('切换成功!');
window.location.href = '/home/installment/bank-card?openby:yohobuy={"action":"go.instalmentMyCard"}';
}
});
});
... ...
... ... @@ -7,10 +7,10 @@
var $ = require('yoho-jquery'),
ellipsis = require('yoho-mlellipsis'),
cookie = require('yoho-cookie'),
Swiper = require('yoho-swiper'),
ListData = require('./installment-goods'),
bp = require('./burying-point'),
PullRefresh = require('../plugin/pull-refresh'),
noticeScroll = require('../plugin/notice-scroll'),
uuid = require('uuid');
var installment = {
... ... @@ -20,7 +20,7 @@ var installment = {
self.paramsInit();
$(window).on('mousewheel', false);
noticeScroll('.notice', $('.notice').data('time') * 1000);
self.noticeScroll('.notice', $('.notice').data('time') * 1000);
ellipsis.init();
self.setDetailText();
... ... @@ -93,6 +93,14 @@ var installment = {
self.setCookies();
},
noticeScroll: function(selecter, time) {
new Swiper(selecter, {
autoplay: time,
direction: 'vertical',
speed: 500,
loop: true
});
},
setDetailText: function() { // 标题限制行数
var $this, $title;
... ... @@ -166,6 +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);
}
};
... ...
... ... @@ -20,5 +20,8 @@ $('.installment-starting-service-page .notice').on('click', function() {
return false;
});
$('.add-account-page .notice').on('click', function() {
$notice.show();
});
$('body').attr('ontouchstart', true);
... ...
... ... @@ -35,7 +35,18 @@
border: none;
background: transparent;
margin: 23px 0 0 60px;
width: 410px;
width: 380px;
}
.notice {
float: left;
font-size: 28px;
color: #444;
height: auto;
width: auto;
margin-top: 25px;
padding: 2px 10px 10px;
border-bottom: none;
}
.username {
... ...
... ... @@ -39,11 +39,21 @@
width: 100%;
height: 69px;
border-bottom: 1px solid #efefef;
padding-right: 0;
.swiper-wrapper {
float: left;
width: 575px;
background: #fff;
}
.notice-item {
width: 540px;
width: 575px;
line-height: 69px;
float: left;
display: block;
clear: both;
padding-right: 30px;
box-sizing: border-box;
}
.notice-icon {
... ...
... ... @@ -142,17 +142,6 @@
color: #444;
padding: 2px 10px 10px;
}
.installment-overdue-notice {
.notice-area {
width: 560px;
margin: -165px 0 0 -280px;
}
.notice-cont {
padding: 28px !important;
}
}
}
.installment-check-btn {
... ... @@ -178,3 +167,14 @@
}
}
}
.installment-overdue-notice {
.notice-area {
width: 560px;
margin: -165px 0 0 -280px;
}
.notice-cont {
padding: 28px !important;
}
}
... ...