Authored by 沈志敏

fix bug add auth

... ... @@ -19,7 +19,7 @@ router.get(/^\/special\/(\d+)_(.*)\.html$/, specialController.special);
// 领券中心
router.get('/coupon/index', coupon.index);
router.get('/coupon/couponstatus', coupon.getCouponStatus);
router.get('/coupon/couponstatus', auth, coupon.getCouponStatus);
router.get('/coupon/sendcoupon', auth, coupon.sendcoupon);
module.exports = router;
\ No newline at end of file
... ...
... ... @@ -187,10 +187,10 @@ function getCouponStatus() {
var cates = res.categories || [];
cates.forEach(function(obj) {
var e = document.getElementById(obj.id);
var e = document.getElementById(obj.id) || {};
var child = e.children;
if (!child.length) {
if (!child || !child.length) {
return;
}
... ...