...
|
...
|
@@ -287,7 +287,13 @@ const category = (req, res, next) => { |
|
|
* 品类落地页 SEO 友好的新路由
|
|
|
*/
|
|
|
const listNew = (req, res, next) => {
|
|
|
req.query = listParamsProcess.getParams(req.url);
|
|
|
let queryParams = req.query;
|
|
|
|
|
|
// 1. 取 path 的参数
|
|
|
req.query = listParamsProcess.getParams(req.path);
|
|
|
|
|
|
// 2. 取查询字符串参数
|
|
|
_.assign(req.query, queryParams);
|
|
|
|
|
|
if (req.query) {
|
|
|
_.forEach(req.query, (perParam, index) => {
|
...
|
...
|
@@ -295,10 +301,10 @@ const listNew = (req, res, next) => { |
|
|
});
|
|
|
}
|
|
|
|
|
|
let params = Object.assign({}, req.query);
|
|
|
let params = _.assign({}, req.query);
|
|
|
|
|
|
/* 勿修改,唤起 APP 使用 */
|
|
|
let appParams = Object.assign({}, req.query, {
|
|
|
let appParams = _.assign({}, req.query, {
|
|
|
title: req.query.title || req.query.sort_name || '',
|
|
|
productPool: req.query.filter_poolId,
|
|
|
actiontype: req.query.actiontype || '1'
|
...
|
...
|
@@ -310,7 +316,7 @@ const listNew = (req, res, next) => { |
|
|
JSON.stringify(appParams) +
|
|
|
'}';
|
|
|
|
|
|
let uid = req.user.uid || 0;
|
|
|
let uid = req.user.uid;
|
|
|
|
|
|
// 获取第一页数据做服务端渲染
|
|
|
let initialData = _.assign({
|
...
|
...
|
|