Authored by 李奇

活动结束标志返回

... ... @@ -33,7 +33,7 @@ const couponExp = {
* @param req
* @param res
*/
progress(req, res) {
progress(req, res, next) {
const shareId = req.body.shareId;
let uid = req.body.uid || +req.session.yh_auth_uid;
... ... @@ -52,8 +52,14 @@ const couponExp = {
if (!shareId) {
result.data.shareId = aes.encryptUid(uid); // 分享标识;
}
// 活动结束标志
let endTime = result.data.end_time;
let timestamp = Date.parse(new Date()) / 1000;
result.data.isExpired = timestamp > endTime;
res.json(result);
});
}).catch(next);
},
/**
... ...