Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
姜枫
9 years ago
Commit
dc416ef16934dab7a119e161137902be89872d5d
1 parent
e0a44920
fix collect brand bug
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
apps/me/controllers/favorite.js
apps/product/models/helpers.js
apps/me/controllers/favorite.js
View file @
dc416ef
...
...
@@ -136,15 +136,17 @@ const favorite = {
};
retData
.
brandList
=
data
.
brandList
;
retData
.
brandList
.
forEach
(
b
=>
{
b
.
newProduct
.
forEach
(
p
=>
{
p
.
url
=
`
$
{
config
.
siteUrl
}
/product/
pro_$
{
p
.
productId
}
_$
{
p
.
goods
[
0
].
id
}
/${p.cnAlphabet}.html`
;
if
(
retData
.
brandList
)
{
retData
.
brandList
.
forEach
(
b
=>
{
b
.
newProduct
.
forEach
(
p
=>
{
p
.
url
=
`
$
{
config
.
siteUrl
}
/product/
pro_$
{
p
.
productId
}
_$
{
p
.
goods
[
0
].
id
}
/${p.cnAlphabet}.html`; // eslint-disable-lin
e
});
b
.
newProduct
.
push
({
more
:
true
});
b
.
newProduct
=
_
.
chunk
(
b
.
newProduct
,
4
);
});
b
.
newProduct
.
push
({
more
:
true
});
b
.
newProduct
=
_
.
chunk
(
b
.
newProduct
,
4
);
});
}
ret
.
content
.
favorite
.
data
=
retData
;
}
...
...
apps/product/models/helpers.js
View file @
dc416ef
...
...
@@ -242,7 +242,10 @@ const helpers = {
o
.
url
=
`
$
{
config
.
siteUrl
}
/product/
pro_$
{
g
.
productId
}
_$
{
o
.
goodsId
}
/${o.cnAlphabet}.html`
;
});
}
g
.
salesPrice
=
g
.
salesPrice
||
g
.
marketPrice
;
if
(
g
.
salesPrice
===
g
.
marketPrice
)
{
delete
g
.
marketPrice
;
}
g
.
url
=
`
$
{
config
.
siteUrl
}
/product/
pro_$
{
g
.
productId
}
_$
{
goodsId
}
/${g.cnAlphabet}.html`
;
});
}
...
...
Please
register
or
login
to post a comment