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
Email Patches
Plain Diff
Browse Files
Authored by
zhangxiaoru
9 years ago
Commit
603823483109d2d54483cc79f523da39a1f10ad1
1 parent
2719539d
favorite
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
apps/home/controllers/favorite.js
apps/home/controllers/favorite.js
View file @
6038234
...
...
@@ -10,6 +10,8 @@ const favoriteModel = require('../models/favorite');
const
headerModel
=
require
(
'../../../doraemon/models/header'
);
// 头部model
const
favorite
=
(
req
,
res
)
=>
{
let
tab
=
req
.
query
.
tab
||
''
;
console
.
log
(
tab
)
res
.
render
(
'favorite'
,
{
module
:
'home'
,
...
...
@@ -21,13 +23,14 @@ const favorite = (req, res) => {
pageFooter
:
true
,
favorite
:
{
productUrl
:
'//m.yohobuy.com/product/new'
,
brandUrl
:
'//m.yohobuy.com/product/new'
brandUrl
:
'//m.yohobuy.com/product/new'
,
brandTab
:
tab
===
'brand'
?
true
:
false
// 是否为品牌收藏页
}
});
};
let
favProduct
=
(
req
,
res
,
next
)
=>
{
let
uid
=
req
.
user
.
uid
;
let
uid
=
req
.
user
.
uid
||
12696231
;
let
page
=
req
.
query
.
page
||
1
;
let
limit
=
10
;
...
...
@@ -44,7 +47,7 @@ let favProduct = (req, res, next) => {
};
let
favfavBrand
=
(
req
,
res
,
next
)
=>
{
let
uid
=
req
.
user
.
uid
;
let
uid
=
req
.
user
.
uid
||
12696231
;
let
page
=
req
.
query
.
page
||
1
;
let
limit
=
10
;
...
...
@@ -63,7 +66,7 @@ let favfavBrand = (req, res, next) => {
};
let
favoriteDelete
=
(
req
,
res
,
next
)
=>
{
let
uid
=
req
.
user
.
uid
;
let
uid
=
req
.
user
.
uid
||
12696231
;
let
type
=
'product'
;
let
favId
=
req
.
body
.
id
;
...
...
Please
register
or
login
to post a comment