Showing
1 changed file
with
9 additions
and
1 deletions
@@ -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 | /** |
@@ -215,7 +216,14 @@ const getSearchParamsWithoutMethod = (params) => { | @@ -215,7 +216,14 @@ const getSearchParamsWithoutMethod = (params) => { | ||
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); |
-
Please register or login to post a comment