Authored by 郭成尧

pics

@@ -45,71 +45,7 @@ @@ -45,71 +45,7 @@
45 {{!--shop-tab: 首页--}} 45 {{!--shop-tab: 首页--}}
46 <div id="red-index" class="tab-panel red-shop-index active"> 46 <div id="red-index" class="tab-panel red-shop-index active">
47 <div class="shop-coupon coupon-group"></div> 47 <div class="shop-coupon coupon-group"></div>
48 - {{#each decoratorsData}}  
49 - {{#isEqual module_type 'Title'}}  
50 - <header class="section-header">  
51 - <i class="section-more iconfont">&#xe606;</i>  
52 - <h4 class="section-title">{{../text}}</h4>  
53 - </header>  
54 - {{/isEqual}}  
55 - {{#isEqual module_type 'CarouselImage'}}  
56 - <div class="shop-swiper shop-swiper-{{../num}}">  
57 - <ul class="swiper-wrapper">  
58 - {{#each ../pics}}  
59 - <li class="swiper-slide">  
60 - <a href="{{url}}">  
61 - <img src="{{src}}" alt="">  
62 - </a>  
63 - </li>  
64 - {{/each}}  
65 - </ul>  
66 - <div class="swiper-pagination"></div>  
67 - </div>  
68 - {{/isEqual}}  
69 - {{#isEqual module_type 'Video'}}  
70 - <div class="shop-video shop-section">  
71 - <div class="video-player" style="background-image: url({{../pic}})">  
72 - <div class="video-poster">  
73 - <div class="video-meta-customers">  
74 - <i class="iconfont">&#xe602;</i>&nbsp;&nbsp;<span>13145</span>  
75 - </div>  
76 - </div>  
77 - </div>  
78 - <div class="video-intro">  
79 - <h6 class="video-title">{{../title}}</h6>  
80 - <p class="text-line-2">{{../content}}</p>  
81 - </div>  
82 - </div>  
83 - {{/isEqual}}  
84 - {{#isEqual module_type 'SingleImage'}}  
85 - <div class="items-s1">  
86 - <div class="item">  
87 - <img class="item-pic" src="{{../pic}}" alt="">  
88 - </div>  
89 - </div>  
90 - {{/isEqual}}  
91 - {{#isEqual module_type 'DoubleImage'}}  
92 - <div class="items-s2">  
93 - {{#each ../pics}}  
94 - <div class="item">  
95 - <img class="item-pic" src="{{src}}" alt="">  
96 - </div>  
97 - {{/each}}  
98 - </div>  
99 - {{/isEqual}}  
100 - {{#isEqual module_type 'TripleImage'}}  
101 - <div class="{{#isEqual ../displayType '1'}}items-3-2 items-3-2-left{{/isEqual}}  
102 - {{#isEqual ../displayType '2'}}items-3-2 items-3-2-right{{/isEqual}}  
103 - {{#isEqual ../displayType '3'}}items-3-3{{/isEqual}}  
104 - {{#isEqual ../displayType '4'}}items-3-3 items-small{{/isEqual}}">  
105 - {{#each ../pics}}  
106 - <div class="item">  
107 - <img class="item-pic" src="{{src}}" alt="">  
108 - </div>  
109 - {{/each}}  
110 - </div>  
111 - {{/isEqual}}  
112 - {{/each}} 48 + {{> reds-shop/modules}}
113 </div> 49 </div>
114 {{!--shop-tab: 全部商品--}} 50 {{!--shop-tab: 全部商品--}}
115 <div id="all-goods" class="tab-panel"> 51 <div id="all-goods" class="tab-panel">
1 <div class="item"> 1 <div class="item">
2 - <img class="item-pic" src="http://img1.gamersky.com/image2016/12/20161224_zl_91_3/gamersky_02origin_03_201612241718D33.jpg" alt=""> 2 + <img class="item-pic" src="{{src}}" alt="">
3 <div class="item-info"> 3 <div class="item-info">
4 <div class=""> 4 <div class="">
5 ABCDEFG ABCDEFG 5 ABCDEFG ABCDEFG
  1 +{{#each decoratorsData}}
  2 + {{#isEqual module_type 'Title'}}
  3 + <header class="section-header">
  4 + <i class="section-more iconfont">&#xe606;</i>
  5 + <h4 class="section-title">{{../text}}</h4>
  6 + </header>
  7 + {{/isEqual}}
  8 + {{#isEqual module_type 'CarouselImage'}}
  9 + <div class="shop-swiper shop-swiper-{{../num}}">
  10 + <ul class="swiper-wrapper">
  11 + {{#each ../pics}}
  12 + <li class="swiper-slide">
  13 + <a href="{{url}}">
  14 + <img src="{{src}}" alt="">
  15 + </a>
  16 + </li>
  17 + {{/each}}
  18 + </ul>
  19 + <div class="swiper-pagination"></div>
  20 + </div>
  21 + {{/isEqual}}
  22 + {{#isEqual module_type 'Video'}}
  23 + <div class="shop-video shop-section">
  24 + <div class="video-player" style="background-image: url({{../pic}})">
  25 + <div class="video-poster">
  26 + <div class="video-meta-customers">
  27 + <i class="iconfont">&#xe602;</i>&nbsp;&nbsp;<span>13145</span>
  28 + </div>
  29 + </div>
  30 + </div>
  31 + <div class="video-intro">
  32 + <h6 class="video-title">{{../title}}</h6>
  33 + <p class="text-line-2">{{../content}}</p>
  34 + </div>
  35 + </div>
  36 + {{/isEqual}}
  37 + {{#isEqual module_type 'SingleImage'}}
  38 + <div class="items-s1">
  39 + {{> reds-shop/item}}
  40 + </div>
  41 + {{/isEqual}}
  42 + {{#isEqual module_type 'DoubleImage'}}
  43 + <div class="items-s2">
  44 + {{#each ../pics}}
  45 + {{> reds-shop/item}}
  46 + {{/each}}
  47 + </div>
  48 + {{/isEqual}}
  49 + {{#isEqual module_type 'TripleImage'}}
  50 + <div class="{{#isEqual ../displayType '1'}}items-3-2 items-3-2-left{{/isEqual}}
  51 + {{#isEqual ../displayType '2'}}items-3-2 items-3-2-right{{/isEqual}}
  52 + {{#isEqual ../displayType '3'}}items-3-3{{/isEqual}}
  53 + {{#isEqual ../displayType '4'}}items-3-3 items-small{{/isEqual}}">
  54 + {{#each ../pics}}
  55 + {{> reds-shop/item}}
  56 + {{/each}}
  57 + </div>
  58 + {{/isEqual}}
  59 + {{#isEqual module_type 'SknList'}}
  60 + {{/isEqual}}
  61 +{{/each}}
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 * @Author: Targaryen 2 * @Author: Targaryen
3 * @Date: 2017-03-23 11:02:31 3 * @Date: 2017-03-23 11:02:31
4 * @Last Modified by: Targaryen 4 * @Last Modified by: Targaryen
5 - * @Last Modified time: 2017-03-24 11:18:28 5 + * @Last Modified time: 2017-03-24 11:39:15
6 */ 6 */
7 /* 红人店铺数据处理 */ 7 /* 红人店铺数据处理 */
8 8
@@ -107,8 +107,23 @@ const _tools = { @@ -107,8 +107,23 @@ const _tools = {
107 displayType: _.get(moduleData, 'properties.displayType', 1), 107 displayType: _.get(moduleData, 'properties.displayType', 1),
108 }; 108 };
109 }, 109 },
  110 +
  111 + /**
  112 + * 商品列表
  113 + * @param {*} moduleData
  114 + */
110 sknList(moduleData) { 115 sknList(moduleData) {
111 - return moduleData; 116 + let skns = '';
  117 +
  118 + _.forEach(_.get(moduleData, 'data', []), value => {
  119 + skns += value + ',';
  120 + });
  121 +
  122 + console.log(skns);
  123 + return {
  124 + module_type: 'SknList',
  125 + skns: skns,
  126 + };
112 } 127 }
113 }; 128 };
114 129