Authored by wenjiekong

优惠券more,资源配置

... ... @@ -67,7 +67,7 @@ exports.studentsNum = (data) => {
*/
exports.studentResource = (data) => {
let dest = {};
_.forEach(data, (value) => {
switch (value.template_name) {
case 'focus':
... ... @@ -89,6 +89,9 @@ exports.studentResource = (data) => {
Object.assign(dest, {adImg: value.data[0].src || '', url: value.data[0].url});
Object.assign(dest, {identityItem: {sendCoin: value.data[0].title || 100}});
break;
case 'titleFloor':
Object.assign(dest, {couponMore: value.data.title || {}});
break;
default:
break;
}
... ...
... ... @@ -41,9 +41,11 @@
<a name="stu-coupon">
<h2 class="floor-title">优惠券</h2>
</a>
<span class="floor-more">
<a href="http://www.yohobuy.com/coupon/index?contentCode=bb7268bd46dd46d304c2917309814681" id="stu-coupon-more">MORE</a>
</span>
{{#if couponMore}}
<span class="floor-more">
<a target="_blank" href="{{couponMore.more_url}}">MORE</a>
</span>
{{/if}}
</div>
<div class="commodity-list clearfix">
{{#each couponItem}}
... ...