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
4201ee8a34ebcfa639c9b1015cd57b924087dcd1
1 parent
1b88d450
del redirect
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
apps/product/controllers/list.js
apps/product/controllers/list.js
View file @
4201ee8
...
...
@@ -10,7 +10,7 @@ const helpers = global.yoho.helpers;
const
logger
=
global
.
yoho
.
logger
;
const
_
=
require
(
'lodash'
);
const
handleFilterUrl
=
require
(
`
$
{
global
.
utils
}
/parameter`
)
.fullParamToMinPath
;
//
const handleFilterUrl = require(`${global.utils}/parameter`).fullParamToMinPath;
// 搜索相关接口
const
searchApi
=
require
(
'../models/search-api'
);
...
...
@@ -26,14 +26,14 @@ exports.index = (req, res, next) => {
let
resData
=
{};
let
qs
=
''
;
if
(
req
.
originalUrl
&&
req
.
originalUrl
.
indexOf
(
'.html'
)
<
0
&&
req
.
originalUrl
.
indexOf
(
'?'
)
<
0
&&
!
_
.
isEmpty
(
req
.
query
))
{
let
rUrl
=
handleFilterUrl
(
'/list'
,
req
.
query
);
// if (req.originalUrl && req.originalUrl.indexOf('.html') < 0 &&
// req.originalUrl.indexOf('?') < 0 && !_.isEmpty(req.query)) {
// let rUrl = handleFilterUrl('/list', req.query);
if
(
rUrl
!==
req
.
originalUrl
)
{
return
res
.
redirect
(
301
,
helpers
.
urlFormat
(
rUrl
));
}
}
// if (rUrl !== req.originalUrl) {
// return res.redirect(301, helpers.urlFormat(rUrl));
// }
// }
try
{
qs
=
decodeURIComponent
(
req
.
_parsedOriginalUrl
.
query
||
''
);
...
...
Please
register
or
login
to post a comment