...
|
...
|
@@ -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 &&
|
|
|
req.yoho.seoParse) {
|
|
|
let rUrl = handleFilterUrl('/list', req.query);
|
|
|
|
|
|
// if (rUrl !== req.originalUrl) {
|
|
|
// return res.redirect(301, helpers.urlFormat(rUrl));
|
|
|
// }
|
|
|
// }
|
|
|
return res.redirect(301, helpers.urlFormat(rUrl));
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
qs = decodeURIComponent(req._parsedOriginalUrl.query || '');
|
...
|
...
|
|