Authored by yyq

list decode try catch

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