Authored by htoooth

change dir

... ... @@ -9,14 +9,12 @@
const mRoot = '../models';
// 商品详情model
const detail = require(`${mRoot}/detail-handle`);
const detailHandle = require(`${mRoot}/detail-handle`);
const moment = require('moment');
/* COOKIE标识访问的是男生频道 */
const COOKIE_NAME_BOYS = 'boys';
// TODO
const COOKIE_DOMAIN = '';
const COOKIE_DOMAIN = '.yohobuy.com';
function setSwitchToCookie(res) {
res.cookie('_Channel', COOKIE_NAME_BOYS, {
... ... @@ -66,7 +64,7 @@ exports.index = (req, res, next) => {
let gender = getGenderByCookie(req);
detail({
detailHandle({
id: pid,
ua: req.get('user-agent') || '',
channel: channel,
... ...
... ... @@ -24,7 +24,7 @@ app.engine('.hbs', hbs({
extname: '.hbs',
defaultLayout: 'layout',
layoutsDir: doraemon,
partialsDir: [`${partials}/partials`, `${doraemon}/partial`],
partialsDir: [`${partials}/partial`, `${doraemon}/partial`],
helpers: require('../../library/helpers')
}));
... ...
... ... @@ -279,7 +279,7 @@
<div class="share-row">
<span class="title pull-left">分享商品:</span>
{{> product/share }}
{{> common/share }}
</div>
</div>
... ...