Authored by yyq

list decode try catch

@@ -95,7 +95,11 @@ exports.index = (req, res, next) => { @@ -95,7 +95,11 @@ exports.index = (req, res, next) => {
95 95
96 // 商品详情页跳转过来带参数 96 // 商品详情页跳转过来带参数
97 if (req.query.phrase) { 97 if (req.query.phrase) {
  98 + try {
98 resData.list.phrase = decodeURIComponent(req.query.phrase); 99 resData.list.phrase = decodeURIComponent(req.query.phrase);
  100 + } catch (e) {
  101 + resData.list.phrase = '';
  102 + };
99 } 103 }
100 104
101 res.render('list/index', resData); 105 res.render('list/index', resData);