Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop
Showing
9 changed files
with
107 additions
and
44 deletions
No preview for this file type
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > | 2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > |
3 | <svg xmlns="http://www.w3.org/2000/svg"> | 3 | <svg xmlns="http://www.w3.org/2000/svg"> |
4 | <metadata> | 4 | <metadata> |
5 | -Created by FontForge 20120731 at Wed Oct 21 19:30:11 2015 | 5 | +Created by FontForge 20120731 at Thu Oct 22 11:17:10 2015 |
6 | By Ads | 6 | By Ads |
7 | </metadata> | 7 | </metadata> |
8 | <defs> | 8 | <defs> |
@@ -16,10 +16,10 @@ Created by FontForge 20120731 at Wed Oct 21 19:30:11 2015 | @@ -16,10 +16,10 @@ Created by FontForge 20120731 at Wed Oct 21 19:30:11 2015 | ||
16 | ascent="812" | 16 | ascent="812" |
17 | descent="-212" | 17 | descent="-212" |
18 | x-height="792" | 18 | x-height="792" |
19 | - bbox="0 -224 3943 812.871" | 19 | + bbox="-0.75 -224 3943 812.871" |
20 | underline-thickness="50" | 20 | underline-thickness="50" |
21 | underline-position="-100" | 21 | underline-position="-100" |
22 | - unicode-range="U+0078-E625" | 22 | + unicode-range="U+0078-E626" |
23 | /> | 23 | /> |
24 | <missing-glyph horiz-adv-x="374" | 24 | <missing-glyph horiz-adv-x="374" |
25 | d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" /> | 25 | d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" /> |
@@ -114,9 +114,6 @@ d="M224 192q-40 0 -68 28t-28 68t28 68t68 28t68 -28t28 -68t-28 -68t-68 -28zM512 1 | @@ -114,9 +114,6 @@ d="M224 192q-40 0 -68 28t-28 68t28 68t68 28t68 -28t28 -68t-28 -68t-68 -28zM512 1 | ||
114 | <glyph glyph-name="uniE619" unicode="" | 114 | <glyph glyph-name="uniE619" unicode="" |
115 | d="M126 225q30 0 50.5 21.5t20.5 52.5q0 33 -20.5 54.5t-51 21.5t-51.5 -21.5t-21 -54.5q0 -45 38 -66q17 -8 35 -8zM512 225q15 0 28.5 5.5t23 15.5t15 24t5.5 29q0 9 -2 18t-5.5 16.5t-8 14t-10.5 11.5t-13.5 9t-15.5 5.5t-17 1.5q-30 0 -51 -21.5t-21 -54.5q0 -45 38 -66 | 115 | d="M126 225q30 0 50.5 21.5t20.5 52.5q0 33 -20.5 54.5t-51 21.5t-51.5 -21.5t-21 -54.5q0 -45 38 -66q17 -8 35 -8zM512 225q15 0 28.5 5.5t23 15.5t15 24t5.5 29q0 9 -2 18t-5.5 16.5t-8 14t-10.5 11.5t-13.5 9t-15.5 5.5t-17 1.5q-30 0 -51 -21.5t-21 -54.5q0 -45 38 -66 |
116 | q16 -8 34 -8zM899.5 225q30.5 0 51 21.5t20.5 52.5q0 9 -2 18t-5.5 16.5t-8 14t-11 11.5t-13.5 9t-15 5.5t-17 1.5q-20 0 -36.5 -9.5t-26 -27t-9.5 -39.5q0 -31 21 -52.5t51.5 -21.5z" /> | 116 | q16 -8 34 -8zM899.5 225q30.5 0 51 21.5t20.5 52.5q0 9 -2 18t-5.5 16.5t-8 14t-11 11.5t-13.5 9t-15 5.5t-17 1.5q-20 0 -36.5 -9.5t-26 -27t-9.5 -39.5q0 -31 21 -52.5t51.5 -21.5z" /> |
117 | - <glyph glyph-name="uniE61A" unicode="" | ||
118 | -d="M511 -84q-102 0 -188.5 50t-137 137t-50.5 189t50.5 188.5t137 137t188.5 50.5t189 -50.5t137 -137t50 -188.5t-50 -189t-137 -137t-189 -50zM676 421q7 6 0 12l-6 7q-2 2 -5.5 2t-6.5 -2l-138 -139l-137 137q-6 6 -12 0l-6 -6q-6 -6 0 -12l136 -137l-138 -138 | ||
119 | -q-6 -6 0 -12l6 -6q7 -7 13 0l138 138l138 -139q6 -6 13 0l6 6q6 6 0 13l-139 138zM676 421z" /> | ||
120 | <glyph glyph-name="uniE61B" unicode="" | 117 | <glyph glyph-name="uniE61B" unicode="" |
121 | d="M437 41h-193q-27 2 -41.5 22.5t-17.5 45.5q3 25 17.5 41t41.5 18h193v63l-193 1q-27 2 -41.5 19t-17.5 43q3 25 17.5 41t41.5 18h144l-134 236q-10 12 -19 30.5t-8 40.5q5 28 20 45.5t56 22.5q24 -2 43 -16.5t31 -31.5l152 -278l167 280q12 17 31 30t43 16q15 -1 27.5 -4 | 118 | d="M437 41h-193q-27 2 -41.5 22.5t-17.5 45.5q3 25 17.5 41t41.5 18h193v63l-193 1q-27 2 -41.5 19t-17.5 43q3 25 17.5 41t41.5 18h144l-134 236q-10 12 -19 30.5t-8 40.5q5 28 20 45.5t56 22.5q24 -2 43 -16.5t31 -31.5l152 -278l167 280q12 17 31 30t43 16q15 -1 27.5 -4 |
122 | t22 -10t16 -20t9.5 -34q0 -29 -20 -55l-155 -252h147q26 -2 41 -18t17 -41q-2 -26 -17.5 -44t-41.5 -20l-191 -1v-61h192q26 -2 41 -20t17 -43q-2 -26 -17 -43.5t-41 -19.5l-192 1v-106q-4 -85 -93 -85q-44 0 -68.5 21t-26.5 64v104z" /> | 119 | t22 -10t16 -20t9.5 -34q0 -29 -20 -55l-155 -252h147q26 -2 41 -18t17 -41q-2 -26 -17.5 -44t-41.5 -20l-191 -1v-61h192q26 -2 41 -20t17 -43q-2 -26 -17 -43.5t-41 -19.5l-192 1v-106q-4 -85 -93 -85q-44 0 -68.5 21t-26.5 64v104z" /> |
@@ -146,5 +143,7 @@ d="M835 576l-60 63l-263 -275v0l-263 275l-60 -63l262 -276l-262 -276l60 -63l263 27 | @@ -146,5 +143,7 @@ d="M835 576l-60 63l-263 -275v0l-263 275l-60 -63l262 -276l-262 -276l60 -63l263 27 | ||
146 | d="M459 754h22h23h20h22h22v-191v-191h191h191v-109h-191h-191v-191v-190h-109v190v191h-191h-190q-1 37 -1 109h128h127h127v116v150v116z" /> | 143 | d="M459 754h22h23h20h22h22v-191v-191h191h191v-109h-191h-191v-191v-190h-109v190v191h-191h-190q-1 37 -1 109h128h127h127v116v150v116z" /> |
147 | <glyph glyph-name="uniE625" unicode="" horiz-adv-x="1000" | 144 | <glyph glyph-name="uniE625" unicode="" horiz-adv-x="1000" |
148 | d="M77 372h873v-109h-873v109z" /> | 145 | d="M77 372h873v-109h-873v109z" /> |
146 | + <glyph glyph-name="uniE626" unicode="" | ||
147 | +d="M866.5 663.5q-97.5 97.5 -228 132t-261.5 0t-228.5 -132t-132 -228.5t0 -261.5t132 -228t228.5 -132t261.5 0t228 132t132 228t0 261.5t-132 228.5zM798 115l-101 -101l-187 186l-186 -186l-101 101l186 186l-186 187l101 101l186 -186l187 186l101 -101l-186 -187z" /> | ||
149 | </font> | 148 | </font> |
150 | </defs></svg> | 149 | </defs></svg> |
No preview for this file type
No preview for this file type
@@ -71,6 +71,9 @@ gulp.task('spm-doc', function() { | @@ -71,6 +71,9 @@ gulp.task('spm-doc', function() { | ||
71 | }); | 71 | }); |
72 | }); | 72 | }); |
73 | 73 | ||
74 | +//生成发布目录,可用于上传测试机 | ||
75 | +gulp.task('ge', ['assets', 'compass-production', 'build']); | ||
76 | + | ||
74 | //发布 | 77 | //发布 |
75 | gulp.task('dist', ['assets', 'compass-production', 'build'], function() { | 78 | gulp.task('dist', ['assets', 'compass-production', 'build'], function() { |
76 | var ftpstream = ftp(ftpConfig); | 79 | var ftpstream = ftp(ftpConfig); |
@@ -171,7 +171,7 @@ function search(opt) { | @@ -171,7 +171,7 @@ function search(opt) { | ||
171 | break; | 171 | break; |
172 | } | 172 | } |
173 | 173 | ||
174 | - if (data.data === ' ') { | 174 | + if (data === ' ') { |
175 | nav.end = true; | 175 | nav.end = true; |
176 | 176 | ||
177 | if (nav.reload) { | 177 | if (nav.reload) { |
@@ -179,9 +179,9 @@ function search(opt) { | @@ -179,9 +179,9 @@ function search(opt) { | ||
179 | } | 179 | } |
180 | } else { | 180 | } else { |
181 | if (nav.reload) { | 181 | if (nav.reload) { |
182 | - $container.html(data.data); | 182 | + $container.html(data); |
183 | } else { | 183 | } else { |
184 | - $container.append(data.data); | 184 | + $container.append(data); |
185 | } | 185 | } |
186 | 186 | ||
187 | lazyLoad($container.find('.lazy')); | 187 | lazyLoad($container.find('.lazy')); |
1 | /** | 1 | /** |
2 | * 购物车选择尺寸、颜色和数量面板 | 2 | * 购物车选择尺寸、颜色和数量面板 |
3 | + * 显示时构造当前商品信息的HTML插入yoho-page;消失则是直接清除HTML | ||
3 | * @author: xuqi<qi.xu@yoho.cn> | 4 | * @author: xuqi<qi.xu@yoho.cn> |
4 | * @date: 2015/10/21 | 5 | * @date: 2015/10/21 |
5 | */ | 6 | */ |
@@ -9,6 +10,8 @@ var Handlebars = require('yoho.handlebars'); | @@ -9,6 +10,8 @@ var Handlebars = require('yoho.handlebars'); | ||
9 | 10 | ||
10 | var $page = $('.yoho-page'); | 11 | var $page = $('.yoho-page'); |
11 | 12 | ||
13 | +var $num; | ||
14 | + | ||
12 | var tpl; | 15 | var tpl; |
13 | 16 | ||
14 | //读取partials | 17 | //读取partials |
@@ -25,6 +28,51 @@ function show(data) { | @@ -25,6 +28,51 @@ function show(data) { | ||
25 | var html = tpl(data); | 28 | var html = tpl(data); |
26 | 29 | ||
27 | $page.append(html); | 30 | $page.append(html); |
31 | + | ||
32 | + $num = $('#good-num'); | ||
28 | } | 33 | } |
29 | 34 | ||
35 | +//移除当前Panel | ||
36 | +function remove() { | ||
37 | + $('.chose-panel').remove(); | ||
38 | +} | ||
39 | + | ||
40 | +$('.yoho-page').delegate('.chose-panel', 'touchstart', function(e) { | ||
41 | + var $cur = $(e.target); | ||
42 | + | ||
43 | + if ($cur.closest('.main').length > 0) { | ||
44 | + return; | ||
45 | + } | ||
46 | + | ||
47 | + //点击蒙版消失 | ||
48 | + remove(); | ||
49 | +}).delegate('#chose-btn-sure', 'touchstart', function() { | ||
50 | + | ||
51 | + //确定 | ||
52 | +}).delegate('.block', 'touchstart', function() { | ||
53 | + | ||
54 | + //尺寸颜色点选 | ||
55 | + var $this = $(this); | ||
56 | + | ||
57 | + if ($this.hasClass('.chosed') || $this.hasClass('disable')) { | ||
58 | + return; | ||
59 | + } | ||
60 | + | ||
61 | + $this.siblings('.chosed').removeClass('chosed'); | ||
62 | + $this.addClass('chosed'); | ||
63 | +}).delegate('.btn-minus', 'touchstart', function() { | ||
64 | + var num = +$num.val(); | ||
65 | + | ||
66 | + if (num === 1) { | ||
67 | + return; | ||
68 | + } | ||
69 | + | ||
70 | + $num.val(num - 1); | ||
71 | +}).delegate('.btn-plus', 'touchstart', function() { | ||
72 | + var num = +$num.val(); | ||
73 | + | ||
74 | + //TODO:库存数验证 | ||
75 | + $num.val(num + 1); | ||
76 | +}); | ||
77 | + | ||
30 | exports.show = show; | 78 | exports.show = show; |
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | 8 | ||
9 | .main { | 9 | .main { |
10 | position: absolute; | 10 | position: absolute; |
11 | - height: 718rem / $pxConvertRem; | 11 | + height: 610rem / $pxConvertRem; |
12 | bottom: 0; | 12 | bottom: 0; |
13 | left: 0; | 13 | left: 0; |
14 | right: 0; | 14 | right: 0; |
@@ -16,8 +16,14 @@ | @@ -16,8 +16,14 @@ | ||
16 | } | 16 | } |
17 | 17 | ||
18 | .infos { | 18 | .infos { |
19 | - height: 546rem / $pxConvertRem; | ||
20 | - padding: 30rem / $pxConvertRem 22rem / $pxConvertRem 20rem / $pxConvertRem; | 19 | + height: 460rem / $pxConvertRem; |
20 | + padding: 0 22rem / $pxConvertRem; | ||
21 | + padding-top: 30rem / $pxConvertRem; | ||
22 | + } | ||
23 | + | ||
24 | + .chose-items { | ||
25 | + height: 325rem / $pxConvertRem; | ||
26 | + overflow: auto; | ||
21 | } | 27 | } |
22 | 28 | ||
23 | .basic-info { | 29 | .basic-info { |
@@ -83,6 +89,10 @@ | @@ -83,6 +89,10 @@ | ||
83 | } | 89 | } |
84 | } | 90 | } |
85 | 91 | ||
92 | + .num { | ||
93 | + margin-bottom: 20rem / $pxConvertRem; | ||
94 | + } | ||
95 | + | ||
86 | .num .btn { | 96 | .num .btn { |
87 | float: left; | 97 | float: left; |
88 | display: block; | 98 | display: block; |
@@ -110,10 +120,11 @@ | @@ -110,10 +120,11 @@ | ||
110 | } | 120 | } |
111 | 121 | ||
112 | .btn-wrap { | 122 | .btn-wrap { |
113 | - height: 80rem / $pxConvertRem; | 123 | + height: 120rem / $pxConvertRem; |
114 | border-top: 1px solid #e6e6e6; | 124 | border-top: 1px solid #e6e6e6; |
115 | - padding: 21rem / $pxConvertRem; | 125 | + padding: 20rem / $pxConvertRem; |
116 | text-align: center; | 126 | text-align: center; |
127 | + box-sizing: border-box; | ||
117 | 128 | ||
118 | .btn-sure { | 129 | .btn-sure { |
119 | width: 260rem / $pxConvertRem; | 130 | width: 260rem / $pxConvertRem; |
@@ -13,36 +13,38 @@ | @@ -13,36 +13,38 @@ | ||
13 | </p> | 13 | </p> |
14 | </div> | 14 | </div> |
15 | </div> | 15 | </div> |
16 | - <div class="color-list"> | ||
17 | - <span>颜色</span> | ||
18 | - <ul class="clearfix" data-type="color"> | ||
19 | - {{# colors}} | ||
20 | - <li class="block {{#if chosed}}chosed{{/if}}" data-id={{id}}> | ||
21 | - {{name}} | ||
22 | - </li> | ||
23 | - {{/ colors}} | ||
24 | - </ul> | ||
25 | - </div> | ||
26 | - <div class="size-list"> | ||
27 | - <span>尺码</span> | ||
28 | - <ul class="clearfix" data-type="size"> | ||
29 | - {{# sizes}} | ||
30 | - <li class="block {{#if chosed}}chosed{{/if}}" data-id={{id}}> | ||
31 | - {{name}} | ||
32 | - </li> | ||
33 | - {{/ sizes}} | ||
34 | - </ul> | ||
35 | - </div> | ||
36 | - <div class="num"> | ||
37 | - <span>数量</span> | ||
38 | - <div class="clearfix"> | ||
39 | - <a class="btn btn-minus" href="javascript:void(0);"> | ||
40 | - <span class="iconfont"></span> | ||
41 | - </a> | ||
42 | - <input id="good-num" class="good-num" type="text" value={{num}}> | ||
43 | - <a class="btn btn-plus" href="javascript:void(0);"> | ||
44 | - <span class="iconfont"></span> | ||
45 | - </a> | 16 | + <div class="chose-items"> |
17 | + <div class="color-list"> | ||
18 | + <span>颜色</span> | ||
19 | + <ul class="clearfix" data-type="color"> | ||
20 | + {{# colors}} | ||
21 | + <li class="block {{#if chosed}}chosed{{/if}}" data-id={{id}}> | ||
22 | + {{name}} | ||
23 | + </li> | ||
24 | + {{/ colors}} | ||
25 | + </ul> | ||
26 | + </div> | ||
27 | + <div class="size-list"> | ||
28 | + <span>尺码</span> | ||
29 | + <ul class="clearfix" data-type="size"> | ||
30 | + {{# sizes}} | ||
31 | + <li class="block {{#if chosed}}chosed{{/if}}" data-id={{id}}> | ||
32 | + {{name}} | ||
33 | + </li> | ||
34 | + {{/ sizes}} | ||
35 | + </ul> | ||
36 | + </div> | ||
37 | + <div class="num"> | ||
38 | + <span>数量</span> | ||
39 | + <div class="clearfix"> | ||
40 | + <a class="btn btn-minus" href="javascript:void(0);"> | ||
41 | + <span class="iconfont"></span> | ||
42 | + </a> | ||
43 | + <input id="good-num" class="good-num" type="text" value={{num}}> | ||
44 | + <a class="btn btn-plus" href="javascript:void(0);"> | ||
45 | + <span class="iconfont"></span> | ||
46 | + </a> | ||
47 | + </div> | ||
46 | </div> | 48 | </div> |
47 | </div> | 49 | </div> |
48 | </div> | 50 | </div> |
-
Please register or login to post a comment