...
|
...
|
@@ -6,10 +6,10 @@ const library = '../../../library'; |
|
|
const couponModel = require(`${mRoot}/coupon`); // 领取优惠券 model
|
|
|
const log = require(`${library}/logger`);
|
|
|
|
|
|
exports.index = (req, res) => {
|
|
|
exports.index = (req, res, next) => {
|
|
|
var renderData = {
|
|
|
module: 'coupon',
|
|
|
page: 'index',
|
|
|
module: 'activity',
|
|
|
page: 'coupon',
|
|
|
appDownLoadLink: 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho'
|
|
|
},
|
|
|
ordercode = req.query.ordercode,
|
...
|
...
|
@@ -33,19 +33,17 @@ exports.index = (req, res) => { |
|
|
couponData.appDownLoadLink = renderData.appDownLoadLink;
|
|
|
res.render('coupon', {
|
|
|
result: couponData,
|
|
|
module: 'coupon',
|
|
|
page: 'index',
|
|
|
module: 'activity',
|
|
|
page: 'coupon',
|
|
|
title: couponData.title
|
|
|
});
|
|
|
}).catch((err) => {
|
|
|
log.error('频道页面渲染错误:' + JSON.stringify(err));
|
|
|
});
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
|
|
exports.getCoupon = (req, res) => {
|
|
|
exports.getCoupon = (req, res, next) => {
|
|
|
var renderData = {
|
|
|
module: 'coupon',
|
|
|
page: 'index'
|
|
|
module: 'activity',
|
|
|
page: 'coupon'
|
|
|
};
|
|
|
|
|
|
var ordercode = req.query.ordercode,
|
...
|
...
|
@@ -68,15 +66,13 @@ exports.getCoupon = (req, res) => { |
|
|
res.json({
|
|
|
result: couponData
|
|
|
});
|
|
|
}).catch((err) => {
|
|
|
log.error('频道页面渲染错误:' + JSON.stringify(err));
|
|
|
});
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
|
|
exports.verify = (req, res) => {
|
|
|
exports.verify = (req, res, next) => {
|
|
|
var renderData = {
|
|
|
module: 'coupon',
|
|
|
page: 'index'
|
|
|
module: 'activity',
|
|
|
page: 'coupon'
|
|
|
};
|
|
|
|
|
|
|
...
|
...
|
@@ -103,7 +99,5 @@ exports.verify = (req, res) => { |
|
|
res.json({
|
|
|
result: couponData
|
|
|
});
|
|
|
}).catch((err) => {
|
|
|
log.error('频道页面渲染错误:' + JSON.stringify(err));
|
|
|
});
|
|
|
}).catch(next);
|
|
|
}; |
...
|
...
|
|