...
|
...
|
@@ -58,3 +58,21 @@ exports.productLst = function(req, res, next) { |
|
|
res.jsonp(result);
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
|
|
exports.coupon = function(req, res, next) {
|
|
|
let activity_template_id = req.query.activity_id;
|
|
|
let uid = req.user.uid || req.query.uid;
|
|
|
|
|
|
if (!uid || !activity_template_id) {
|
|
|
return res.jsonp({
|
|
|
code: 400
|
|
|
});
|
|
|
}
|
|
|
|
|
|
model.getCoupon({
|
|
|
activity_template_id,
|
|
|
uid
|
|
|
}).then((result) => {
|
|
|
res.jsonp(result);
|
|
|
}).catch(next);
|
|
|
}; |
...
|
...
|
|