cart.hbs 2.24 KB
<div class="home-page">
    <div class="blk-page center-content">
        {{> cart/bc-nav}}
        {{> cart/info}}
        {{#if hasGoods}}
            {{> cart-list}}
        {{^}}
            {{> cart/empty-cart}}
        {{/if}}
        <button id="add_to_cart1">添加到购物车 980874 number 1</button>
        <button id="add_to_cart2">添加到购物车 980870 number 2</button>
    </div>
</div>
<script id="edit-color-size-tpl" type="text/html">
    <div class="edit-color-size">
        <div class="indicator"><i></i></div>
        <div class="content">
            <div class="left">
                <div class="default-color mb20">
                    <span class="color-label mr10">Color: </span><span>\{{defaultColor}}</span>
                </div>

                <div class="colors-list mb20">
                    \{{#each colors}}
                        \{{#isEqual ../defaultColor color}}
                            <span class="color-item" style="background: \{{rgb}}">
                                <span class="inner"></span>
                            </span>
                        \{{^}}
                            <span class="color-item" style="background: \{{rgb}}"></span>
                        \{{/isEqual}}
                    \{{/each}}
                </div>

                <div class="default-size mb20">
                    <span class="size-label mr10">Size: </span><span>\{{defaultSize}}</span>
                </div>

                <div class="sizes-list mb10">
                    \{{#each sizes}}
                        \{{#isEqual ../defaultSize this}}
                            <span class="size-item mr10 mb10 current">\{{this}}</span> 
                        \{{^}}
                            <span class="size-item mr10 mb10">\{{this}}</span> 
                        \{{/isEqual}}
                    \{{/each}}
                </div>
                <div class="actions">
                    <span class="btn mr20" id="confirm">确定</span>
                    <span class="btn disable" id="cancel">取消</span>
                </div>
            </div>
            <div class="right">
                <img src="\{{image defaultImg 100 134}}" class="img-preview"/>
            </div>
        </div>
    </div>
</script>