Authored by 郭成尧

Merge branch 'master' into hotfix/shopPd

... ... @@ -50,7 +50,6 @@ const _repaymentList = (req, res, opt, params) => {
// 开通分期首页
const index = (req, res) => {
let uid = req.query.uid;
Promise.all([
installmentModel.getStauts(uid),
installmentModel.getSearchIntallment({
... ... @@ -309,14 +308,23 @@ const getRepayRecord = (req, res) => {
// 账号管理
const account = (req, res) => {
var url = req.yoho.isApp || req.cookies.appVersion ? '/home/installment/account' : '/home/installment/bank-card';
if (req.cookies.appVersion) {
var versions = req.cookies.appVersion.split('.');
if (versions.length >= 2) {
if (versions[0] < 5 || (parseInt(versions[0], 10)===5 && versions[1] <= 1)) {
} else {
url = helpers.appUrlFormat(url, 'go.instalmentMyCard')
}
}
}
res.render('installment/account', {
module: 'home',
page: 'account',
title: '账号管理',
isInstallmentPage: true,
posId: 7,
url: helpers.appUrlFormat(url, 'go.instalmentMyCard')
url: url
});
};
... ...
... ... @@ -9,8 +9,8 @@ exports.getQr = (params) => {
try {
uid = crypto.decrypt(PASSWORD, decodeURIComponent(params.token));
uid = parseInt(uid, 10)
} catch (e) {
console.error(e);
uid = params.token;
}
... ...
... ... @@ -109,6 +109,10 @@ const _searchGoods = (params) => {
delete params.channel;
}
if (params.query) {
params.query = params.query.replace(/\+/g, ',');
}
params = _.assign({
limit: '60',
status: 1,
... ...