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
Email Patches
Plain Diff
Browse Files
Authored by
周少峰
8 years ago
Commit
5bce73eecac6eca9fc1d53d7b812f540d129c0c2
1 parent
19f8f227
format chagne
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
17 deletions
apps/activity/models/coupon.js
apps/activity/models/coupon.js
View file @
5bce73e
...
...
@@ -95,26 +95,21 @@ exports.getCouponStatus = (params) => {
break
;
}
coupon
.
data
.
forEach
(
function
(
val
)
{
if
(
val
.
template_name
===
'getCoupon'
&&
val
.
data
.
length
)
{
// 优惠券楼层
val
.
data
.
forEach
(
function
(
item
)
{
const
status
=
Number
(
item
.
status
);
coupon
.
data
.
forEach
(
function
(
item
)
{
const
status
=
Number
(
item
.
status
);
if
([
2
,
3
].
indexOf
(
status
)
>
-
1
)
{
const
cou
=
{
id
:
crypto
.
encryption
(
'yoho9646abcdefgh'
,
item
.
couponID
)
// 加密优惠券号
};
if
([
2
,
3
].
indexOf
(
status
)
>
-
1
)
{
const
cou
=
{
id
:
crypto
.
encryption
(
'yoho9646abcdefgh'
,
item
.
couponId
)
// 加密优惠券号
};
if
(
status
===
2
)
{
cou
.
empty
=
true
;
// 优惠券已抢光
}
else
if
(
status
===
3
)
{
cou
.
got
=
true
;
// 优惠券已领取
}
if
(
status
===
2
)
{
cou
.
empty
=
true
;
// 优惠券已抢光
}
else
if
(
status
===
3
)
{
cou
.
got
=
true
;
// 优惠券已领取
}
result
.
categories
.
push
(
cou
);
}
});
result
.
categories
.
push
(
cou
);
}
});
}
...
...
Please
register
or
login
to post a comment