From 16c53b29646c1940ea09ee2f99bbf1c0593019b0 Mon Sep 17 00:00:00 2001 From: sefon <809775195@qq.com> Date: Fri, 15 Jul 2016 10:18:00 +0800 Subject: [PATCH] shop bug --- static/js/product/shop.js | 10 ++-------- static/sass/product/_shop-index.css | 62 +++++++++++++++++++++++++++++++++++++++++--------------------- template/m.yohobuy.com/actions/product/index/shop.phtml | 3 +++ 3 files changed, 46 insertions(+), 29 deletions(-) diff --git a/static/js/product/shop.js b/static/js/product/shop.js index 0b9174e..2544074 100644 --- a/static/js/product/shop.js +++ b/static/js/product/shop.js @@ -42,7 +42,6 @@ var winH = $(window).height(), var defaultOpt = require('./query-param'); var $listNav = $('#list-nav'), - $posList = $('#pos-list'), //导航数据信息 navInfo = { @@ -612,10 +611,6 @@ $listNav.bind('contextmenu', function(e) { return false; }); -$posList.bind('contextmenu', function(e) { - return false; -}); - $subNav.on('touchend touchcancel', function(e) { var $this = $(e.target).closest('li'), cname, @@ -783,12 +778,11 @@ $listNav.on('touchstart', 'li', function(e) { myScroll.refresh(); }); -$posList.on('touchstart', 'li', function(e) { +$nav2.on('touchstart', 'li', function(e) { $(this).addClass('bytouch'); }).on('touchend touchcancel', function() { - $posList.find('li').removeClass('bytouch'); + $listNav.find('li').removeClass('bytouch'); myScroll.refresh(); - myScroll.scrollTo(0, -(imgH + nav1H + main1oH + 5)); }); //底部导航点击 diff --git a/static/sass/product/_shop-index.css b/static/sass/product/_shop-index.css index 5acf0bb..26e61e5 100644 --- a/static/sass/product/_shop-index.css +++ b/static/sass/product/_shop-index.css @@ -84,7 +84,7 @@ height: 28px; float: left; line-height: 28px; - width: 24%; + width: 24.7%; text-align: center; border-left: 1px solid #e1e1e1; margin-top: 30px; @@ -305,23 +305,39 @@ width: 24.8%; text-align: center; border-sizing: border-box; + position: relative; span { + padding-top: 0; font-size: 28px; } + } - &:first-child { - border-left: none; + .new:after { + height: 28px; + content: ''; + border-left: 1px solid #e1e1e1; + position: absolute; + top: 25px; + left: 163px; } - b { - border-right: 1px solid #e1e1e1; - display: block; - width: 1px; + .price:after { height: 28px; - float: right; - margin-top: 25px; + content: ''; + border-left: 1px solid #e1e1e1; + position: absolute; + top: 25px; + left: 163px; } + + .discount:after { + height: 28px; + content: ''; + border-left: 1px solid #e1e1e1; + position: absolute; + top: 25px; + left: 163px; } .active { @@ -330,13 +346,12 @@ } } - .list-nav .icon .up { top: -28px; } .list-nav .icon .down { - top: -16px; + top: -14px; } .goods-container { @@ -446,12 +461,15 @@ .pos-list { @extend .discount-page; + background: #fff; + width: 100%; + overflow: hidden; li { display: block; - height: 28px; + height: 78px; float: left; - line-height: 28px; + line-height: 78px; width: 24.8%; text-align: center; border-sizing: border-box; @@ -460,10 +478,6 @@ font-size: 28px; } - &:first-child { - border-left: none; - } - a { display: block; box-sizing: border-box; @@ -471,17 +485,15 @@ width: 100%; height: 100%; color: #999; - } b { - border-right: 1px solid #e1e1e1; - display: block; - width: 1px; height: 28px; + border-left: 1px solid #e1e1e1; float: right; margin-top: 25px; } } + } .active .cur { color: #000; @@ -512,6 +524,14 @@ } } + .pos-list .icon .up { + top: -28px; + } + + .pos-list .icon .down { + top: -14px; + } + .category-list-top-board { border-top: 1px solid #e0e0e0; } diff --git a/template/m.yohobuy.com/actions/product/index/shop.phtml b/template/m.yohobuy.com/actions/product/index/shop.phtml index 70ff032..ff7cf3e 100644 --- a/template/m.yohobuy.com/actions/product/index/shop.phtml +++ b/template/m.yohobuy.com/actions/product/index/shop.phtml @@ -135,6 +135,7 @@ <a href="javascript:void(0);"> <span class="spanTest">最新</span> <span class="iconfont cur"></span> + <b></b> </a> </li> <li class="price buriedpoint" data-bp-id="shop_poslist_price_1"> @@ -144,6 +145,7 @@ <i class="iconfont up cur"></i> <i class="iconfont down"></i> </span> + <b></b> </a> </li> <li class="discount buriedpoint" data-bp-id="shop_poslist_discount_1"> @@ -153,6 +155,7 @@ <i class="iconfont up cur"></i> <i class="iconfont down"></i> </span> + <b></b> </a> </li> <li class="filter buriedpoint" data-bp-id="shop_poslist_filter_1"> -- libgit2 0.24.0