Authored by 李奇

拼团详情页资源位

... ... @@ -53,7 +53,7 @@ class GroupService extends global.yoho.BaseModel {
uid
} = {}) {
try {
const [detail, recommend, banner] = await Promise.all([
let [detail, recommend, banner] = await Promise.all([
this.api.groupDetail({
uid,
groupNo
... ... @@ -78,7 +78,6 @@ class GroupService extends global.yoho.BaseModel {
let yourJoinItem = detail.yourJoinItem;
let lackNum = detail.lackNum;
let membershipItems = detail.membershipItems;
let bannerUrl = _.get(banner, '[0].data[0].src', '');
if (!yourJoinItem) {
detail.yourJoinItem = membershipItems[0];
... ... @@ -90,11 +89,10 @@ class GroupService extends global.yoho.BaseModel {
});
}
return {
...detail,
recommend,
bannerUrl
bannerResource: banner
};
} catch (e) {
... ...
... ... @@ -79,11 +79,11 @@
<a class="tip" href="https://m.yohobuy.com/activity/feature/1555.html">支付开团-支付参团-凑齐人数发货-凑不齐退款 玩法介绍》</a>
</div>
</div>
{{#if bannerUrl}}
{{#if bannerResource}}
<div class="divide"></div>
<div class="banner">
<img src="{{image2 bannerUrl w=750 h=140}}" class="official-account">
</div>
{{#each bannerResource}}
{{> group/resources/single-image}}
{{/each}}
{{/if}}
<div class="divide zero-margin"></div>
<div class="recommend">
... ...
<div class="resource-single">
{{#if @first}}
{{#each data}}
{{#if url}}
<a href="{{url}}" temp-id="{{../template_id}}" name="{{../template_name}}">
<img src="{{image2 src w=750 h=140 q=60 mode=2}}"></img>
</a>
{{^}}
<a temp-id="{{../template_id}}" name="{{../template_name}}">
<img src="{{image2 src w=750 h=140 q=60 mode=2}}"></img>
</a>
{{/if}}
{{/each}}
{{^}}
<div class="resource-divide"></div>
{{#each data}}
{{#if url}}
<a href="{{url}}" temp-id="{{../template_id}}" name="{{../template_name}}">
<img src="{{image2 src w=750 h=140 q=60 mode=2}}"></img>
</a>
{{^}}
<a temp-id="{{../template_id}}" name="{{../template_name}}">
<img src="{{image2 src w=750 h=140 q=60 mode=2}}"></img>
</a>
{{/if}}
{{/each}}
{{/if}}
</div>
... ...
... ... @@ -741,3 +741,8 @@
}
}
}
.resource-divide {
height: 16px;
background: #f0f0f0;
}
... ...