Authored by shuaiguo

Merge branch 'refs/heads/hotfix/shop'

@@ -25,10 +25,6 @@ exports.index = (req, res, next) => { @@ -25,10 +25,6 @@ exports.index = (req, res, next) => {
25 _.isEmpty(req.query) ? null : req.query)); 25 _.isEmpty(req.query) ? null : req.query));
26 } 26 }
27 27
28 - if (isNaN(+shopId)) {  
29 - return res.redirect(301, '/404');  
30 - }  
31 -  
32 if (req.xhr && req.query._pjax && shopId) { 28 if (req.xhr && req.query._pjax && shopId) {
33 return req.ctx(shopModel).getShopGoodsData(shopId, req.yoho.channel, req.query).then(result => { 29 return req.ctx(shopModel).getShopGoodsData(shopId, req.yoho.channel, req.query).then(result => {
34 Object.assign(result, { 30 Object.assign(result, {
@@ -351,6 +351,13 @@ function getShopInfoAsync(domain, channel, params) { @@ -351,6 +351,13 @@ function getShopInfoAsync(domain, channel, params) {
351 let data, shopInfo; 351 let data, shopInfo;
352 352
353 if (shopId) { // 带id访问 353 if (shopId) { // 带id访问
  354 + if (isNaN(+shopId)) {
  355 + return {
  356 + redirect: '/404',
  357 + redirectType: 301
  358 + };
  359 + }
  360 +
354 let result = yield this.api.getShopInfo(shopId); 361 let result = yield this.api.getShopInfo(shopId);
355 362
356 data = result.data || {}; 363 data = result.data || {};
1 { 1 {
2 "name": "yohobuy-node", 2 "name": "yohobuy-node",
3 - "version": "6.9.13", 3 + "version": "6.9.14",
4 "private": true, 4 "private": true,
5 "description": "A New Yohobuy Project With Express", 5 "description": "A New Yohobuy Project With Express",
6 "repository": { 6 "repository": {