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
Plain Diff
Browse Files
Authored by
郭成尧
7 years ago
Commit
678fa974b2c1c2fe5691e96c0e5dba1fb35c1d0a
2 parents
b533d19a
8f60d792
Merge branch 'feature/seo2' of git.yoho.cn:fe/yohobuywap-node into feature/seo2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
apps/guang/controllers/detail.js
apps/guang/controllers/detail.js
View file @
678fa97
...
...
@@ -314,15 +314,19 @@ const indexRedirect = (req, res, next) => {
if
(
id
)
{
let
redirectUrl
=
'/guang/'
;
if
(
req
.
yoho
.
channel
!==
req
.
cookies
.
_Channel
)
{
redirectUrl
+=
`
$
{
req
.
yoho
.
channel
}
-
`
;
}
// if (req.yoho.channel !== req.cookies._Channel) {
// redirectUrl += `${req.yoho.channel}-`;
// }
delete
req
.
query
.
id
;
delete
req
.
query
.
channel
;
let
param
=
qs
.
stringify
(
req
.
query
);
if
(
param
)
{
param
=
'?'
+
param
;
}
redirectUrl
+=
`
$
{
id
}.
html$
{
param
}
`
;
res
.
redirect
(
301
,
redirectUrl
);
}
else
{
...
...
Please
register
or
login
to post a comment