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>
... ...
<span class="share-wrapper share-to pull-left clearfix">
<i class="weibo" data-type="weibo" title="分享到新浪微博"></i>
<i class="weixin" data-type="weixin" title="分享到微信朋友圈"></i>
<i class="tweibo" data-type="tweibo" title="分享到腾讯微博"></i>
<i class="qzone" data-type="qzone" title="分享到QQ空间"></i>
<i class="qq" data-type="qq" title="分享到QQ好友"></i>
<i class="renren" data-type="renren" title="分享到人人"></i>
<i class="douban" data-type="douban" title="分享到豆瓣"></i>
<div class="weixin-share-box"></div>
</span>
<input id="share-img" type="hidden" value="{{shareImg}}">
<input id="share-desc" type="hidden" value="{{shareDesc}}">
<input id="weixin-url" type="hidden" value="{{weixinUrl}}">
<span class="share-wrapper share-to pull-left clearfix">
<i class="weibo" data-type="weibo" title="分享到新浪微博"></i>
<i class="weixin" data-type="weixin" title="分享到微信朋友圈"></i>
<i class="tweibo" data-type="tweibo" title="分享到腾讯微博"></i>
<i class="qzone" data-type="qzone" title="分享到QQ空间"></i>
<i class="qq" data-type="qq" title="分享到QQ好友"></i>
<i class="renren" data-type="renren" title="分享到人人"></i>
<i class="douban" data-type="douban" title="分享到豆瓣"></i>
<div class="weixin-share-box"></div>
</span>
<input id="share-img" type="hidden" value="{{shareImg}}">
<input id="share-desc" type="hidden" value="{{shareDesc}}">
<input id="weixin-url" type="hidden" value="{{weixinUrl}}">
... ...
{{#if pathNav}}
<p class="path-nav">
{{#each pathNav}}
{{#if name}}
{{#if href}}
<a {{#if @last}}class="last"{{/if}} href="{{href}}" title="{{pathTitle}}">{{{name}}}</a>
{{^}}
<span {{#if @last}}class="last"{{/if}} title="{{pathTitle}}">{{{name}}}</span>
{{/if}}
{{#unless @last}}
<span class="iconfont">&#xe601;</span>
{{/unless}}
{{/if}}
{{/each}}
</p>
{{/if}}
{{#if pathNav}}
<p class="path-nav">
{{#each pathNav}}
{{#if name}}
{{#if href}}
<a {{#if @last}}class="last"{{/if}} href="{{href}}" title="{{pathTitle}}">{{{name}}}</a>
{{^}}
<span {{#if @last}}class="last"{{/if}} title="{{pathTitle}}">{{{name}}}</span>
{{/if}}
{{#unless @last}}
<span class="iconfont">&#xe601;</span>
{{/unless}}
{{/if}}
{{/each}}
</p>
{{/if}}
... ...