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
Plain Diff
Browse Files
Authored by
OF1706
8 years ago
Commit
bfef8b04021230183ce6cba207e1082e4329003d
2 parents
f38e7d6f
0394390e
Merge branch 'feature/shoppingCart' of
http://git.yoho.cn/fe/yohobuy-node
into feature/shoppingCart
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
apps/cart/controllers/cart.js
apps/cart/controllers/cart.js
View file @
bfef8b0
...
...
@@ -60,11 +60,14 @@ const setShoppingCookie = (req, res) => {
return
service
.
getCartCount
(
uid
,
shoppingKey
).
then
(
ret
=>
{
if
(
ret
&&
ret
.
data
&&
ret
.
data
.
cart_goods_count
)
{
res
.
cookie
(
'_g'
,
{
res
.
cookie
(
'_g'
,
JSON
.
stringify
(
{
_k
:
shoppingKey
,
_nac
:
ret
.
data
.
cart_goods_count
,
_ac
:
0
,
_r
:
1
}),
{
domain
:
'.yohobuy.com'
,
path
:
'/'
});
}
});
...
...
@@ -368,10 +371,10 @@ const getRecommendProductAction = (req, res) => {
let
channel
=
req
.
yoho
.
channel
;
let
uid
=
req
.
user
.
uid
;
let
udid
=
ghelper
.
getUdid
(
req
,
res
);
let
page
=
req
.
query
.
page
||
1
;
let
page
=
Number
(
req
.
query
.
page
||
1
)
;
let
ret
;
if
(
page
===
'6'
)
{
if
(
page
<=
0
||
page
>=
6
)
{
page
=
1
;
}
...
...
Please
register
or
login
to post a comment