Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
htoooth
8 years ago
Commit
56c048570a01cb1bb4c0ebee89b4e4711a3e3acd
2 parents
c0250db8
8be596aa
Merge branch 'release/6.0.2' of
http://git.yoho.cn/fe/yohobuy-node
into release/6.0.2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
public/js/product/index/top-coupon.js
public/js/product/index/top-coupon.js
View file @
56c0485
...
...
@@ -70,7 +70,7 @@ var couponPickConfig = {
}]
},
over
:
{
content
:
'<i class="iconfont"></i>优惠券已
领
光'
,
content
:
'<i class="iconfont"></i>优惠券已
抢
光'
,
subContents
:
[
'尝试领取其它优惠券吧'
],
className
:
'top-coupon-dialog'
,
btns
:
[{
...
...
@@ -103,7 +103,7 @@ function getCouponInfo() {
money
:
data
.
money
||
0
,
name
:
data
.
name
||
''
,
time
:
data
.
time
||
''
,
status
:
1
// 1:可领取,2:已
领
光,3:已领取
status
:
1
// 1:可领取,2:已
抢
光,3:已领取
};
});
}
...
...
@@ -137,18 +137,18 @@ function syncCouponStatus() {
for
(
i
=
0
;
i
<
info
.
length
;
i
++
)
{
asyncObj
[
info
[
i
].
coupon_id
]
=
info
[
i
];
}
}
for
(
i
in
couponObj
)
{
if
(
couponObj
.
hasOwnProperty
(
i
))
{
coup
=
asyncObj
[
i
];
for
(
i
in
couponObj
)
{
if
(
couponObj
.
hasOwnProperty
(
i
))
{
coup
=
asyncObj
[
i
];
if
(
coup
&&
(
coup
.
status
===
1
||
coup
.
status
===
3
))
{
couponObj
[
i
].
status
=
coup
.
status
;
coup
.
status
===
3
?
setPicked
(
couponObj
[
i
])
:
false
;
}
else
{
couponObj
[
i
].
status
=
2
;
// 券不存在设置领取状态为已领光
couponObj
[
i
].
dom
.
text
(
'已领光'
);
}
if
(
coup
&&
(
coup
.
status
===
1
||
coup
.
status
===
3
))
{
couponObj
[
i
].
status
=
coup
.
status
;
coup
.
status
===
3
?
setPicked
(
couponObj
[
i
])
:
false
;
}
else
{
couponObj
[
i
].
status
=
2
;
// 券不存在设置领取状态为已抢光
couponObj
[
i
].
dom
.
text
(
'已抢光'
);
}
}
}
...
...
@@ -245,7 +245,7 @@ if ($couponWrap && $couponWrap.length) {
if
(
!
couponInfo
)
{
// 优惠券号异常错误提示
return
couponAlert
(
couponPickConfig
.
failed
);
}
else
if
(
couponInfo
.
status
===
2
)
{
// 优惠券已
领
光提示
}
else
if
(
couponInfo
.
status
===
2
)
{
// 优惠券已
抢
光提示
return
couponAlert
(
couponPickConfig
.
over
);
}
else
if
(
couponInfo
.
status
===
3
)
{
// 优惠券已领取提示
return
couponAlert
(
couponPickConfig
.
got
);
...
...
Please
register
or
login
to post a comment