Authored by 李奇

拼团详情页资源位

@@ -53,7 +53,7 @@ class GroupService extends global.yoho.BaseModel { @@ -53,7 +53,7 @@ class GroupService extends global.yoho.BaseModel {
53 uid 53 uid
54 } = {}) { 54 } = {}) {
55 try { 55 try {
56 - const [detail, recommend, banner] = await Promise.all([ 56 + let [detail, recommend, banner] = await Promise.all([
57 this.api.groupDetail({ 57 this.api.groupDetail({
58 uid, 58 uid,
59 groupNo 59 groupNo
@@ -78,7 +78,6 @@ class GroupService extends global.yoho.BaseModel { @@ -78,7 +78,6 @@ class GroupService extends global.yoho.BaseModel {
78 let yourJoinItem = detail.yourJoinItem; 78 let yourJoinItem = detail.yourJoinItem;
79 let lackNum = detail.lackNum; 79 let lackNum = detail.lackNum;
80 let membershipItems = detail.membershipItems; 80 let membershipItems = detail.membershipItems;
81 - let bannerUrl = _.get(banner, '[0].data[0].src', '');  
82 81
83 if (!yourJoinItem) { 82 if (!yourJoinItem) {
84 detail.yourJoinItem = membershipItems[0]; 83 detail.yourJoinItem = membershipItems[0];
@@ -90,11 +89,10 @@ class GroupService extends global.yoho.BaseModel { @@ -90,11 +89,10 @@ class GroupService extends global.yoho.BaseModel {
90 }); 89 });
91 } 90 }
92 91
93 -  
94 return { 92 return {
95 ...detail, 93 ...detail,
96 recommend, 94 recommend,
97 - bannerUrl 95 + bannerResource: banner
98 }; 96 };
99 97
100 } catch (e) { 98 } catch (e) {
@@ -79,11 +79,11 @@ @@ -79,11 +79,11 @@
79 <a class="tip" href="https://m.yohobuy.com/activity/feature/1555.html">支付开团-支付参团-凑齐人数发货-凑不齐退款 玩法介绍》</a> 79 <a class="tip" href="https://m.yohobuy.com/activity/feature/1555.html">支付开团-支付参团-凑齐人数发货-凑不齐退款 玩法介绍》</a>
80 </div> 80 </div>
81 </div> 81 </div>
82 - {{#if bannerUrl}} 82 + {{#if bannerResource}}
83 <div class="divide"></div> 83 <div class="divide"></div>
84 - <div class="banner">  
85 - <img src="{{image2 bannerUrl w=750 h=140}}" class="official-account">  
86 - </div> 84 + {{#each bannerResource}}
  85 + {{> group/resources/single-image}}
  86 + {{/each}}
87 {{/if}} 87 {{/if}}
88 <div class="divide zero-margin"></div> 88 <div class="divide zero-margin"></div>
89 <div class="recommend"> 89 <div class="recommend">
  1 +<div class="resource-single">
  2 + {{#if @first}}
  3 + {{#each data}}
  4 + {{#if url}}
  5 + <a href="{{url}}" temp-id="{{../template_id}}" name="{{../template_name}}">
  6 + <img src="{{image2 src w=750 h=140 q=60 mode=2}}"></img>
  7 + </a>
  8 + {{^}}
  9 + <a temp-id="{{../template_id}}" name="{{../template_name}}">
  10 + <img src="{{image2 src w=750 h=140 q=60 mode=2}}"></img>
  11 + </a>
  12 + {{/if}}
  13 + {{/each}}
  14 + {{^}}
  15 + <div class="resource-divide"></div>
  16 + {{#each data}}
  17 + {{#if url}}
  18 + <a href="{{url}}" temp-id="{{../template_id}}" name="{{../template_name}}">
  19 + <img src="{{image2 src w=750 h=140 q=60 mode=2}}"></img>
  20 + </a>
  21 + {{^}}
  22 + <a temp-id="{{../template_id}}" name="{{../template_name}}">
  23 + <img src="{{image2 src w=750 h=140 q=60 mode=2}}"></img>
  24 + </a>
  25 + {{/if}}
  26 + {{/each}}
  27 + {{/if}}
  28 +</div>
@@ -741,3 +741,8 @@ @@ -741,3 +741,8 @@
741 } 741 }
742 } 742 }
743 } 743 }
  744 +
  745 +.resource-divide {
  746 + height: 16px;
  747 + background: #f0f0f0;
  748 +}