...
|
...
|
@@ -13,6 +13,7 @@ const _ = require('lodash'); |
|
|
const helpers = global.yoho.helpers;
|
|
|
const searchProcess = require(`${utils}/search-process`);
|
|
|
const productProcess = require(`${utils}/product-process`);
|
|
|
const listParamsProcess = require(`${utils}/list-params-process`);
|
|
|
const co = require('bluebird').coroutine;
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -254,7 +255,17 @@ exports.filter = (req, res, next) => { |
|
|
res.setHeader('Access-Control-Allow-Origin', allowOrigin);
|
|
|
res.setHeader('Access-Control-Allow-Credentials', 'true');
|
|
|
|
|
|
let params = Object.assign({}, req.query);
|
|
|
let params = {};
|
|
|
let currentUrlParams = {}; // 页面链接伪静态固定参数
|
|
|
|
|
|
if (req.query.currentUrl) {
|
|
|
currentUrlParams = listParamsProcess.getParams(req.query.currentUrl);
|
|
|
delete req.query.currentUrl;
|
|
|
delete req.query.page;
|
|
|
}
|
|
|
|
|
|
_.assign(params, currentUrlParams, req.query);
|
|
|
|
|
|
let uid = req.user.uid || 0;
|
|
|
|
|
|
if (uid) {
|
...
|
...
|
|