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
yyq
7 years ago
Commit
15a96110b6dfeb371006d40745e0402ccfc9cd6e
1 parent
a31a87c7
fix fav brand
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
apps/home/models/favorite-model.js
apps/home/models/favorite-model.js
View file @
15a9611
...
...
@@ -217,13 +217,25 @@ module.exports = class favorite extends global.yoho.BaseModel {
}
result
.
brands
=
_
.
get
(
brand
,
'data.brand_list'
,
[]).
map
((
item
)
=>
{
let
url
=
''
;
switch
(
item
.
brandOrShopType
)
{
case
'shop'
:
url
=
helpers
.
urlFormat
(
`
/
shop
/
$
{
item
.
brand_domain
}
-
$
{
item
.
shop_id
}.
html
`
,
null
);
break
;
case
'brand'
:
url
=
helpers
.
urlFormat
(
`
/
search
/
`
,
{
brand
:
item
.
brand_id
});
break
;
default
:
break
;
}
return
{
id
:
item
.
brand_id
,
brandOrShopType
:
item
.
brandOrShopType
||
''
,
shop_id
:
item
.
shop_id
||
''
,
img
:
helpers
.
image
(
item
.
brand_ico
,
100
,
100
),
url
:
helpers
.
urlFormat
(
`
/
shop
/
$
{
item
.
brand_domain
}
-
$
{
item
.
shop_id
}.
html
`
,
null
),
url
:
url
,
name
:
item
.
brand_name
,
naCount
:
item
.
new_product_num
,
colCount
:
item
.
brand_favorite_num
...
...
Please
register
or
login
to post a comment