Authored by 郝肖肖

'seo商品不存在404'

@@ -318,7 +318,9 @@ const keyId = (req, res, next) => { @@ -318,7 +318,9 @@ const keyId = (req, res, next) => {
318 318
319 return searchModel.getSearchKeywordDataById(req.params.id, params, req.user.uid).then(result => { 319 return searchModel.getSearchKeywordDataById(req.params.id, params, req.user.uid).then(result => {
320 let queryKey = result.queryKey; 320 let queryKey = result.queryKey;
321 - 321 + if (!result) {
  322 + return next();
  323 + }
322 // 唤起 APP 的路径 324 // 唤起 APP 的路径
323 res.locals.appPath = `yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.list","params":${JSON.stringify(params)}}`; 325 res.locals.appPath = `yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.list","params":${JSON.stringify(params)}}`;
324 326
@@ -589,8 +589,7 @@ const getSearchKeywordDataById = (id, params, uid) => { @@ -589,8 +589,7 @@ const getSearchKeywordDataById = (id, params, uid) => {
589 ['get', `global:yoho:seo:keywords:id:${id}`] 589 ['get', `global:yoho:seo:keywords:id:${id}`]
590 ]).then(redisData => { 590 ]).then(redisData => {
591 if (!redisData[0]) { 591 if (!redisData[0]) {
592 - return Promise.reject('get redis canpin keywords by id error!' +  
593 - `key: global:yoho:seo:keywords:id:${id} value: ${redisData[0]}`); 592 + return false;
594 } 593 }
595 594
596 redisData = JSON.parse(redisData[0]); 595 redisData = JSON.parse(redisData[0]);