...
|
...
|
@@ -8,14 +8,12 @@ class ConponController extends Page { |
|
|
filterBtn: $('.filter-btn'),
|
|
|
filterItem: $('.filter-item'),
|
|
|
showFilterBtn: $('.show-filter-btn'),
|
|
|
showIntroBtn: $('.show-intro-btn'),
|
|
|
showIntroIcon: $('.show-intro-arrow'),
|
|
|
couponIntro: $('.coupon-intro')
|
|
|
couponSection: $('.coupon-section')
|
|
|
};
|
|
|
|
|
|
this.view.filterBtn.on('click', this.tapChange.bind(this));
|
|
|
this.view.showFilterBtn.on('click', this.showFilter.bind(this));
|
|
|
this.view.showIntroBtn.on('click', this.showIntro.bind(this));
|
|
|
this.view.couponSection.on('click', '.show-intro-btn', this.showIntro.bind(this));
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -48,13 +46,17 @@ class ConponController extends Page { |
|
|
/**
|
|
|
* 展示优惠券介绍
|
|
|
*/
|
|
|
showIntro() {
|
|
|
if (this.view.couponIntro.hasClass('hide')) {
|
|
|
this.view.couponIntro.removeClass('hide');
|
|
|
this.view.showIntroIcon.removeClass('icon-down').addClass('icon-up');
|
|
|
showIntro(e) {
|
|
|
let delegateTarget = $(e.delegateTarget);
|
|
|
let couponIntro = delegateTarget.find('.coupon-intro');
|
|
|
let showIntroIcon = delegateTarget.find('.show-intro-icon');
|
|
|
|
|
|
if (couponIntro.hasClass('hide')) {
|
|
|
couponIntro.removeClass('hide');
|
|
|
showIntroIcon.removeClass('icon-down').addClass('icon-up');
|
|
|
} else {
|
|
|
this.view.couponIntro.addClass('hide');
|
|
|
this.view.showIntroIcon.removeClass('icon-up').addClass('icon-down');
|
|
|
couponIntro.addClass('hide');
|
|
|
showIntroIcon.removeClass('icon-up').addClass('icon-down');
|
|
|
}
|
|
|
}
|
|
|
}
|
...
|
...
|
|