Authored by htoooth

change dir

@@ -9,14 +9,12 @@ @@ -9,14 +9,12 @@
9 const mRoot = '../models'; 9 const mRoot = '../models';
10 10
11 // 商品详情model 11 // 商品详情model
12 -const detail = require(`${mRoot}/detail-handle`); 12 +const detailHandle = require(`${mRoot}/detail-handle`);
13 const moment = require('moment'); 13 const moment = require('moment');
14 14
15 /* COOKIE标识访问的是男生频道 */ 15 /* COOKIE标识访问的是男生频道 */
16 const COOKIE_NAME_BOYS = 'boys'; 16 const COOKIE_NAME_BOYS = 'boys';
17 -  
18 -// TODO  
19 -const COOKIE_DOMAIN = ''; 17 +const COOKIE_DOMAIN = '.yohobuy.com';
20 18
21 function setSwitchToCookie(res) { 19 function setSwitchToCookie(res) {
22 res.cookie('_Channel', COOKIE_NAME_BOYS, { 20 res.cookie('_Channel', COOKIE_NAME_BOYS, {
@@ -66,7 +64,7 @@ exports.index = (req, res, next) => { @@ -66,7 +64,7 @@ exports.index = (req, res, next) => {
66 64
67 let gender = getGenderByCookie(req); 65 let gender = getGenderByCookie(req);
68 66
69 - detail({ 67 + detailHandle({
70 id: pid, 68 id: pid,
71 ua: req.get('user-agent') || '', 69 ua: req.get('user-agent') || '',
72 channel: channel, 70 channel: channel,
@@ -24,7 +24,7 @@ app.engine('.hbs', hbs({ @@ -24,7 +24,7 @@ app.engine('.hbs', hbs({
24 extname: '.hbs', 24 extname: '.hbs',
25 defaultLayout: 'layout', 25 defaultLayout: 'layout',
26 layoutsDir: doraemon, 26 layoutsDir: doraemon,
27 - partialsDir: [`${partials}/partials`, `${doraemon}/partial`], 27 + partialsDir: [`${partials}/partial`, `${doraemon}/partial`],
28 helpers: require('../../library/helpers') 28 helpers: require('../../library/helpers')
29 })); 29 }));
30 30
@@ -279,7 +279,7 @@ @@ -279,7 +279,7 @@
279 279
280 <div class="share-row"> 280 <div class="share-row">
281 <span class="title pull-left">分享商品:</span> 281 <span class="title pull-left">分享商品:</span>
282 - {{> product/share }} 282 + {{> common/share }}
283 </div> 283 </div>
284 </div> 284 </div>
285 285
1 -<span class="share-wrapper share-to pull-left clearfix">  
2 - <i class="weibo" data-type="weibo" title="分享到新浪微博"></i>  
3 - <i class="weixin" data-type="weixin" title="分享到微信朋友圈"></i>  
4 - <i class="tweibo" data-type="tweibo" title="分享到腾讯微博"></i>  
5 - <i class="qzone" data-type="qzone" title="分享到QQ空间"></i>  
6 - <i class="qq" data-type="qq" title="分享到QQ好友"></i>  
7 - <i class="renren" data-type="renren" title="分享到人人"></i>  
8 - <i class="douban" data-type="douban" title="分享到豆瓣"></i>  
9 - <div class="weixin-share-box"></div>  
10 -</span>  
11 -<input id="share-img" type="hidden" value="{{shareImg}}">  
12 -<input id="share-desc" type="hidden" value="{{shareDesc}}">  
13 -<input id="weixin-url" type="hidden" value="{{weixinUrl}}"> 1 +<span class="share-wrapper share-to pull-left clearfix">
  2 + <i class="weibo" data-type="weibo" title="分享到新浪微博"></i>
  3 + <i class="weixin" data-type="weixin" title="分享到微信朋友圈"></i>
  4 + <i class="tweibo" data-type="tweibo" title="分享到腾讯微博"></i>
  5 + <i class="qzone" data-type="qzone" title="分享到QQ空间"></i>
  6 + <i class="qq" data-type="qq" title="分享到QQ好友"></i>
  7 + <i class="renren" data-type="renren" title="分享到人人"></i>
  8 + <i class="douban" data-type="douban" title="分享到豆瓣"></i>
  9 + <div class="weixin-share-box"></div>
  10 +</span>
  11 +<input id="share-img" type="hidden" value="{{shareImg}}">
  12 +<input id="share-desc" type="hidden" value="{{shareDesc}}">
  13 +<input id="weixin-url" type="hidden" value="{{weixinUrl}}">
1 -{{#if pathNav}}  
2 - <p class="path-nav">  
3 - {{#each pathNav}}  
4 - {{#if name}}  
5 - {{#if href}}  
6 - <a {{#if @last}}class="last"{{/if}} href="{{href}}" title="{{pathTitle}}">{{{name}}}</a>  
7 - {{^}}  
8 - <span {{#if @last}}class="last"{{/if}} title="{{pathTitle}}">{{{name}}}</span>  
9 - {{/if}}  
10 - {{#unless @last}}  
11 - <span class="iconfont">&#xe601;</span>  
12 - {{/unless}}  
13 - {{/if}}  
14 - {{/each}}  
15 - </p>  
16 -{{/if}} 1 +{{#if pathNav}}
  2 + <p class="path-nav">
  3 + {{#each pathNav}}
  4 + {{#if name}}
  5 + {{#if href}}
  6 + <a {{#if @last}}class="last"{{/if}} href="{{href}}" title="{{pathTitle}}">{{{name}}}</a>
  7 + {{^}}
  8 + <span {{#if @last}}class="last"{{/if}} title="{{pathTitle}}">{{{name}}}</span>
  9 + {{/if}}
  10 + {{#unless @last}}
  11 + <span class="iconfont">&#xe601;</span>
  12 + {{/unless}}
  13 + {{/if}}
  14 + {{/each}}
  15 + </p>
  16 +{{/if}}