Showing
5 changed files
with
30 additions
and
26 deletions
@@ -236,6 +236,8 @@ $yohoPage.on('touchstart', '.chose-panel', function(e) { | @@ -236,6 +236,8 @@ $yohoPage.on('touchstart', '.chose-panel', function(e) { | ||
236 | 236 | ||
237 | //点击蒙版消失 | 237 | //点击蒙版消失 |
238 | hide(); | 238 | hide(); |
239 | + | ||
240 | + return false; | ||
239 | }); | 241 | }); |
240 | 242 | ||
241 | $yohoPage.on('touchstart', '.color-list .block', function() { | 243 | $yohoPage.on('touchstart', '.color-list .block', function() { |
@@ -410,7 +412,6 @@ $yohoPage.on('touchstart', '.btn-minus', function() { | @@ -410,7 +412,6 @@ $yohoPage.on('touchstart', '.btn-minus', function() { | ||
410 | return; | 412 | return; |
411 | } | 413 | } |
412 | 414 | ||
413 | - //TODO status change | ||
414 | if ($('#chose-btn-sure').html() === '已售罄') { | 415 | if ($('#chose-btn-sure').html() === '已售罄') { |
415 | return; | 416 | return; |
416 | } | 417 | } |
@@ -29,16 +29,8 @@ $('.nav-btn').on('touchstart', function(event) { | @@ -29,16 +29,8 @@ $('.nav-btn').on('touchstart', function(event) { | ||
29 | $mobileWrap.addClass('menu-open'); | 29 | $mobileWrap.addClass('menu-open'); |
30 | $overlay.show().css('opacity', 0.3); | 30 | $overlay.show().css('opacity', 0.3); |
31 | $sideNav.addClass('on'); | 31 | $sideNav.addClass('on'); |
32 | - event.preventDefault(); | ||
33 | - event.stopPropagation(); | ||
34 | openSideNav = true; | 32 | openSideNav = true; |
35 | 33 | ||
36 | - //设置boy高宽,页面不能上下滑动 | ||
37 | - $('body').css({ | ||
38 | - height: $(window).height(), | ||
39 | - overflow: 'hidden' | ||
40 | - }); | ||
41 | - | ||
42 | setTimeout(function() { | 34 | setTimeout(function() { |
43 | $sideNav.css('pointer-events', 'auto'); | 35 | $sideNav.css('pointer-events', 'auto'); |
44 | }, 400); | 36 | }, 400); |
@@ -50,13 +42,9 @@ function hideSideBar() { | @@ -50,13 +42,9 @@ function hideSideBar() { | ||
50 | openSideNav = false; | 42 | openSideNav = false; |
51 | if ($mobileWrap.hasClass('menu-open')) { | 43 | if ($mobileWrap.hasClass('menu-open')) { |
52 | $mobileWrap.removeClass('menu-open'); | 44 | $mobileWrap.removeClass('menu-open'); |
53 | - $('.overlay').hide(); | 45 | + $overlay.hide(); |
54 | $('.sub-nav').removeClass('show'); | 46 | $('.sub-nav').removeClass('show'); |
55 | $sideNav.removeClass('on'); | 47 | $sideNav.removeClass('on'); |
56 | - $('body').css({ | ||
57 | - height: 'auto', | ||
58 | - overflow: 'auto' | ||
59 | - }); | ||
60 | } | 48 | } |
61 | } | 49 | } |
62 | 50 | ||
@@ -65,6 +53,10 @@ $('.overlay').on('touchstart', function(e) { | @@ -65,6 +53,10 @@ $('.overlay').on('touchstart', function(e) { | ||
65 | return false; | 53 | return false; |
66 | }); | 54 | }); |
67 | 55 | ||
56 | +$sideNav.on('touchmove', function(e) { | ||
57 | + return false; | ||
58 | +}); | ||
59 | + | ||
68 | //点击一级导航,弹出二级导航 | 60 | //点击一级导航,弹出二级导航 |
69 | $sideNav.on('touchstart', 'li', function(e) { | 61 | $sideNav.on('touchstart', 'li', function(e) { |
70 | if ($(this).find('.sub-nav').size() > 0) { | 62 | if ($(this).find('.sub-nav').size() > 0) { |
@@ -80,9 +72,13 @@ $sideNav.on('touchstart', 'li', function(e) { | @@ -80,9 +72,13 @@ $sideNav.on('touchstart', 'li', function(e) { | ||
80 | 72 | ||
81 | //返回一级导航,收起二级导航 | 73 | //返回一级导航,收起二级导航 |
82 | $subNav.each(function() { | 74 | $subNav.each(function() { |
83 | - $(this).find('li').eq(0).on('touchstart', function() { | 75 | + $(this).find('li').eq(0).on('touchend', function() { |
76 | + $sideNav.css('pointer-events', 'none'); | ||
77 | + setTimeout(function() { | ||
78 | + $sideNav.css('pointer-events', 'auto'); | ||
79 | + }, 400); | ||
80 | + | ||
84 | $('.sub-nav').removeClass('show'); | 81 | $('.sub-nav').removeClass('show'); |
85 | - return false; | ||
86 | }); | 82 | }); |
87 | }).on('touchstart', function(e) { | 83 | }).on('touchstart', function(e) { |
88 | if (e.currentTarget !== e.target) { | 84 | if (e.currentTarget !== e.target) { |
@@ -93,6 +89,7 @@ $subNav.each(function() { | @@ -93,6 +89,7 @@ $subNav.each(function() { | ||
93 | // 侧边栏点击背景色变化 | 89 | // 侧边栏点击背景色变化 |
94 | function highlight($elem) { | 90 | function highlight($elem) { |
95 | $elem.find('li').on('touchstart', function() { | 91 | $elem.find('li').on('touchstart', function() { |
92 | + $elem.find('.highlight').removeClass('highlight'); | ||
96 | $(this).addClass('highlight'); | 93 | $(this).addClass('highlight'); |
97 | }).on('touchend touchcancel', function() { | 94 | }).on('touchend touchcancel', function() { |
98 | $(this).removeClass('highlight'); | 95 | $(this).removeClass('highlight'); |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | @include transition(all .3s); | 14 | @include transition(all .3s); |
15 | 15 | ||
16 | > ul { | 16 | > ul { |
17 | - margin-bottom: 20rem / $pxConvertRem; | 17 | + margin-bottom: 16rem / $pxConvertRem; |
18 | background: #fff; | 18 | background: #fff; |
19 | border-top: 1px solid #e0e0e0; | 19 | border-top: 1px solid #e0e0e0; |
20 | border-bottom: 1px solid #e0e0e0; | 20 | border-bottom: 1px solid #e0e0e0; |
@@ -22,8 +22,8 @@ | @@ -22,8 +22,8 @@ | ||
22 | 22 | ||
23 | li { | 23 | li { |
24 | position: relative; | 24 | position: relative; |
25 | - height: 80rem / $pxConvertRem; | ||
26 | - line-height: 80rem / $pxConvertRem; | 25 | + height: 64rem / $pxConvertRem; |
26 | + line-height: 64rem / $pxConvertRem; | ||
27 | background: #fff; | 27 | background: #fff; |
28 | 28 | ||
29 | &:after { | 29 | &:after { |
@@ -45,21 +45,27 @@ | @@ -45,21 +45,27 @@ | ||
45 | a { | 45 | a { |
46 | display: block; | 46 | display: block; |
47 | height: 100%; | 47 | height: 100%; |
48 | - padding-left: 110rem / $pxConvertRem; | 48 | + padding-left: 92rem / $pxConvertRem; |
49 | color: #444; | 49 | color: #444; |
50 | } | 50 | } |
51 | 51 | ||
52 | em { | 52 | em { |
53 | font-weight: bold; | 53 | font-weight: bold; |
54 | - font-size: 26rem / $pxConvertRem; | 54 | + font-size: 24rem / $pxConvertRem; |
55 | } | 55 | } |
56 | 56 | ||
57 | .title { | 57 | .title { |
58 | display: inline-block; | 58 | display: inline-block; |
59 | font-size: 36rem / $pxConvertRem; | 59 | font-size: 36rem / $pxConvertRem; |
60 | vertical-align: bottom; | 60 | vertical-align: bottom; |
61 | + padding-left: 20rem / $pxConvertRem; | ||
61 | // 此处字体小于 12px, 先扩大,再scale缩小 | 62 | // 此处字体小于 12px, 先扩大,再scale缩小 |
62 | @include transform(scale(0.5)); | 63 | @include transform(scale(0.5)); |
64 | + | ||
65 | + -webkit-transform-origin: 0 50% 0; | ||
66 | + -moz-transform-origin: 0 50% 0; | ||
67 | + -ms-transform-origin: 0 50% 0; | ||
68 | + transform-origin: 0 50% 0; | ||
63 | } | 69 | } |
64 | 70 | ||
65 | .nav-icon, .nav-img { | 71 | .nav-icon, .nav-img { |
@@ -92,8 +98,8 @@ | @@ -92,8 +98,8 @@ | ||
92 | .first { | 98 | .first { |
93 | 99 | ||
94 | li { | 100 | li { |
95 | - height: 100rem / $pxConvertRem; | ||
96 | - line-height: 100rem / $pxConvertRem; | 101 | + height: 80rem / $pxConvertRem; |
102 | + line-height: 80rem / $pxConvertRem; | ||
97 | border-bottom: 1px solid #e0e0e0; | 103 | border-bottom: 1px solid #e0e0e0; |
98 | 104 | ||
99 | &:last-child { | 105 | &:last-child { |
@@ -105,7 +111,7 @@ | @@ -105,7 +111,7 @@ | ||
105 | } | 111 | } |
106 | 112 | ||
107 | em { | 113 | em { |
108 | - font-size: 36rem / $pxConvertRem; | 114 | + font-size: 32rem / $pxConvertRem; |
109 | } | 115 | } |
110 | 116 | ||
111 | .nav-img, .nav-icon { | 117 | .nav-img, .nav-icon { |
@@ -130,6 +130,7 @@ | @@ -130,6 +130,7 @@ | ||
130 | z-index: 2; | 130 | z-index: 2; |
131 | position: relative; | 131 | position: relative; |
132 | 132 | ||
133 | + | ||
133 | &.boys { | 134 | &.boys { |
134 | @include background-image(linear-gradient(#323232, #414141)); | 135 | @include background-image(linear-gradient(#323232, #414141)); |
135 | } | 136 | } |
@@ -160,9 +161,9 @@ | @@ -160,9 +161,9 @@ | ||
160 | i{ | 161 | i{ |
161 | width: 100%; | 162 | width: 100%; |
162 | height: 40%; | 163 | height: 40%; |
163 | - overflow: hidden; | ||
164 | display: block; | 164 | display: block; |
165 | color: #fff; | 165 | color: #fff; |
166 | + margin-bottom: 8rem / $pxConvertRem; | ||
166 | } | 167 | } |
167 | span{ | 168 | span{ |
168 | width: 100%; | 169 | width: 100%; |
-
Please register or login to post a comment