returns.js
696 Bytes
/**
* 个人中心 退换货
* @author 陈轩 <xuan.chen@yoho.cn>
*/
'use strict';
const cookie = global.yoho.cookie;
const logger = global.yoho.logger;
const returnsModel = require('../models/returns');
/*
我的退换货-列表页
*/
exports.index = (req, res, next) => {
const uid = cookie.getUid(req);
const page = req.query.page;
returnsModel.getReturnsList(uid, page /* ,limit=10*/)
.then(data => {
const viewData = Object.assign({
module: 'home',
page: 'returns',
meReturnsPage: true
}, data);
res.render('returns/returns', viewData);
})
.catch(next);
};