Authored by 梁志锋

Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop

No preview for this file type
... ... @@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Wed Oct 21 19:30:11 2015
Created by FontForge 20120731 at Thu Oct 22 11:17:10 2015
By Ads
</metadata>
<defs>
... ... @@ -16,10 +16,10 @@ Created by FontForge 20120731 at Wed Oct 21 19:30:11 2015
ascent="812"
descent="-212"
x-height="792"
bbox="0 -224 3943 812.871"
bbox="-0.75 -224 3943 812.871"
underline-thickness="50"
underline-position="-100"
unicode-range="U+0078-E625"
unicode-range="U+0078-E626"
/>
<missing-glyph horiz-adv-x="374"
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
<glyph glyph-name="uniE619" unicode="&#xe619;"
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
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" />
<glyph glyph-name="uniE61A" unicode="&#xe61a;"
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
q-6 -6 0 -12l6 -6q7 -7 13 0l138 138l138 -139q6 -6 13 0l6 6q6 6 0 13l-139 138zM676 421z" />
<glyph glyph-name="uniE61B" unicode="&#xe61b;"
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
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
d="M459 754h22h23h20h22h22v-191v-191h191h191v-109h-191h-191v-191v-190h-109v190v191h-191h-190q-1 37 -1 109h128h127h127v116v150v116z" />
<glyph glyph-name="uniE625" unicode="&#xe625;" horiz-adv-x="1000"
d="M77 372h873v-109h-873v109z" />
<glyph glyph-name="uniE626" unicode="&#xe626;"
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" />
</font>
</defs></svg>
... ...
No preview for this file type
No preview for this file type
... ... @@ -71,6 +71,9 @@ gulp.task('spm-doc', function() {
});
});
//生成发布目录,可用于上传测试机
gulp.task('ge', ['assets', 'compass-production', 'build']);
//发布
gulp.task('dist', ['assets', 'compass-production', 'build'], function() {
var ftpstream = ftp(ftpConfig);
... ...
... ... @@ -171,7 +171,7 @@ function search(opt) {
break;
}
if (data.data === ' ') {
if (data === ' ') {
nav.end = true;
if (nav.reload) {
... ... @@ -179,9 +179,9 @@ function search(opt) {
}
} else {
if (nav.reload) {
$container.html(data.data);
$container.html(data);
} else {
$container.append(data.data);
$container.append(data);
}
lazyLoad($container.find('.lazy'));
... ...
/**
* 购物车选择尺寸、颜色和数量面板
* 显示时构造当前商品信息的HTML插入yoho-page;消失则是直接清除HTML
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/21
*/
... ... @@ -9,6 +10,8 @@ var Handlebars = require('yoho.handlebars');
var $page = $('.yoho-page');
var $num;
var tpl;
//读取partials
... ... @@ -25,6 +28,51 @@ function show(data) {
var html = tpl(data);
$page.append(html);
$num = $('#good-num');
}
//移除当前Panel
function remove() {
$('.chose-panel').remove();
}
$('.yoho-page').delegate('.chose-panel', 'touchstart', function(e) {
var $cur = $(e.target);
if ($cur.closest('.main').length > 0) {
return;
}
//点击蒙版消失
remove();
}).delegate('#chose-btn-sure', 'touchstart', function() {
//确定
}).delegate('.block', 'touchstart', function() {
//尺寸颜色点选
var $this = $(this);
if ($this.hasClass('.chosed') || $this.hasClass('disable')) {
return;
}
$this.siblings('.chosed').removeClass('chosed');
$this.addClass('chosed');
}).delegate('.btn-minus', 'touchstart', function() {
var num = +$num.val();
if (num === 1) {
return;
}
$num.val(num - 1);
}).delegate('.btn-plus', 'touchstart', function() {
var num = +$num.val();
//TODO:库存数验证
$num.val(num + 1);
});
exports.show = show;
\ No newline at end of file
... ...
... ... @@ -8,7 +8,7 @@
.main {
position: absolute;
height: 718rem / $pxConvertRem;
height: 610rem / $pxConvertRem;
bottom: 0;
left: 0;
right: 0;
... ... @@ -16,8 +16,14 @@
}
.infos {
height: 546rem / $pxConvertRem;
padding: 30rem / $pxConvertRem 22rem / $pxConvertRem 20rem / $pxConvertRem;
height: 460rem / $pxConvertRem;
padding: 0 22rem / $pxConvertRem;
padding-top: 30rem / $pxConvertRem;
}
.chose-items {
height: 325rem / $pxConvertRem;
overflow: auto;
}
.basic-info {
... ... @@ -83,6 +89,10 @@
}
}
.num {
margin-bottom: 20rem / $pxConvertRem;
}
.num .btn {
float: left;
display: block;
... ... @@ -110,10 +120,11 @@
}
.btn-wrap {
height: 80rem / $pxConvertRem;
height: 120rem / $pxConvertRem;
border-top: 1px solid #e6e6e6;
padding: 21rem / $pxConvertRem;
padding: 20rem / $pxConvertRem;
text-align: center;
box-sizing: border-box;
.btn-sure {
width: 260rem / $pxConvertRem;
... ...
... ... @@ -13,36 +13,38 @@
</p>
</div>
</div>
<div class="color-list">
<span>颜色</span>
<ul class="clearfix" data-type="color">
{{# colors}}
<li class="block {{#if chosed}}chosed{{/if}}" data-id={{id}}>
{{name}}
</li>
{{/ colors}}
</ul>
</div>
<div class="size-list">
<span>尺码</span>
<ul class="clearfix" data-type="size">
{{# sizes}}
<li class="block {{#if chosed}}chosed{{/if}}" data-id={{id}}>
{{name}}
</li>
{{/ sizes}}
</ul>
</div>
<div class="num">
<span>数量</span>
<div class="clearfix">
<a class="btn btn-minus" href="javascript:void(0);">
<span class="iconfont">&#xe625;</span>
</a>
<input id="good-num" class="good-num" type="text" value={{num}}>
<a class="btn btn-plus" href="javascript:void(0);">
<span class="iconfont">&#xe624;</span>
</a>
<div class="chose-items">
<div class="color-list">
<span>颜色</span>
<ul class="clearfix" data-type="color">
{{# colors}}
<li class="block {{#if chosed}}chosed{{/if}}" data-id={{id}}>
{{name}}
</li>
{{/ colors}}
</ul>
</div>
<div class="size-list">
<span>尺码</span>
<ul class="clearfix" data-type="size">
{{# sizes}}
<li class="block {{#if chosed}}chosed{{/if}}" data-id={{id}}>
{{name}}
</li>
{{/ sizes}}
</ul>
</div>
<div class="num">
<span>数量</span>
<div class="clearfix">
<a class="btn btn-minus" href="javascript:void(0);">
<span class="iconfont">&#xe625;</span>
</a>
<input id="good-num" class="good-num" type="text" value={{num}}>
<a class="btn btn-plus" href="javascript:void(0);">
<span class="iconfont">&#xe624;</span>
</a>
</div>
</div>
</div>
</div>
... ...