diff --git a/static/sass/product/_index.scss b/static/sass/product/_index.scss index 8a7443b..4c57f96 100644 --- a/static/sass/product/_index.scss +++ b/static/sass/product/_index.scss @@ -1 +1 @@ -@import "new-arrival", "discount", "list", "detail"; \ No newline at end of file +@import "new-arrival", "discount", "list", "detail", "suspend-cart"; \ No newline at end of file diff --git a/static/sass/product/_suspend-cart.scss b/static/sass/product/_suspend-cart.scss new file mode 100644 index 0000000..a552e0d --- /dev/null +++ b/static/sass/product/_suspend-cart.scss @@ -0,0 +1,29 @@ +.suspend-cart { + position: fixed; + width: 44px; + height: 44px; + line-height: 44px; + border-radius: 50%; + background: rgba(0,0,0,0.3); + text-align: center; + right: 15px; + bottom: 70px; + z-index: 10; + + .iconfont { + color: #fff; + font-size: 22px; + } + + .cart-count { + position: absolute; + width: 18px; + height: 18px; + line-height: 18px; + border-radius: 50%; + background: #f00; + top: 0; + right: 0; + color: #fff; + } +} \ No newline at end of file diff --git a/template/m.yohobuy.com/partials/product/list.phtml b/template/m.yohobuy.com/partials/product/list.phtml index 5752af8..59363c5 100644 --- a/template/m.yohobuy.com/partials/product/list.phtml +++ b/template/m.yohobuy.com/partials/product/list.phtml @@ -120,4 +120,6 @@ {{#if query}} <input id="query" type="hidden" value={{query}}> {{/if}} + + {{> product/suspend-cart}} {{/ goodList}} \ No newline at end of file diff --git a/template/m.yohobuy.com/partials/product/suspend-cart.phtml b/template/m.yohobuy.com/partials/product/suspend-cart.phtml new file mode 100644 index 0000000..7c960b7 --- /dev/null +++ b/template/m.yohobuy.com/partials/product/suspend-cart.phtml @@ -0,0 +1,6 @@ +<div id="suspend-cart" class="suspend-cart"> + <a href={{cartUrl}}> + <span class="iconfont"></span> + </a> + <span class="cart-count hide">1</span> +</div> \ No newline at end of file