...
|
...
|
@@ -10,7 +10,7 @@ const _ = require('lodash'); |
|
|
const helpers = global.yoho.helpers;
|
|
|
|
|
|
// 判断是否已经获取到了开通的状态值
|
|
|
const _reviewStatus = (uid, status) => {
|
|
|
const _reviewStatus = (uid, status, next) => {
|
|
|
if (status === '1') {
|
|
|
return {
|
|
|
review: {
|
...
|
...
|
@@ -28,7 +28,7 @@ const _reviewStatus = (uid, status) => { |
|
|
}
|
|
|
}
|
|
|
};
|
|
|
});
|
|
|
}).catch(next);
|
|
|
|
|
|
} else if (status === '3') {
|
|
|
return {
|
...
|
...
|
@@ -125,19 +125,26 @@ const review = (req, res, next) => { |
|
|
let data = {
|
|
|
module: 'home',
|
|
|
page: 'installment',
|
|
|
title: '有货分期',
|
|
|
isInstallmentPage: true
|
|
|
title: '有货分期'
|
|
|
};
|
|
|
|
|
|
if (openStatus) {
|
|
|
res.render('installment/open-result', _.assign(data, _reviewStatus(uid, +openStatus)));
|
|
|
if (openStatus !== '2') {
|
|
|
res.render('installment/open-result', _.assign(data, _reviewStatus(uid, openStatus)));
|
|
|
} else {
|
|
|
installmentModel.getStauts(uid).then((status) => {
|
|
|
return _reviewStatus(uid, status);
|
|
|
}).then((params) => {
|
|
|
_reviewStatus(uid, openStatus, next).then((params) => {
|
|
|
res.render('installment/open-result', _.assign(data, params));
|
|
|
}).catch(next);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// if (openStatus) {
|
|
|
// res.render('installment/open-result', _.assign(data, _reviewStatus(uid, +openStatus)));
|
|
|
// } else {
|
|
|
// installmentModel.getStauts(uid).then((status) => {
|
|
|
// return _reviewStatus(uid, status);
|
|
|
// }).then((params) => {
|
|
|
// res.render('installment/open-result', _.assign(data, params));
|
|
|
// }).catch(next);
|
|
|
// }
|
|
|
};
|
|
|
|
|
|
// 逾期未还款列表
|
...
|
...
|
|