Authored by 王水玲

有货分期

... ... @@ -221,14 +221,11 @@ const startingService = (req, res) => {
};
const activateService = (req, res, next) => {
installmentModel.activateService({
uid: req.cookies.installmentUid || 532892,
userName: req.body.userName,
identityCardNo: req.body.identityCardNo,
cardNo: ((function() {
return req.body.cardNo ? req.body.cardNo.replace(/\s/g, '') : '';
})()),
cardNo: req.body.cardNo,
mobile: req.body.mobile,
snsCheckCode: req.body.snsCheckCode,
verifyId: req.body.verifyId
... ...
... ... @@ -21,10 +21,10 @@ const _processAmtList = (list, queryDays) => {
currFeeCount: 0
};
list = list || [];
list = list || {};
if (list.length > 0) {
_.forEach(list, (data, key) => {
_.forEach(list.amtList, (data, key) => {
// 第一条选中
if (key === 0) {
data.isChecked = true;
... ... @@ -103,10 +103,10 @@ const _processAmtList = (list, queryDays) => {
// 处理还款记录数据
const _processRepayList = (list) => {
list = list || [];
list = list || {};
if (list.length > 0) {
_.forEach(list, (data) => {
_.forEach(list.rePayList, (data) => {
// 组装分期的显示格式
if (data.terms === 1) {
data.stage = data.terms;
... ... @@ -246,7 +246,7 @@ const getQueryAmtList = (params) => {
cache: true
}).then((result) => {
if (result && result.code === 200) {
return _processAmtList(result.data.amtList, params.queryDays);
return _processAmtList(result.data, params.queryDays);
} else {
logger.error('get queryAmtList data return code is not 200');
return Promise.reject(result);
... ... @@ -359,7 +359,7 @@ const getQueryRePayList = (params) => {
cache: true
}).then((result) => {
if (result && result.code === 200) {
return _processRepayList(result.data.rePayList);
return _processRepayList(result.data);
} else {
logger.error('get queryRePayList data return code is not 200');
return '';
... ...
<div class="repayment-list-page yoho-page">
{{#if isNoResult}}
<div class="no-result">
<i class="result-icon"></i>
<p class="txt">暂无待还款订单</p>
<a href="/product/new" class="guang-btn">去逛逛</a>
</div>
{{else}}
{{#data}}
{{#data}}
{{#if isNoResult}}
<div class="no-result">
<i class="result-icon"></i>
<p class="txt">暂无待还款订单</p>
<a href="/product/new" class="guang-btn">去逛逛</a>
</div>
{{else}}
<ul class="repay-list">
{{#each repaymentList}}
<li data-currfee="{{currFee}}" data-currnofeeamt="{{currNoFeeAmt}}" data-curramt="{{currAmt}}" data-bill="{{billNo}}" data-termno={{currTerm}}>
... ... @@ -31,6 +31,6 @@
{{/each}}
</ul>
{{> installment/repayment-bottom}}
{{/if}}
{{/data}}
{{/if}}
</div>
... ...