...
|
...
|
@@ -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,
|
...
|
...
|
|