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
Plain Diff
Browse Files
Authored by
biao
9 years ago
Commit
82e6a3ff7418ab691580ae570844971c49d21a49
2 parents
572ab8fb
c45ff1fe
Merge branch 'hotfix/outlet'
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
20 deletions
apps/product/models/outlet.js
apps/product/models/outlet.js
View file @
82e6a3f
...
...
@@ -124,27 +124,29 @@ const _convertActicityData = (data) => {
data
=
data
||
[];
_
.
forEach
(
data
,
(
item
)
=>
{
discountArr
=
item
.
promotionName
.
split
(
'~'
);
if
(
discountArr
.
length
===
1
)
{
discountNum
=
_transDiscountToArr
(
discountArr
[
0
])[
0
];
discountText
=
_transDiscountToArr
(
discountArr
[
0
])[
1
];
}
else
{
discountNum
=
discountArr
[
0
]
+
'~'
+
_transDiscountToArr
(
discountArr
[
1
])[
0
];
discountText
=
_transDiscountToArr
(
discountArr
[
1
])[
1
];
if
(
item
.
promotionName
)
{
discountArr
=
item
.
promotionName
.
split
(
'~'
);
if
(
discountArr
.
length
===
1
)
{
discountNum
=
_transDiscountToArr
(
discountArr
[
0
])[
0
];
discountText
=
_transDiscountToArr
(
discountArr
[
0
])[
1
];
}
else
{
discountNum
=
discountArr
[
0
]
+
'~'
+
_transDiscountToArr
(
discountArr
[
1
])[
0
];
discountText
=
_transDiscountToArr
(
discountArr
[
1
])[
1
];
}
formatData
.
push
({
activityUrl
:
'/product/outlet/activity?id='
+
item
.
id
,
coverUrl
:
item
.
coverUrl
,
logoUrl
:
item
.
logoUrl
,
title
:
item
.
title
,
discountNum
:
discountNum
,
discountText
:
discountText
,
productPoolId
:
item
.
productPoolId
||
''
,
leftTime
:
item
.
startLeftTime
>
0
?
dateFormate
(
item
.
startTime
)
:
item
.
endLeftTime
,
hide
:
false
});
}
formatData
.
push
({
activityUrl
:
'/product/outlet/activity?id='
+
item
.
id
,
coverUrl
:
item
.
coverUrl
,
logoUrl
:
item
.
logoUrl
,
title
:
item
.
title
,
discountNum
:
discountNum
,
discountText
:
discountText
,
productPoolId
:
item
.
productPoolId
||
''
,
leftTime
:
item
.
startLeftTime
>
0
?
dateFormate
(
item
.
startTime
)
:
item
.
endLeftTime
,
hide
:
false
});
});
return
formatData
;
...
...
Please
register
or
login
to post a comment