Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
毕凯
9 years ago
Commit
173ca5b5ce37abdde2a37c08b84182dd86a07084
1 parent
99ece4ed
新优惠券 提交按钮变色
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
static/js/shopping-cart/select-coupon.js
static/sass/shopping-cart/_select-coupon.scss
template/m.yohobuy.com/actions/index/shoppingCart/select-coupon.phtml
static/js/shopping-cart/select-coupon.js
View file @
173ca5b
...
...
@@ -16,11 +16,12 @@ var page = 1,
isGetData
;
var
conponTmpl
=
Handlebars
.
compile
(
$
(
'#tmpl-coupon'
).
html
()),
conponNotAvaliableTmpl
=
Handlebars
.
compile
(
$
(
'#tmpl-coupon-not-avaliable'
).
html
());
conponNotAvaliableTmpl
=
Handlebars
.
compile
(
$
(
'#tmpl-coupon-not-avaliable'
).
html
()),
$newCoupon
=
$
(
'#new-coupon'
);
ellipsis
.
init
();
$
(
'#search-coupon'
)
.
on
(
'submit'
,
function
()
{
$
newCoupon
.
on
(
'submit'
,
function
()
{
$
.
ajax
({
method
:
'POST'
,
url
:
'/shoppingCart/coupon'
,
...
...
@@ -43,6 +44,14 @@ $('#coupon-list').on('touchend', 'employ-main', function() {
orderInfo
(
'couponCode'
,
$
(
this
).
data
(
'coupon-code'
));
});
$newCoupon
.
find
(
'input'
).
on
(
'input'
,
function
()
{
if
(
$
(
this
).
val
()
!==
''
)
{
$newCoupon
.
find
(
'.submit'
).
css
(
'background'
,
'#444'
);
}
else
{
$newCoupon
.
find
(
'.submit'
).
css
(
'background'
,
'#b0b0b0'
);
}
});
function
getCouponHandle
(
coupons
)
{
var
notAvailableCoupons
=
[];
...
...
static/sass/shopping-cart/_select-coupon.scss
View file @
173ca5b
...
...
@@ -2,7 +2,7 @@
margin-top
:
pxToRem
(
30px
);
margin-bottom
:
pxToRem
(
30px
);
#
search
-coupon
{
#
new
-coupon
{
margin-bottom
:
pxToRem
(
30px
);
padding-left
:
pxToRem
(
30px
);
padding-right
:
pxToRem
(
30px
);
...
...
template/m.yohobuy.com/actions/index/shoppingCart/select-coupon.phtml
View file @
173ca5b
{
{>
layout/header
}
}
<div
class=
"yoho-page select-coupon-page my-coupon-page"
>
<form
id=
"
search
-coupon"
method=
"POST"
action=
""
>
<form
id=
"
new
-coupon"
method=
"POST"
action=
""
>
<input
type=
"text"
name=
"couponCode"
value=
""
placeholder=
"输入优惠券码"
>
<button
type=
"submit"
class=
"submit"
>确定</button>
</form>
...
...
Please
register
or
login
to post a comment