Merge branch 'feature/seoUrl302' into release/5.5
Showing
18 changed files
with
82 additions
and
82 deletions
1 | <div class="floor-ad"> | 1 | <div class="floor-ad"> |
2 | - <a href="{{url}}" target= "_blank"><img class="lazy" data-original="{{image2 src w=1150 h=129}}"/></a> | 2 | + <a href="{{url}}" target= "_blank" title="{{title}}"><img class="lazy" data-original="{{image2 src w=1150 h=129}}" alt="{{alt}}"/></a> |
3 | </div> | 3 | </div> |
1 | <div class="debris-slider clearfix"> | 1 | <div class="debris-slider clearfix"> |
2 | <div class="left-col col"> | 2 | <div class="left-col col"> |
3 | {{# left}} | 3 | {{# left}} |
4 | - <a href="{{url}}" target="_blank"> | ||
5 | - <img class="lazy" data-original="{{image2 img w=280 h=265}}"> | 4 | + <a href="{{url}}" target="_blank" title="{{title}}"> |
5 | + <img class="lazy" data-original="{{image2 img w=280 h=265}}" alt="{{alt}}"> | ||
6 | </a> | 6 | </a> |
7 | {{/ left}} | 7 | {{/ left}} |
8 | </div> | 8 | </div> |
@@ -10,8 +10,8 @@ | @@ -10,8 +10,8 @@ | ||
10 | <ul class="slide-wrapper"> | 10 | <ul class="slide-wrapper"> |
11 | {{# center}} | 11 | {{# center}} |
12 | <li> | 12 | <li> |
13 | - <a href="{{url}}" target="_blank"> | ||
14 | - <img class="lazy" data-original="{{image2 img w=570 h=633}}"> | 13 | + <a href="{{url}}" target="_blank" title="{{title}}"> |
14 | + <img class="lazy" data-original="{{image2 img w=570 h=633}}" alt="{{alt}}"> | ||
15 | </a> | 15 | </a> |
16 | </li> | 16 | </li> |
17 | {{/ center}} | 17 | {{/ center}} |
@@ -27,11 +27,11 @@ | @@ -27,11 +27,11 @@ | ||
27 | </div> | 27 | </div> |
28 | <div class="right-col col"> | 28 | <div class="right-col col"> |
29 | {{# right}} | 29 | {{# right}} |
30 | - <a href="{{url}}" target="_blank"> | 30 | + <a href="{{url}}" target="_blank" title="{{title}}"> |
31 | {{#if @first}} | 31 | {{#if @first}} |
32 | - <img class="lazy" data-original="{{image2 img w=280 h=449}}"> | 32 | + <img class="lazy" data-original="{{image2 img w=280 h=449}}" alt="{{alt}}"> |
33 | {{^}} | 33 | {{^}} |
34 | - <img class="lazy" data-original="{{image2 img w=280 h=265}}"> | 34 | + <img class="lazy" data-original="{{image2 img w=280 h=265}}" alt="{{alt}}"> |
35 | {{/if}} | 35 | {{/if}} |
36 | </a> | 36 | </a> |
37 | {{/ right}} | 37 | {{/ right}} |
@@ -3,8 +3,8 @@ | @@ -3,8 +3,8 @@ | ||
3 | <ul class="img-list imgopacity clearfix"> | 3 | <ul class="img-list imgopacity clearfix"> |
4 | {{# imgBrand}} | 4 | {{# imgBrand}} |
5 | <li class="img-item"> | 5 | <li class="img-item"> |
6 | - <a href="{{url}}" target= "_blank"> | ||
7 | - <img data-original="{{image src 378 175}}" src="{{image2 src w=378 h=175}}" alt=""> | 6 | + <a href="{{url}}" target= "_blank" title="{{title}}"> |
7 | + <img data-original="{{image src 378 175}}" src="{{image2 src w=378 h=175}}" alt="{{alt}}"> | ||
8 | </a> | 8 | </a> |
9 | </li> | 9 | </li> |
10 | {{/ imgBrand}} | 10 | {{/ imgBrand}} |
@@ -17,14 +17,14 @@ | @@ -17,14 +17,14 @@ | ||
17 | <div class="tpl-brands imgopacity clearfix"> | 17 | <div class="tpl-brands imgopacity clearfix"> |
18 | <ul> | 18 | <ul> |
19 | {{#each brands}} | 19 | {{#each brands}} |
20 | - <li><a title="{{title}}" href="{{url}}" target= "_blank"><img class="lazy" data-original="{{image2 img w=378 h=248}}"/></a></li> | 20 | + <li><a title="{{title}}" href="{{url}}" target= "_blank"><img class="lazy" data-original="{{image2 img w=378 h=248}}" alt="{{alt}}"/></a></li> |
21 | {{/each}} | 21 | {{/each}} |
22 | </ul> | 22 | </ul> |
23 | </div> | 23 | </div> |
24 | <div class="tpl-types imgopacity clearfix"> | 24 | <div class="tpl-types imgopacity clearfix"> |
25 | <ul> | 25 | <ul> |
26 | {{#each types}} | 26 | {{#each types}} |
27 | - <li><a title="{{title}}" href="{{url}}" target= "_blank"><img class="lazy" data-original="{{image2 img w=185 h=248}}"/></a></li> | 27 | + <li><a title="{{title}}" href="{{url}}" target= "_blank"><img class="lazy" data-original="{{image2 img w=185 h=248}}" alt="{{alt}}"/></a></li> |
28 | {{/each}} | 28 | {{/each}} |
29 | </ul> | 29 | </ul> |
30 | </div> | 30 | </div> |
@@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
32 | <div class="tpl-products imgopacity clearfix"> | 32 | <div class="tpl-products imgopacity clearfix"> |
33 | <ul> | 33 | <ul> |
34 | {{#each products}} | 34 | {{#each products}} |
35 | - <li><a href="{{url}}" title="{{title}}" target= "_blank"><img class="lazy" data-original="{{image2 src w=222 h=298}}"/></a></li> | 35 | + <li><a href="{{url}}" title="{{title}}" target= "_blank"><img class="lazy" data-original="{{image2 src w=222 h=298}}" alt="{{alt}}"/></a></li> |
36 | {{/each}} | 36 | {{/each}} |
37 | </ul> | 37 | </ul> |
38 | </div> | 38 | </div> |
@@ -3,9 +3,9 @@ | @@ -3,9 +3,9 @@ | ||
3 | <ul class="g-list imgopacity"> | 3 | <ul class="g-list imgopacity"> |
4 | {{#each imgHot}} | 4 | {{#each imgHot}} |
5 | {{#if big}} | 5 | {{#if big}} |
6 | - <li><a class="impo{{@index}}" href="{{url}}" target= "_blank"><img class="lazy" data-original="{{image2 src w=378 h=248}}"/></a></li> | 6 | + <li><a class="impo{{@index}}" href="{{url}}" target= "_blank" title="{{title}}"><img class="lazy" data-original="{{image2 src w=378 h=248}}" alt="{{alt}}"/></a></li> |
7 | {{^}} | 7 | {{^}} |
8 | - <li><a class="impo{{@index}}" href="{{url}}" target= "_blank"><img class="lazy" data-original="{{image2 src w=185 h=248}}"/></a></li> | 8 | + <li><a class="impo{{@index}}" href="{{url}}" target= "_blank" title="{{title}}"><img class="lazy" data-original="{{image2 src w=185 h=248}}" alt="{{alt}}"/></a></li> |
9 | {{/if}} | 9 | {{/if}} |
10 | {{/each}} | 10 | {{/each}} |
11 | </ul> | 11 | </ul> |
@@ -2,8 +2,8 @@ | @@ -2,8 +2,8 @@ | ||
2 | {{#brandLogos}} | 2 | {{#brandLogos}} |
3 | {{#if isBrand}} | 3 | {{#if isBrand}} |
4 | <li data-page="{{pageNum}}"> | 4 | <li data-page="{{pageNum}}"> |
5 | - <a href="{{href}}" target="_blank"> | ||
6 | - <img class="lazy" data-original="{{image2 img}}" alt=""> | 5 | + <a href="{{href}}" target="_blank" title="{{title}}"> |
6 | + <img class="lazy" data-original="{{image2 img}}" alt="{{alt}}"> | ||
7 | </a> | 7 | </a> |
8 | </li> | 8 | </li> |
9 | {{/if}} | 9 | {{/if}} |
@@ -13,8 +13,8 @@ | @@ -13,8 +13,8 @@ | ||
13 | <a class="next iconfont" href="javascript:;"></a> | 13 | <a class="next iconfont" href="javascript:;"></a> |
14 | </li> | 14 | </li> |
15 | <li data-page="{{pageNum}}"> | 15 | <li data-page="{{pageNum}}"> |
16 | - <a href="{{href}}" target="_blank"> | ||
17 | - <img class="lazy" data-original="{{image2 img}}" alt=""> | 16 | + <a href="{{href}}" target="_blank" title="{{title}}"> |
17 | + <img class="lazy" data-original="{{image2 img}}" alt="{{alt}}"> | ||
18 | </a> | 18 | </a> |
19 | </li> | 19 | </li> |
20 | {{/if}} | 20 | {{/if}} |
@@ -24,8 +24,8 @@ | @@ -24,8 +24,8 @@ | ||
24 | </li> | 24 | </li> |
25 | {{#if hasNext}} | 25 | {{#if hasNext}} |
26 | <li data-page="{{pageNum}}"> | 26 | <li data-page="{{pageNum}}"> |
27 | - <a href="{{href}}" target="_blank"> | ||
28 | - <img class="lazy" data-original="{{image2 img}}" alt=""> | 27 | + <a href="{{href}}" target="_blank" title="{{title}}"> |
28 | + <img class="lazy" data-original="{{image2 img}}" alt="{{alt}}"> | ||
29 | </a> | 29 | </a> |
30 | </li> | 30 | </li> |
31 | {{/if}} | 31 | {{/if}} |
@@ -3,8 +3,8 @@ | @@ -3,8 +3,8 @@ | ||
3 | <ul class="clearfix"> | 3 | <ul class="clearfix"> |
4 | {{# list}} | 4 | {{# list}} |
5 | <li class="cate-item{{@index}}"> | 5 | <li class="cate-item{{@index}}"> |
6 | - <a href="{{url}}" target= "_blank"> | ||
7 | - <img class="lazy" data-original="{{image2 src w=w h=h}}" alt=""> | 6 | + <a href="{{url}}" target= "_blank" title="{{title}}"> |
7 | + <img class="lazy" data-original="{{image2 src w=w h=h}}" alt="{{alt}}"> | ||
8 | </a> | 8 | </a> |
9 | </li> | 9 | </li> |
10 | {{/ list}} | 10 | {{/ list}} |
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | <ul class="img-list"> | 8 | <ul class="img-list"> |
9 | {{# imgBrand}} | 9 | {{# imgBrand}} |
10 | <li class="img-item"> | 10 | <li class="img-item"> |
11 | - <a href="{{url}}" target= "_blank"> | 11 | + <a href="{{url}}" target= "_blank" title="{{title}}"> |
12 | <img data-original="{{image2 src w=320 h=430}}" src="{{image2 src w=320 h=430}}" alt="{{alt}}"> | 12 | <img data-original="{{image2 src w=320 h=430}}" src="{{image2 src w=320 h=430}}" alt="{{alt}}"> |
13 | </a> | 13 | </a> |
14 | </li> | 14 | </li> |
@@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
5 | <div class="tpl-nav"> | 5 | <div class="tpl-nav"> |
6 | <div class="tpl-keywords"> | 6 | <div class="tpl-keywords"> |
7 | {{#each keyword}} | 7 | {{#each keyword}} |
8 | - <a class="keywords{{@index}}" title="{{title}}" href="{{url}}" target= "_blank"><img class="lazy" data-original="{{image2 img w=185 h=76}}"/></a> | 8 | + <a class="keywords{{@index}}" title="{{title}}" href="{{url}}" target= "_blank"><img class="lazy" data-original="{{image2 img w=185 h=76}}" alt="{{alt}}"/></a> |
9 | {{/each}} | 9 | {{/each}} |
10 | </div> | 10 | </div> |
11 | <div class="tpl-category clearfix"> | 11 | <div class="tpl-category clearfix"> |
@@ -16,13 +16,13 @@ | @@ -16,13 +16,13 @@ | ||
16 | </div> | 16 | </div> |
17 | <div class="tpl-brands imgopacity clearfix"> | 17 | <div class="tpl-brands imgopacity clearfix"> |
18 | {{#each brands}} | 18 | {{#each brands}} |
19 | - <a title="{{title}}" href="{{url}}" target= "_blank"><img class="lazy" data-original="{{image2 img w=377 h=504}}"/></a> | 19 | + <a title="{{title}}" href="{{url}}" target= "_blank"><img class="lazy" data-original="{{image2 img w=377 h=504}}" alt="{{alt}}"/></a> |
20 | {{/each}} | 20 | {{/each}} |
21 | </div> | 21 | </div> |
22 | <div class="tpl-types imgopacity clearfix"> | 22 | <div class="tpl-types imgopacity clearfix"> |
23 | <ul> | 23 | <ul> |
24 | {{#each types}} | 24 | {{#each types}} |
25 | - <li><a title="{{title}}" href="{{url}}" target= "_blank"><img class="lazy" data-original="{{image2 img w=185 h=504}}"/></a></li> | 25 | + <li><a title="{{title}}" href="{{url}}" target= "_blank"><img class="lazy" data-original="{{image2 img w=185 h=504}}" alt="{{alt}}"/></a></li> |
26 | {{/each}} | 26 | {{/each}} |
27 | </ul> | 27 | </ul> |
28 | </div> | 28 | </div> |
@@ -4,11 +4,11 @@ | @@ -4,11 +4,11 @@ | ||
4 | <ul class="g-list imgopacity clearfix"> | 4 | <ul class="g-list imgopacity clearfix"> |
5 | {{#each imgHot}} | 5 | {{#each imgHot}} |
6 | <li> | 6 | <li> |
7 | - <a href="{{url}}" target= "_blank"><div class="commodity-img"> | 7 | + <a href="{{url}}" target= "_blank"><div class="commodity-img" title="{{title}}"> |
8 | {{# tip}} | 8 | {{# tip}} |
9 | <i class="top">{{.}}</i> | 9 | <i class="top">{{.}}</i> |
10 | {{/ tip}} | 10 | {{/ tip}} |
11 | - <img class="lazy" data-original="{{image2 thumb w=280 h=373}}"/></div> | 11 | + <img class="lazy" data-original="{{image2 thumb w=280 h=373}}" alt="{{alt}}"/></div> |
12 | <p class="commodity-name">{{name}}</p> | 12 | <p class="commodity-name">{{name}}</p> |
13 | <p class="commodity-price"><span>¥{{salePrice}}</span></p> | 13 | <p class="commodity-price"><span>¥{{salePrice}}</span></p> |
14 | </a> | 14 | </a> |
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | </div> | 18 | </div> |
19 | <div class="commodity-brands imgopacity clearfix"> | 19 | <div class="commodity-brands imgopacity clearfix"> |
20 | {{#each brands}} | 20 | {{#each brands}} |
21 | - <a href="{{url}}" title="{{title}}" target= "_blank"><img class="lazy" data-original="{{image2 src w=185 h=86}}"/></a> | 21 | + <a href="{{url}}" title="{{title}}" target= "_blank"><img class="lazy" data-original="{{image2 src w=185 h=86}}" alt="{{alt}}"/></a> |
22 | {{/each}} | 22 | {{/each}} |
23 | </div> | 23 | </div> |
24 | </div> | 24 | </div> |
@@ -6,11 +6,11 @@ | @@ -6,11 +6,11 @@ | ||
6 | 6 | ||
7 | {{#unless @last}} | 7 | {{#unless @last}} |
8 | <li> | 8 | <li> |
9 | - <a href="{{url}}" target= "_blank"> | 9 | + <a href="{{url}}" target= "_blank" title="{{title}}"> |
10 | {{#if @first}} | 10 | {{#if @first}} |
11 | - <img class="lazy" data-original="{{image2 src w=377 h=504}}" alt="" > | 11 | + <img class="lazy" data-original="{{image2 src w=377 h=504}}" alt="{{alt}}"> |
12 | {{^}} | 12 | {{^}} |
13 | - <img class="lazy" data-original="{{image2 src w=185 h=248}}" alt="" > | 13 | + <img class="lazy" data-original="{{image2 src w=185 h=248}}" alt="{{alt}}"> |
14 | {{/if}} | 14 | {{/if}} |
15 | </a> | 15 | </a> |
16 | </li> | 16 | </li> |
@@ -21,8 +21,8 @@ | @@ -21,8 +21,8 @@ | ||
21 | {{# list}} | 21 | {{# list}} |
22 | {{#if @last}} | 22 | {{#if @last}} |
23 | <div class="last-item"> | 23 | <div class="last-item"> |
24 | - <a href="{{url}}" target= "_blank"> | ||
25 | - <img class="lazy" data-original="{{image2 src w=377 h=504}}" alt=""> | 24 | + <a href="{{url}}" target= "_blank" title="{{title}}"> |
25 | + <img class="lazy" data-original="{{image2 src w=377 h=504}}" alt="{{alt}}"> | ||
26 | </a> | 26 | </a> |
27 | </div> | 27 | </div> |
28 | {{/if}} | 28 | {{/if}} |
@@ -2,8 +2,8 @@ | @@ -2,8 +2,8 @@ | ||
2 | {{> common/floor-header}} | 2 | {{> common/floor-header}} |
3 | 3 | ||
4 | {{# bannerImage}} | 4 | {{# bannerImage}} |
5 | - <a class="good-thumb new-user-banner" href="{{url}}" target="_blank"> | ||
6 | - <img class="lazy" data-original="{{image2 src w=1150 h=368}}" alt="{{title}}"> | 5 | + <a class="good-thumb new-user-banner" href="{{url}}" target="_blank" title="{{title}}"> |
6 | + <img class="lazy" data-original="{{image2 src w=1150 h=368}}" alt="{{alt}}"> | ||
7 | </a> | 7 | </a> |
8 | {{/bannerImage}} | 8 | {{/bannerImage}} |
9 | <div class="new-user-proList"> | 9 | <div class="new-user-proList"> |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <div class="tpl-products imgopacity clearfix tpl-list" floorId="{{floorId}}"> | 2 | <div class="tpl-products imgopacity clearfix tpl-list" floorId="{{floorId}}"> |
3 | <ul> | 3 | <ul> |
4 | {{#each categorys}} | 4 | {{#each categorys}} |
5 | - <li><a href="{{url}}" title="{{title}}" target= "_blank"><img class="lazy" data-original="{{image2 src w=222 h=298}}"/></a></li> | 5 | + <li><a href="{{url}}" title="{{title}}" target= "_blank"><img class="lazy" data-original="{{image2 src w=222 h=298}}" alt="{{alt}}"/></a></li> |
6 | {{/each}} | 6 | {{/each}} |
7 | </ul> | 7 | </ul> |
8 | </div> | 8 | </div> |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <div class="slide-accordion clearfix"> | 2 | <div class="slide-accordion clearfix"> |
3 | <ul> | 3 | <ul> |
4 | {{#each slide}} | 4 | {{#each slide}} |
5 | - <li><a title="{{title}}" href="{{url}}" target= "_blank"><div class="g-mask"></div><img class="lazy" data-original="{{image2 src w=650 h=400}}"/></a></li> | 5 | + <li><a title="{{title}}" href="{{url}}" target= "_blank"><div class="g-mask"></div><img class="lazy" data-original="{{image2 src w=650 h=400}}" alt="{{alt}}"/></a></li> |
6 | {{/each}} | 6 | {{/each}} |
7 | </ul> | 7 | </ul> |
8 | </div> | 8 | </div> |
@@ -5,13 +5,13 @@ | @@ -5,13 +5,13 @@ | ||
5 | {{/ title}} | 5 | {{/ title}} |
6 | <div class="tpl-leftPic imgopacity clearfix"> | 6 | <div class="tpl-leftPic imgopacity clearfix"> |
7 | {{#bigPic}} | 7 | {{#bigPic}} |
8 | - <a title="{{title}}" href="{{url}}" target= "_blank"><img class="lazy" data-original="{{image2 src w=512 h=504}}"/></a> | 8 | + <a title="{{title}}" href="{{url}}" target= "_blank"><img class="lazy" data-original="{{image2 src w=512 h=504}}" alt="{{alt}}"/></a> |
9 | {{/bigPic}} | 9 | {{/bigPic}} |
10 | </div> | 10 | </div> |
11 | <div class="tpl-types imgopacity clearfix"> | 11 | <div class="tpl-types imgopacity clearfix"> |
12 | <ul> | 12 | <ul> |
13 | {{#each types}} | 13 | {{#each types}} |
14 | - <li><a title="{{title}}" href="{{url}}" target= "_blank"><img class="lazy" data-original="{{image2 src w=185 h=248}}"/></a></li> | 14 | + <li><a title="{{title}}" href="{{url}}" target= "_blank"><img class="lazy" data-original="{{image2 src w=185 h=248}}" alt="{{alt}}"/></a></li> |
15 | {{/each}} | 15 | {{/each}} |
16 | </ul> | 16 | </ul> |
17 | </div> | 17 | </div> |
@@ -10,8 +10,8 @@ const CAPTCHA = 'yoho4946abcdef#$%&!@'; | @@ -10,8 +10,8 @@ const CAPTCHA = 'yoho4946abcdef#$%&!@'; | ||
10 | 10 | ||
11 | // 对比函数 | 11 | // 对比函数 |
12 | const _mustEqual = (req) => { | 12 | const _mustEqual = (req) => { |
13 | - return req.body.verifyCode === req.session.captcha || | ||
14 | - req.body.verifyCode === CAPTCHA; | 13 | + return req.session.captcha && (req.body.verifyCode === req.session.captcha || |
14 | + req.body.verifyCode === CAPTCHA); | ||
15 | }; | 15 | }; |
16 | 16 | ||
17 | // 中间件 | 17 | // 中间件 |
@@ -63,7 +63,7 @@ | @@ -63,7 +63,7 @@ | ||
63 | "uuid": "^2.0.2", | 63 | "uuid": "^2.0.2", |
64 | "yoho-express-session": "^2.0.0", | 64 | "yoho-express-session": "^2.0.0", |
65 | "yoho-node-lib": "0.2.8", | 65 | "yoho-node-lib": "0.2.8", |
66 | - "yoho-zookeeper": "^1.0.6" | 66 | + "yoho-zookeeper": "^1.0.8" |
67 | }, | 67 | }, |
68 | "devDependencies": { | 68 | "devDependencies": { |
69 | "autoprefixer": "^6.3.6", | 69 | "autoprefixer": "^6.3.6", |
@@ -4,16 +4,15 @@ const _ = require('lodash'); | @@ -4,16 +4,15 @@ const _ = require('lodash'); | ||
4 | const camelCase = global.yoho.camelCase; | 4 | const camelCase = global.yoho.camelCase; |
5 | const helpers = global.yoho.helpers; | 5 | const helpers = global.yoho.helpers; |
6 | 6 | ||
7 | -// const images = require(`${global.utils}/images`); | ||
8 | - | ||
9 | -const itemFromBase = { | ||
10 | - search: {domain: 'search', module: 's'}, // 搜索页search.yohobuy.com | ||
11 | - list: {domain: 'list', module: 'c'}, // list.yohobuy.com | ||
12 | - listSale: {domain: 'list', module: 's'}, // list.yohobuy.com/sale | ||
13 | - listNew: {domain: 'list', module: 'n'}, // list.yohobuy.com/new | ||
14 | - brand: {domain: 'brand', module: 'b'}, // xxx.yohobuy.com[品牌域名] | ||
15 | - saleSpecial: {domain: 'sale', module: 's'}// sale.yohobuy.com | ||
16 | -}; | 7 | +// TODO 删除from参数,暂时保留注释 |
8 | +// const itemFromBase = { | ||
9 | +// search: {domain: 'search', module: 's'}, // 搜索页search.yohobuy.com | ||
10 | +// list: {domain: 'list', module: 'c'}, // list.yohobuy.com | ||
11 | +// listSale: {domain: 'list', module: 's'}, // list.yohobuy.com/sale | ||
12 | +// listNew: {domain: 'list', module: 'n'}, // list.yohobuy.com/new | ||
13 | +// brand: {domain: 'brand', module: 'b'}, // xxx.yohobuy.com[品牌域名] | ||
14 | +// saleSpecial: {domain: 'sale', module: 's'}// sale.yohobuy.com | ||
15 | +// }; | ||
17 | 16 | ||
18 | /** | 17 | /** |
19 | * 根据性别来决定 默认图片获取字段 如果是 2、3 | 18 | * 根据性别来决定 默认图片获取字段 如果是 2、3 |
@@ -112,8 +111,10 @@ const procCnAlphabetName = (nameStr) => { | @@ -112,8 +111,10 @@ const procCnAlphabetName = (nameStr) => { | ||
112 | */ | 111 | */ |
113 | exports.processProductList = (list, options) => { | 112 | exports.processProductList = (list, options) => { |
114 | const pruductList = []; | 113 | const pruductList = []; |
115 | - let itemNum = 0, | ||
116 | - itemFrom; | 114 | + |
115 | + // TODO 删除from参数,暂时保留注释 | ||
116 | + // let itemNum = 0, | ||
117 | + // itemFrom; | ||
117 | 118 | ||
118 | options = Object.assign({ | 119 | options = Object.assign({ |
119 | showTags: true, | 120 | showTags: true, |
@@ -131,24 +132,25 @@ exports.processProductList = (list, options) => { | @@ -131,24 +132,25 @@ exports.processProductList = (list, options) => { | ||
131 | from: {} // 来源 | 132 | from: {} // 来源 |
132 | }, options); | 133 | }, options); |
133 | 134 | ||
135 | + // TODO 删除from参数,暂时保留注释 | ||
134 | // 处理item from | 136 | // 处理item from |
135 | - if (!_.isEmpty(options.from) && itemFromBase[options.from.type]) { | ||
136 | - let f = {domain: '', module: '', key: ''}; | ||
137 | - let params = options.from.params || {}; | ||
138 | - | ||
139 | - f.page = params.page || 1; | ||
140 | - | ||
141 | - Object.assign(f, itemFromBase[options.from.type], { | ||
142 | - page: params.page || 1, | ||
143 | - key: params.misort || params.msort || '' | ||
144 | - }); | ||
145 | - | ||
146 | - if (options.from.type === 'search') { | ||
147 | - f.key = params.query || ''; | ||
148 | - } | ||
149 | - | ||
150 | - itemFrom = `from=${f.domain}-${f.module}-${f.key}_${f.page}_`; | ||
151 | - } | 137 | + // if (!_.isEmpty(options.from) && itemFromBase[options.from.type]) { |
138 | + // let f = {domain: '', module: '', key: ''}; | ||
139 | + // let params = options.from.params || {}; | ||
140 | + // | ||
141 | + // f.page = params.page || 1; | ||
142 | + // | ||
143 | + // Object.assign(f, itemFromBase[options.from.type], { | ||
144 | + // page: params.page || 1, | ||
145 | + // key: params.misort || params.msort || '' | ||
146 | + // }); | ||
147 | + // | ||
148 | + // if (options.from.type === 'search') { | ||
149 | + // f.key = params.query || ''; | ||
150 | + // } | ||
151 | + // | ||
152 | + // itemFrom = `from=${f.domain}-${f.module}-${f.key}_${f.page}_`; | ||
153 | + // } | ||
152 | 154 | ||
153 | _.forEach(list, (product) => { | 155 | _.forEach(list, (product) => { |
154 | 156 | ||
@@ -204,15 +206,13 @@ exports.processProductList = (list, options) => { | @@ -204,15 +206,13 @@ exports.processProductList = (list, options) => { | ||
204 | // tar add 1606071146 品牌链接处理 | 206 | // tar add 1606071146 品牌链接处理 |
205 | product.brandUrl = helpers.urlFormat('', '', product.brand_domain); | 207 | product.brandUrl = helpers.urlFormat('', '', product.brand_domain); |
206 | 208 | ||
207 | - // APP访问需要加附加的参数 | ||
208 | - // 备注:如果以后APP的接口太多,可以把这边参数提取出来,变成一个公共的方法来生成,便于以后管理维护 | ||
209 | - if (options.isApp) { | ||
210 | - product.url += `?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":'${product.product_id}'}}`; // eslint-disable-line | ||
211 | - } else if (itemFrom) { | ||
212 | - // 累加商品数量 | ||
213 | - itemNum++; | ||
214 | - product.url += `?${itemFrom}${itemNum}`; | ||
215 | - } | 209 | + // TODO 删除from参数,暂时保留注释 |
210 | + // if (itemFrom) { | ||
211 | + // // 累加商品数量 | ||
212 | + // itemNum++; | ||
213 | + // product.url += `?${itemFrom}${itemNum}`; | ||
214 | + // } | ||
215 | + | ||
216 | if (options.showTags) { | 216 | if (options.showTags) { |
217 | let tags = [], | 217 | let tags = [], |
218 | isfew = false; | 218 | isfew = false; |
-
Please register or login to post a comment