...
|
...
|
@@ -14,6 +14,7 @@ const detailHelper = require(`${mRoot}/detail-helper`); |
|
|
const moment = require('moment');
|
|
|
const DEFAULT_AVATAR_ICO = 'https://static.yohobuy.com/images/v3/boy.jpg';
|
|
|
const _ = require('lodash');
|
|
|
const qs = require('querystring');
|
|
|
|
|
|
/**
|
|
|
* 首屏渲染商品详情
|
...
|
...
|
@@ -51,9 +52,11 @@ const showMainBack = (req, res) => { |
|
|
return service.showMainBackAsync({
|
|
|
pid: pid
|
|
|
}).then((result)=> {
|
|
|
|
|
|
if (_.get(result, 'data.product_skn')) {
|
|
|
res.redirect(301, helpers.getUrlBySkc(result.data.product_skn));
|
|
|
|
|
|
let query = !_.isEmpty(req.query) ? `?${qs.stringify(req.query)}` : '';
|
|
|
|
|
|
res.redirect(301, `${helpers.getUrlBySkc(result.data.product_skn)}${query}`);
|
|
|
}
|
|
|
|
|
|
res.end();
|
...
|
...
|
|