Authored by 毕凯

Merge branch 'feature/seo4' into 'release/6.3'

Feature/seo4



See merge request !1162
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 * @author: wsl<shuiling.wang@yoho.cn> 3 * @author: wsl<shuiling.wang@yoho.cn>
4 * @date: 2016/7/29 4 * @date: 2016/7/29
5 */ 5 */
  6 +const logger = global.yoho.logger;
6 const _ = require('lodash'); 7 const _ = require('lodash');
7 8
8 /** 9 /**
@@ -211,11 +212,18 @@ const getSearchParamsWithoutMethod = (params) => { @@ -211,11 +212,18 @@ const getSearchParamsWithoutMethod = (params) => {
211 status: params.status || 1, 212 status: params.status || 1,
212 sales: params.sales || 'Y', 213 sales: params.sales || 'Y',
213 stocknumber: params.stocknumber || 1, 214 stocknumber: params.stocknumber || 1,
214 - attribute_not: params.attribute_not || 1 215 + attribute_not: params.attribute_not || 2
215 }; 216 };
216 217
217 if (params.query) { // 模糊查询参数 218 if (params.query) { // 模糊查询参数
218 - finalParams.query = params.query.replace(/\+/g, ','); 219 + let queryString = '';
  220 +
  221 + try {
  222 + queryString = decodeURIComponent(params.query).replace(/\+/g, ',');
  223 + } catch (e) {
  224 + logger.error('decodeURIComponent params query: ' + e);
  225 + }
  226 + finalParams.query = queryString;
219 } 227 }
220 if (params.yh_channel || params.channel) { // 频道 228 if (params.yh_channel || params.channel) { // 频道
221 finalParams.yh_channel = params.yh_channel || getChannelType(params.channel); 229 finalParams.yh_channel = params.yh_channel || getChannelType(params.channel);