coupons.js
728 Bytes
'use strict';
const headerModel = require('../../../doraemon/models/header'), // 头部model
model = require('../models/coupons');
const index = (req, res) => {
res.render('coupons', {
module: 'home',
page: 'coupons',
pageHeader: headerModel.setNav({
navTitle: '优惠券'
}),
title: '优惠券',
pageFooter: true,
});
};
const couponData = (req, res, next) => {
model.couponData({
method: 'app.coupons.li',
uid: 20000382,
status: req.body.status,
page: req.body.page || 1,
limit: 10,
}).then(result => {
res.send(result);
}).catch(next);
};
module.exports = {
index,
couponData
};