Authored by 郭成尧

Merge branch 'hotfix/coupon' into release/6.0

... ... @@ -10,11 +10,11 @@
<div class="coupon-tab">
<ul class="tab-navs" data-sticky>
<li class="tab-nav pull-left active">
<span data-target="#couponAvailable" data-trigger="tab" data-funHome>可用优惠券</span>
<span data-target="#couponAvailable" data-trigger="tab" data-funCouponAvailable>可用优惠券</span>
</li>
<em class="pull-left">|</em>
<li class="tab-nav pull-left">
<span data-target="#couponUnavailable" data-trigger="tab" data-funGetNewGoods>不可用优惠券</span>
<span data-target="#couponUnavailable" data-trigger="tab" data-funCouponUnavailable>不可用优惠券</span>
</li>
</ul>
</div>
... ...
{{#each list}}
<div class="coupon-group" data-coupon-id={{couponId}}>
<div class="coupon-group{{#is-equal-or couponType '5'}} usable-frees{{/is-equal-or}}" data-coupon-id={{couponId}}>
<div class="coupon-header">{{couponDetailInfomation}}</div>
<div class="coupon-content">
<div class="coupon-content-group1">
... ...
... ... @@ -13,8 +13,6 @@ let $ = require('yoho-jquery'),
conponNotAvaliableTmpl = require('cart/select-coupon/coupon-not-avaliable.hbs'),
orderInfo = require('cart/buynow/order-info').orderInfo;
require('plugin/tab');
let isGetData;
let $newCoupon = $('#new-coupon'),
... ...
... ... @@ -5,9 +5,20 @@
*/
const $couponCodeInput = $('input[name=couponCode]');
const $submit = $('.submit');
const $useCouponBtnGroup = $('.use-coupon-btn-group');
let Tab = require('plugin/tab');
Tab.prototype.couponavailable = () => {
$useCouponBtnGroup.removeClass('disable');
};
Tab.prototype.couponunavailable = () => {
$useCouponBtnGroup.addClass('disable');
};
$('.select-coupon-page').css('min-height', function() {
return $(window).height() - $('#yoho-header').height();
return $(window).height() - $('#yoho-header').height() + 20;
});
/**
... ...
... ... @@ -12,8 +12,6 @@ let $ = require('yoho-jquery'),
conponNotAvaliableTmpl = require('cart/select-coupon/coupon-not-avaliable.hbs'),
orderInfo = require('./order-info').orderInfo;
require('plugin/tab');
let isGetData;
let $newCoupon = $('#new-coupon'),
... ...
module.exports = function() {
let args = Array.prototype.slice.call(arguments);
let v1 = args[0];
let opt = args[args.length - 1];
let isTrue = false;
for (let i = 1; i < args.length - 1; i++) {
if (v1 === args[i]) {
isTrue = true;
break;
}
}
if (isTrue) {
return opt.fn(this); // eslint-disable-line
} else {
return opt.inverse(this); // eslint-disable-line
}
};
... ...
... ... @@ -202,6 +202,10 @@ $fontSizeSmall: 16px;
}
}
.disable {
display: none;
}
.null {
position: absolute;
left: 50%;
... ...