Authored by wenjiekong

优惠券more,资源配置

@@ -67,7 +67,7 @@ exports.studentsNum = (data) => { @@ -67,7 +67,7 @@ exports.studentsNum = (data) => {
67 */ 67 */
68 exports.studentResource = (data) => { 68 exports.studentResource = (data) => {
69 let dest = {}; 69 let dest = {};
70 - 70 +
71 _.forEach(data, (value) => { 71 _.forEach(data, (value) => {
72 switch (value.template_name) { 72 switch (value.template_name) {
73 case 'focus': 73 case 'focus':
@@ -89,6 +89,9 @@ exports.studentResource = (data) => { @@ -89,6 +89,9 @@ exports.studentResource = (data) => {
89 Object.assign(dest, {adImg: value.data[0].src || '', url: value.data[0].url}); 89 Object.assign(dest, {adImg: value.data[0].src || '', url: value.data[0].url});
90 Object.assign(dest, {identityItem: {sendCoin: value.data[0].title || 100}}); 90 Object.assign(dest, {identityItem: {sendCoin: value.data[0].title || 100}});
91 break; 91 break;
  92 + case 'titleFloor':
  93 + Object.assign(dest, {couponMore: value.data.title || {}});
  94 + break;
92 default: 95 default:
93 break; 96 break;
94 } 97 }
@@ -41,9 +41,11 @@ @@ -41,9 +41,11 @@
41 <a name="stu-coupon"> 41 <a name="stu-coupon">
42 <h2 class="floor-title">优惠券</h2> 42 <h2 class="floor-title">优惠券</h2>
43 </a> 43 </a>
44 - <span class="floor-more">  
45 - <a href="http://www.yohobuy.com/coupon/index?contentCode=bb7268bd46dd46d304c2917309814681" id="stu-coupon-more">MORE</a>  
46 - </span> 44 + {{#if couponMore}}
  45 + <span class="floor-more">
  46 + <a target="_blank" href="{{couponMore.more_url}}">MORE</a>
  47 + </span>
  48 + {{/if}}
47 </div> 49 </div>
48 <div class="commodity-list clearfix"> 50 <div class="commodity-list clearfix">
49 {{#each couponItem}} 51 {{#each couponItem}}