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
8 years ago
Commit
fc235d531d05c2c45e152306cbdade668e95fb46
1 parent
b1da946f
channel
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
apps/product/controllers/newsale.js
apps/product/controllers/newsale.js
View file @
fc235d5
...
...
@@ -7,11 +7,19 @@
const
newsaleModel
=
require
(
'../models/newsale'
);
const
headerModel
=
require
(
'../../../doraemon/models/header'
);
let
channels
=
{
let
yhchannels
=
{
'1,3'
:
1
,
'2,3'
:
2
};
let
channels
=
{
boys
:
1
,
girls
:
2
,
kids
:
3
,
lifestyle
:
4
};
const
index
=
(
req
,
res
,
next
)
=>
{
let
channel
=
req
.
yoho
.
channel
||
'boys'
;
let
codeKey
=
''
;
...
...
@@ -54,7 +62,8 @@ const selectHotrank = (req, res, next) => {
let
limit
=
50
;
let
page
=
req
.
query
.
page
||
1
;
let
notab
=
req
.
query
.
notab
||
0
;
let
yhChannel
=
req
.
query
.
gender
&&
channels
[
req
.
query
.
gender
]
||
1
;
let
yhChannel
=
req
.
query
.
gender
&&
yhchannels
[
req
.
query
.
gender
]
||
req
.
cookies
.
_Channel
&&
channels
[
req
.
cookies
.
_Channel
]
||
1
;
newsaleModel
.
selectHotrank
(
yhChannel
,
sort
,
tab_id
,
limit
,
page
,
notab
).
then
((
result
)
=>
{
...
...
Please
register
or
login
to post a comment