modules.hbs 3.75 KB
{{#each decorators}}
    {{#isEqual module_type 'Title'}}
        <header class="section-header">
            <div class="section-title">{{../text}}</div>
            {{#if ../link}}
                <a class="section-more" href="{{../link}}"><i class="iconfont">&#xe606;</i></a>
            {{/if}}
        </header>
        {{#if ../isModuleMargin}}
            <div class="margin-bottom"></div>
        {{/if}}
    {{/isEqual}}
    {{#isEqual module_type 'CarouselImage'}}
        <div class="shop-swiper shop-swiper-{{../num}}">
            <ul class="swiper-wrapper">
                {{#each ../pics}}
                    <li class="swiper-slide">
                        <a{{#if link}} href="{{link}}"{{/if}}>
                            {{#within @../index 3}}
                                <img src="{{image2 src}}" alt="">
                            {{^}}
                                <img class="lazy" data-original="{{image2 src}}" alt="">
                            {{/within}}
                        </a>
                    </li>
                {{/each}}
            </ul>
        </div>
        {{#if ../isModuleMargin}}
            <div class="margin-bottom"></div>
        {{/if}}
    {{/isEqual}}
    {{#isEqual module_type 'Video'}}
        <div class="shop-video shop-section clearfix">
            <div class="video-player" style="background-image: url({{../pic}})">
                <div class="video-poster">
                    <div class="video-meta-customers">
                        <i class="iconfont">&#xe602;</i>&nbsp;&nbsp;<span>13145</span>
                    </div>
                </div>
            </div>
            <div class="video-intro">
                <h6 class="video-title">{{../title}}</h6>
                <p class="text-line-2">{{../content}}</p>
            </div>
        </div>
        {{#if ../isModuleMargin}}
            <div class="margin-bottom"></div>
        {{/if}}
    {{/isEqual}}
    {{#isEqual module_type 'SingleImage'}}
        <div class="items-s1 clearfix">
            {{#each ../pics}}
                {{> reds-shop/item index=@../index single=true parent=../..}}
            {{/each}}
        </div>
        {{#if ../isModuleMargin}}
            <div class="margin-bottom"></div>
        {{/if}}
    {{/isEqual}}
    {{#isEqual module_type 'DoubleImage'}}
        <div class="items-s2 clearfix">
            {{#each ../pics}}
                {{> reds-shop/item index=@../index double=true parent=../..}}
            {{/each}}
        </div>
        {{#if ../isModuleMargin}}
            <div class="margin-bottom"></div>
        {{/if}}
    {{/isEqual}}
    {{#isEqual module_type 'TripleImage'}}
        <div class="{{#isEqual ../displayType 1}}items-3-3{{/isEqual}}{{#isEqual ../displayType 2}}items-3-3 items-small{{/isEqual}}{{#isEqual ../displayType 3}}items-3-2 items-3-2-right{{/isEqual}}{{#isEqual ../displayType 4}}items-3-2 items-3-2-left{{/isEqual}} clearfix">
            {{#each ../pics}}
                {{> reds-shop/item index=@../index triple=true parent=../..}}
            {{/each}}
        </div>
        {{#if ../isModuleMargin}}
            <div class="margin-bottom"></div>
        {{/if}}
    {{/isEqual}}
    {{#isEqual module_type 'FourImage'}}
        <div class="items-s4 clearfix">
            {{#each ../pics}}
                {{> reds-shop/item index=@../index four=true}}
            {{/each}}
        </div>
        {{#if ../isModuleMargin}}
            <div class="margin-bottom"></div>
        {{/if}}
    {{/isEqual}}
    {{#isEqual module_type 'AppRecommendProduct'}}
         <div class="index-goods-container" data-type="{{../type}}" data-skns="{{../skns}}" data-order="{{../order}}"></div>
         {{#if ../isModuleMargin}}
             <div class="margin-bottom"></div>
         {{/if}}
    {{/isEqual}}
{{/each}}