Authored by 杨延青

Merge branch 'hotfix/coupon_check_online' into 'release/6.8.4'

Hotfix/coupon check online



See merge request !1642
@@ -32,13 +32,17 @@ class CouponNew { @@ -32,13 +32,17 @@ class CouponNew {
32 req.ctx(CouponNewModel).couponGet({ uid }), 32 req.ctx(CouponNewModel).couponGet({ uid }),
33 req.ctx(CouponNewModel).getCouponNums({ uid }) 33 req.ctx(CouponNewModel).getCouponNums({ uid })
34 ]); 34 ]);
  35 +
  36 + // console.log('api:', couponNumApi);
  37 +
35 let pageData = _.get(couponsApi, 'data', {}); 38 let pageData = _.get(couponsApi, 'data', {});
36 - let couponNum = _.get(couponNumApi, 'data', null);  
37 let couponNumStr = { 39 let couponNumStr = {
38 - notuse: '0',  
39 - use: '0',  
40 - overtime: '0' 40 + notuse: 0,
  41 + use: 0,
  42 + overtime: 0
41 }; 43 };
  44 + let couponNum = Object.assign(couponNumStr, _.get(couponNumApi, 'data', null));
  45 +
42 let couponList = _.get(pageData, 'couponList', []); 46 let couponList = _.get(pageData, 'couponList', []);
43 47
44 if (couponList && couponList.length) { 48 if (couponList && couponList.length) {
@@ -29,7 +29,9 @@ @@ -29,7 +29,9 @@
29 <div class="stamp used-stamp"></div> 29 <div class="stamp used-stamp"></div>
30 {{/if}} 30 {{/if}}
31 {{^}} 31 {{^}}
32 - <a href="{{useNowLink}}" class="use-now">立即使用</a> 32 + {{#if is_online_avail}}
  33 + <a href="{{useNowLink}}" class="use-now">立即使用</a>
  34 + {{/if}}
33 {{#isEqualOr is_overdue_soon 'Y'}} 35 {{#isEqualOr is_overdue_soon 'Y'}}
34 <span class="top-tip"></span> 36 <span class="top-tip"></span>
35 {{/isEqualOr}} 37 {{/isEqualOr}}