Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
郭成尧
7 years ago
Commit
5f9f13e7ea1cba5f534f7ab3b891b72194416de7
1 parent
bd11e8df
show-filter
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
10 deletions
apps/cart/views/action/select-coupons.hbs
apps/home/views/action/coupons/page.hbs
public/js/cart/select-coupons/controller.js
public/js/home/coupon-new/controller.js
public/scss/cart/select-coupons.page.css
apps/cart/views/action/select-coupons.hbs
View file @
5f9f13e
<div
class=
"select-coupons-page"
>
<div
class=
"filter-box"
>
<span
class=
"valid"
>
可用(99+)
<span
class=
"iconfont"
>

</span></span>
<span
class=
"invalid"
>
不可用(99+)
</span>
<span
class=
"valid"
>
<span
class=
"filter-btn active"
>
可用(99+)
</span>
<span
class=
"show-filter-btn iconfont"
>

</span>
</span>
<span
class=
"invalid"
>
<span
class=
"filter-btn"
>
不可用(99+)
</span>
</span>
</div>
<div
class=
"filter-item hide"
>
<button>
全部
</button>
<button>
店铺券
</button>
<button>
活动券
</button>
<button>
运费券
</button>
</div>
<div
class=
"exchange-box"
>
<input
type=
"text"
placeholder=
"请输入优惠券码"
>
...
...
apps/home/views/action/coupons/page.hbs
View file @
5f9f13e
...
...
@@ -2,7 +2,7 @@
<div
class=
"filter-box"
>
<span
class=
"no-used"
>
<span
class=
"filter-btn active"
>
未使用(99+)
</span>
<span
class=
"show-filter iconfont"
>

</span>
<span
class=
"show-filter
-btn
iconfont"
>

</span>
</span>
<span
class=
"used"
>
<span
class=
"filter-btn"
>
已使用(8)
</span>
...
...
public/js/cart/select-coupons/controller.js
View file @
5f9f13e
...
...
@@ -9,11 +9,14 @@ class SelectCouponController extends Page {
coupon
:
$
(
'.coupon'
),
checkbox
:
$
(
'.checkbox'
),
tipBox
:
$
(
'.tip-box'
),
tipClose
:
$
(
'.tip-close'
)
tipClose
:
$
(
'.tip-close'
),
showFilterBtn
:
$
(
'.show-filter-btn'
),
filterItem
:
$
(
'.filter-item'
),
};
this
.
view
.
coupon
.
on
(
'click'
,
'.checkbox'
,
this
.
check
.
bind
(
this
));
this
.
view
.
tipClose
.
on
(
'click'
,
this
.
closeTip
.
bind
(
this
));
this
.
view
.
showFilterBtn
.
on
(
'click'
,
this
.
showFilter
.
bind
(
this
));
}
/**
...
...
@@ -35,6 +38,17 @@ class SelectCouponController extends Page {
closeTip
()
{
this
.
view
.
tipBox
.
hide
();
}
/**
* 展示筛选器
*/
showFilter
()
{
if
(
this
.
view
.
filterItem
.
hasClass
(
'hide'
))
{
this
.
view
.
filterItem
.
removeClass
(
'hide'
);
}
else
{
this
.
view
.
filterItem
.
addClass
(
'hide'
);
}
}
}
export
default
SelectCouponController
;
...
...
public/js/home/coupon-new/controller.js
View file @
5f9f13e
...
...
@@ -7,13 +7,13 @@ class ConponController extends Page {
this
.
view
=
{
filterBtn
:
$
(
'.filter-btn'
),
filterItem
:
$
(
'.filter-item'
),
showFilter
:
$
(
'.show-filter
'
),
showFilter
Btn
:
$
(
'.show-filter-btn
'
),
showIntroBtn
:
$
(
'.show-intro-btn'
),
couponIntro
:
$
(
'.coupon-intro'
)
};
this
.
view
.
filterBtn
.
on
(
'click'
,
this
.
tapChange
.
bind
(
this
));
this
.
view
.
showFilter
.
on
(
'click'
,
this
.
showFilter
.
bind
(
this
));
this
.
view
.
showFilter
Btn
.
on
(
'click'
,
this
.
showFilter
.
bind
(
this
));
this
.
view
.
showIntroBtn
.
on
(
'click'
,
this
.
showIntro
.
bind
(
this
));
}
...
...
public/scss/cart/select-coupons.page.css
View file @
5f9f13e
...
...
@@ -11,16 +11,40 @@ body {
background-color
:
#fff
;
position
:
relative
;
span
{
.valid,
.invalid
{
flex
:
1
;
line-height
:
60px
;
text-align
:
center
;
border-right
:
1px
solid
#e0e0e0
;
color
:
#b0b0b0
;
}
span
:last-child
{
border
:
none
;
.valid
{
border-right
:
1px
solid
#e0e0e0
;
}
.show-filter-btn
,
.active
{
color
:
#444
;
}
}
.filter-item
{
display
:
flex
;
width
:
100%
;
height
:
130px
;
justify-content
:
space-around
;
align-items
:
center
;
background-color
:
#fff
;
button
{
width
:
150px
;
height
:
70px
;
background-color
:
#fff
;
color
:
#444
;
font-size
:
28px
;
border
:
1px
solid
#e0e0e0
;
border-radius
:
4px
;
}
}
...
...
@@ -129,4 +153,8 @@ body {
}
}
}
.hide
{
display
:
none
;
}
}
...
...
Please
register
or
login
to post a comment