Authored by 郝肖肖

判断返回的对象是否存在

... ... @@ -184,7 +184,7 @@ const search = (req, res, next) => {
params.isApp = req.yoho.isApp;
searchModel.getSearchData(params).then((result) => {
if (result.list.length > 0) {
if (result.list && result.list.length > 0) {
res.render('search/page', {
layout: false,
new: result.list,
... ...