Authored by 郭成尧

Merge branch 'feature/giftcard' into release/6.1

... ... @@ -34,5 +34,9 @@
</div>
{{/usable_giftCards}}
<button id="useGiftCardBtn" class="use-giftcard-btn{{#if sureActice}} active{{/if}}">使用</button>
<div class="use-giftcard-btn-group">
<button id="useGiftCardBtn" class="pull-left use-giftcard-btn
{{#if sureActice}} active{{/if}}">使用</button>
<button id="noGiftCardBtn" class="pull-right not-use">不使用</button>
</div>
</div>
\ No newline at end of file
... ...
... ... @@ -11,7 +11,8 @@ class SelectGiftCard extends Page {
rule: $('#rule'),
page: $('.select-giftcard-page'),
giftcard: $('.giftcard'),
useGiftCardBtn: $('#useGiftCardBtn')
useGiftCardBtn: $('#useGiftCardBtn'),
noGiftCardBtn: $('#noGiftCardBtn')
};
this.init();
this.bindEvents();
... ... @@ -27,6 +28,7 @@ class SelectGiftCard extends Page {
bindEvents() {
this.selector.giftcard.on('click', '.checkbox', this.checkboxClickHandle.bind(this));
this.selector.useGiftCardBtn.on('click', this.useGiftCard.bind(this));
this.selector.noGiftCardBtn.on('click', this.noGiftCard.bind(this));
}
goToBack() {
... ... @@ -56,6 +58,14 @@ class SelectGiftCard extends Page {
}
/**
* 不使用礼品卡
*/
noGiftCard() {
this.orderInfo('gift_card_code', null);
this.goToBack();
}
/**
* 改变 使用 按钮状态
*/
changeUseBtnStatus() {
... ...
... ... @@ -119,16 +119,31 @@ $title-font-color: #fff;
display: none;
}
.use-giftcard-btn {
.use-giftcard-btn-group {
@extend padding-30;
width: 100%;
position: fixed;
bottom: 0;
left: 0;
width: 750px;
height: 88px;
border-radius: 2px;
background-color: #bdbdbd;
color: #fff;
font-size: 32px;
text-align: center;
bottom: 0;
z-index: 2;
background-color: #fff;
padding-top: 20px;
padding-bottom: 20px;
button {
color: #fff;
width: 330px;
height: 70px;
border-radius: $couponRadius;
&.use {
background-color: $fontColor;
}
&.not-use {
background-color: $fontGrayLight;
}
}
}
}
... ...