Authored by 周少峰

format chagne

@@ -95,15 +95,12 @@ exports.getCouponStatus = (params) => { @@ -95,15 +95,12 @@ exports.getCouponStatus = (params) => {
95 break; 95 break;
96 } 96 }
97 97
98 - coupon.data.forEach(function(val) {  
99 - if (val.template_name === 'getCoupon' && val.data.length) {  
100 - // 优惠券楼层  
101 - val.data.forEach(function(item) { 98 + coupon.data.forEach(function(item) {
102 const status = Number(item.status); 99 const status = Number(item.status);
103 100
104 if ([2, 3].indexOf(status) > -1) { 101 if ([2, 3].indexOf(status) > -1) {
105 const cou = { 102 const cou = {
106 - id: crypto.encryption('yoho9646abcdefgh', item.couponID) // 加密优惠券号 103 + id: crypto.encryption('yoho9646abcdefgh', item.couponId) // 加密优惠券号
107 }; 104 };
108 105
109 if (status === 2) { 106 if (status === 2) {
@@ -116,8 +113,6 @@ exports.getCouponStatus = (params) => { @@ -116,8 +113,6 @@ exports.getCouponStatus = (params) => {
116 } 113 }
117 }); 114 });
118 } 115 }
119 - });  
120 - }  
121 while (false); 116 while (false);
122 return result; 117 return result;
123 })(); 118 })();