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
Plain Diff
Browse Files
Authored by
htoooth
9 years ago
Commit
7cfc204c49adbcd08b3aa797a92795321d23f02a
2 parents
54d47852
3dfeea42
Merge remote-tracking branch 'origin/release/1.0' into release/1.0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
18 deletions
apps/me/controllers/favorite.js
apps/me/models/menu-crumb-handler.js
apps/me/router.js
apps/product/models/helpers.js
apps/me/controllers/favorite.js
View file @
7cfc204
...
...
@@ -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/me/models/menu-crumb-handler.js
View file @
7cfc204
...
...
@@ -27,10 +27,6 @@ const navigation = [
name
:
'我的收藏'
},
{
link
:
url
(
'/me/message'
),
name
:
'我的消息'
},
{
link
:
url
(
'/me/currency'
),
name
:
'我的YOHO币'
},
...
...
apps/me/router.js
View file @
7cfc204
...
...
@@ -80,10 +80,10 @@ router.post('/account/checkVerifyMobile', auth, account.checkVerifyMobile);
// 我的收藏
router
.
get
(
'/collection'
,
favorite
.
goods
);
router
.
get
(
'/collection/brand'
,
favorite
.
brand
);
router
.
get
(
'/collection/editorial'
,
favorite
.
editorial
);
router
.
post
(
'/collection/cancel'
,
favorite
.
cancel
);
router
.
post
(
'/collection/editorial/cancel'
,
favorite
.
editorialCancel
);
router
.
get
(
'/collection'
,
auth
,
favorite
.
goods
);
router
.
get
(
'/collection/brand'
,
auth
,
favorite
.
brand
);
router
.
get
(
'/collection/editorial'
,
auth
,
favorite
.
editorial
);
router
.
post
(
'/collection/cancel'
,
auth
,
favorite
.
cancel
);
router
.
post
(
'/collection/editorial/cancel'
,
auth
,
favorite
.
editorialCancel
);
module
.
exports
=
router
;
...
...
apps/product/models/helpers.js
View file @
7cfc204
...
...
@@ -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