mip-modules.hbs 4.4 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>...</i></a>
            {{/if}}
        </header>
        {{#if ../isModuleMargin}}
            <div class="margin-bottom"></div>
        {{/if}}
    {{/isEqual}}
    {{#isEqual module_type 'CarouselImage'}}
        <div class="shop-swiper">
            <mip-carousel
                autoplay
                defer="3000"  
                layout="responsive" 
                width="750" 
                height="234"
                indicatorId="mip-carousel-example"
                >
                {{#each ../pics}}
                {{#if link}}<a href="{{link}}">{{/if}}
                    {{#within @../index 3}}
                        <mip-img src="{{image2 src}}" alt="{{@root.title}}"></mip-img>
                    {{^}}
                        <mip-img class="lazy" src="{{image2 src}}" alt=""></mip-img>
                    {{/within}}
                {{#if link}}</a>{{/if}}
                {{/each}}
            </mip-carousel>
            <div class="mip-carousel-indicator-wrapper">
                <div class="mip-carousel-indicatorDot" id="mip-carousel-example">
                    {{#each ../pics}}
                        {{#if @first}}
                            <div class="mip-carousel-activeitem mip-carousel-indecator-item"></div>
                        {{else}}
                            <div class="mip-carousel-indecator-item"></div>
                        {{/if}}
                    {{/each}}
                </div>
            </div>
        </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">
                <img src="{{image2 ../pic}}">
                <div class="video-poster">
                    <div class="video-meta-customers">
                        <i class="eye-icon"></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}}
                {{> shop/mip-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}}
                {{> shop/mip-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}}
                {{> shop/mip-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}}
                {{> shop/mip-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}}">
            {{> mip-product-list list=../list}}
         </div>
         {{#if ../isModuleMargin}}
             <div class="margin-bottom"></div>
         {{/if}}
    {{/isEqual}}
{{/each}}