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
9e555eb4898857bc39c834aa989ee83516035129
1 parent
dc4a27cd
fix channel
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
8 deletions
apps/channel/controllers/index.js
apps/channel/models/index.js
apps/channel/router.js
config/common.js
apps/channel/controllers/index.js
View file @
9e555eb
...
...
@@ -100,7 +100,11 @@ exports.hasNewUserFloor = (req, res, next) => {
// 频道页301重定向
exports
.
redirect
=
(
goUrl
)
=>
{
return
function
(
req
,
res
)
{
return
function
(
req
,
res
,
next
)
{
if
(
req
.
path
===
goUrl
)
{
return
next
();
}
res
.
redirect
(
301
,
goUrl
);
};
};
...
...
apps/channel/models/index.js
View file @
9e555eb
...
...
@@ -108,7 +108,7 @@ module.exports = class extends global.yoho.BaseModel {
floorData
.
newUserFloor
.
hasSwitch
=
proList
.
length
>
5
?
true
:
false
;
_
.
forEach
(
proList
,
value
=>
{
value
.
thumb
=
helpers
.
image
(
value
.
goods_list
[
0
].
images_url
,
185
,
247
);
value
.
thumb
=
helpers
.
image
(
_
.
get
(
value
,
'goods_list[0].images_url'
)
,
185
,
247
);
value
.
for_newuser
=
true
;
value
.
url
=
helpers
.
getUrlBySkc
(
value
.
product_skn
);
});
...
...
apps/channel/router.js
View file @
9e555eb
...
...
@@ -17,11 +17,9 @@ const sitemap = require('../3party/controllers/sitemap');
// 频道页路由
router
.
get
(
'/'
,
channelController
.
index
);
router
.
get
(
'/woman'
,
channelController
.
redirect
(
'/girls/'
));
router
.
get
(
'/girls'
,
channelController
.
redirect
(
'/girls/'
));
router
.
get
(
'/girls/'
,
channelController
.
index
);
router
.
get
(
'/kids'
,
channelController
.
redirect
(
'/kids/'
));
router
.
get
(
'/kids/'
,
channelController
.
index
);
router
.
get
(
'/lifestyle'
,
channelController
.
redirect
(
'/lifestyle/'
));
router
.
get
(
'/girls'
,
channelController
.
redirect
(
'/girls/'
),
channelController
.
index
);
router
.
get
(
'/kids'
,
channelController
.
redirect
(
'/kids/'
),
channelController
.
index
);
router
.
get
(
'/lifestyle'
,
channelController
.
redirect
(
'/lifestyle/'
),
channelController
.
index
);
router
.
get
(
'/lifestyle/'
,
channelController
.
index
);
router
.
get
(
'/japanKorean'
,
channelController
.
japanKorean
);
router
.
get
(
'/channel/isNewUserAjax'
,
channelController
.
hasNewUserFloor
);
...
...
config/common.js
View file @
9e555eb
...
...
@@ -110,7 +110,7 @@ module.exports = {
port
:
'4444'
// influxdb port
},
console
:
{
level
:
'
debug
'
,
level
:
'
info
'
,
colorize
:
'all'
,
prettyPrint
:
true
}
...
...
Please
register
or
login
to post a comment