Authored by 毕凯

Merge branch 'feature/recommendShop' into 'release/5.8'

Feature/recommend shop



See merge request !655
@@ -257,6 +257,8 @@ const getSearchData = (params) => { @@ -257,6 +257,8 @@ const getSearchData = (params) => {
257 for (let i = 0; i < result.data.rec_shop_list.length; i++) { 257 for (let i = 0; i < result.data.rec_shop_list.length; i++) {
258 if (parseInt(result.data.rec_shop_list[i].show_type, 10) === 1) { 258 if (parseInt(result.data.rec_shop_list[i].show_type, 10) === 1) {
259 result.data.rec_shop_list[i].is_shop = true; 259 result.data.rec_shop_list[i].is_shop = true;
  260 + result.data.rec_shop_list[i].shopUrl = '//m.yohobuy.com/product/index/brand?domain=' +
  261 + result.data.rec_shop_list[i].shop_domain;
260 newList.list.splice(parseInt(result.data.rec_shop_list[i].insert_index, 10) - 1, 0, 262 newList.list.splice(parseInt(result.data.rec_shop_list[i].insert_index, 10) - 1, 0,
261 result.data.rec_shop_list[i]); 263 result.data.rec_shop_list[i]);
262 } 264 }
1 {{#if this}} {{!-- 剔除值为false的项 --}} 1 {{#if this}} {{!-- 剔除值为false的项 --}}
2 {{#if is_shop}} 2 {{#if is_shop}}
3 - <a class="good-info brand-info" data-type="hot-shop" data-brand="" data-shop="" href="//m.yohobuy.com/product/index/brand?domain={{shop_domain}}"> 3 + <a class="good-info brand-info" data-type="hot-shop" data-brand="" data-shop="" href="{{shopUrl}}">
4 <div class="brand-info-box"> 4 <div class="brand-info-box">
5 <img src="{{image shop_logo 240 85}}" alt="{{shop_name}}"> 5 <img src="{{image shop_logo 240 85}}" alt="{{shop_name}}">
6 {{!-- <h5 class="bname">{{shop_name}}</h5> --}} 6 {{!-- <h5 class="bname">{{shop_name}}</h5> --}}
1 {{!-- 商品列表中的 品牌上新--}} 1 {{!-- 商品列表中的 品牌上新--}}
2 -<a class="good-info brand-info" data-type="hot-shop" data-brand="{{brand_id}}" href="//m.yohobuy.com/product/index/brand?domain={{shop_domain}}" data-shop="{{shop_id}}"> 2 +<a class="good-info brand-info" data-type="hot-shop" data-brand="{{brand_id}}" href="{{shopUrl}}" data-shop="{{shop_id}}">
3 <div class="brand-info-box"> 3 <div class="brand-info-box">
4 <img src="{{image shop_logo 240 100}}" alt="{{shop_name}}"> 4 <img src="{{image shop_logo 240 100}}" alt="{{shop_name}}">
5 {{!-- <h5 class="bname">{{shop_name}}</h5> --}} 5 {{!-- <h5 class="bname">{{shop_name}}</h5> --}}
@@ -32,22 +32,21 @@ @@ -32,22 +32,21 @@
32 } 32 }
33 33
34 .entry { 34 .entry {
35 - display: flex;  
36 - align-items: center;  
37 - justify-content: center;  
38 height: 45px; 35 height: 45px;
  36 + width: 170px;
39 font-size: 24px; 37 font-size: 24px;
40 - line-height: 60px; 38 + line-height: 45px;
41 color: #fff; 39 color: #fff;
42 background-color: #d0021b; 40 background-color: #d0021b;
43 - width: 170px;  
44 margin: 35px 53px; 41 margin: 35px 53px;
  42 + display: inline-block;
45 43
46 span { 44 span {
47 background-image: resolve("product/shop-entry.png"); 45 background-image: resolve("product/shop-entry.png");
  46 + background-repeat: no-repeat;
48 display: inline-block; 47 display: inline-block;
49 width: 14px; 48 width: 14px;
50 - height: 20px; 49 + height: 18px;
51 background-size: 100%; 50 background-size: 100%;
52 margin-left: 10px; 51 margin-left: 10px;
53 } 52 }
@@ -431,22 +431,21 @@ @@ -431,22 +431,21 @@
431 } 431 }
432 432
433 .entry { 433 .entry {
434 - display: flex;  
435 - align-items: center;  
436 - justify-content: center;  
437 height: 45px; 434 height: 45px;
  435 + width: 170px;
438 font-size: 24px; 436 font-size: 24px;
439 - line-height: 60px; 437 + line-height: 45px;
440 color: #fff; 438 color: #fff;
441 background-color: #d0021b; 439 background-color: #d0021b;
442 - width: 170px;  
443 margin: 35px 53px; 440 margin: 35px 53px;
  441 + display: inline-block;
444 442
445 span { 443 span {
446 background-image: resolve("product/shop-entry.png"); 444 background-image: resolve("product/shop-entry.png");
  445 + background-repeat: no-repeat;
447 display: inline-block; 446 display: inline-block;
448 width: 14px; 447 width: 14px;
449 - height: 20px; 448 + height: 18px;
450 background-size: 100%; 449 background-size: 100%;
451 margin-left: 10px; 450 margin-left: 10px;
452 } 451 }
@@ -130,6 +130,7 @@ exports.processProductList = (list, options) => { @@ -130,6 +130,7 @@ exports.processProductList = (list, options) => {
130 130
131 if (extraAttr === '_isHotShop' && parseInt(product.data.show_type, 10) === 1) { 131 if (extraAttr === '_isHotShop' && parseInt(product.data.show_type, 10) === 1) {
132 product.reShop = true; 132 product.reShop = true;
  133 + product.data.shopUrl = '//m.yohobuy.com/product/index/brand?domain=' + product.data.shop_domain;
133 } 134 }
134 135
135 pruductList.push(product); 136 pruductList.push(product);