Authored by 周少峰

coupon status

@@ -33,7 +33,7 @@ exports.index = (req, res, next) => { @@ -33,7 +33,7 @@ exports.index = (req, res, next) => {
33 exports.getCouponStatus = (req, res, next) => { 33 exports.getCouponStatus = (req, res, next) => {
34 couponModel.getCouponStatus({ 34 couponModel.getCouponStatus({
35 uid: req.user.uid, 35 uid: req.user.uid,
36 - contentCode: req.query.contentCode 36 + contentCode: req.query.contentCode || contentCode
37 }).then(result => { 37 }).then(result => {
38 res.json(result); 38 res.json(result);
39 }).catch(next); 39 }).catch(next);
@@ -173,10 +173,6 @@ function getCouponStatus() { @@ -173,10 +173,6 @@ function getCouponStatus() {
173 data[hash[0]] = hash[1]; 173 data[hash[0]] = hash[1];
174 } 174 }
175 175
176 - if (!data.contentCode) {  
177 - return;  
178 - }  
179 -  
180 $.ajax({ 176 $.ajax({
181 type: 'GET', 177 type: 'GET',
182 url: '/coupon/couponstatus', 178 url: '/coupon/couponstatus',