Authored by hf

Merge branch 'develop' into test

framework @ 119c247f
Subproject commit 75bbc3b075de19f239532f60c5995d06c5f814e2
Subproject commit 119c247f5cf929aa1e059e40609bb16dd6b58f05
... ...
0 info it worked if it ends with ok
1 verbose cli [ 'node',
1 verbose cli 'c:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli '--userconfig=C:\\Users\\Administrator\\.cnpmrc',
1 verbose cli '--disturl=https://npm.taobao.org/mirrors/node',
1 verbose cli '--cache=C:\\Users\\Administrator\\.cnpm',
1 verbose cli '--registry=https://registry.npm.taobao.org',
1 verbose cli '--node-gyp=c:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\pangyp\\bin\\node-gyp.js',
1 verbose cli 'install',
1 verbose cli '-d' ]
2 info using npm@2.13.5
3 info using node@v0.12.0
4 verbose readDependencies loading dependencies from d:\YOHO\yohobuy\package.json
5 error install Couldn't read dependencies
6 verbose stack Error: ENOENT, open 'd:\YOHO\yohobuy\package.json'
6 verbose stack at Error (native)
7 verbose cwd d:\YOHO\yohobuy
8 error Windows_NT 6.1.7601
9 error argv "node" "c:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\npm\\bin\\npm-cli.js" "--userconfig=C:\\Users\\Administrator\\.cnpmrc" "--disturl=https://npm.taobao.org/mirrors/node" "--cache=C:\\Users\\Administrator\\.cnpm" "--registry=https://registry.npm.taobao.org" "--node-gyp=c:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\pangyp\\bin\\node-gyp.js" "install" "-d"
10 error node v0.12.0
11 error npm v2.13.5
12 error path d:\YOHO\yohobuy\package.json
13 error code ENOPACKAGEJSON
14 error errno -4058
15 error package.json ENOENT, open 'd:\YOHO\yohobuy\package.json'
15 error package.json This is most likely not a problem with npm itself.
15 error package.json npm can't find a package.json file in your current directory.
16 verbose exit [ -4058, true ]
... ...
This diff could not be displayed because it is too large.
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);
... ...
/**
* 产品打包入口
* @author: liangzhifeng<zhifeng.liang@yoho.cn>
* @date: 2015/10/20
*/
var $ = require('yoho.zepto'),
Swiper = require('yoho.iswiper'),
lazyLoad = require('yoho.zeptolazyload'),
goodsSwiper;
lazyLoad($('img.lazy'));
goodsSwiper = new Swiper('.banner-swiper', {
loop: true,
pagination: '.banner-top .pagination-inner',
slideElement: 'li',
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev'
});
\ No newline at end of file
... ...
... ... @@ -6,4 +6,5 @@
require('./newsale/newarrival');
require('./newsale/discount');
require('./list');
\ No newline at end of file
require('./list');
require('./detail/detail');
\ No newline at end of file
... ...
/**
* 购物车选择尺寸、颜色和数量面板
* 显示时构造当前商品信息的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
... ...
.brand-page {
.newbrand-search {
width: 93.75%;
height: 30px;
... ...
@import "brand";
.category-page {
font-size: 30rem / $pxConvertRem;
... ...
... ... @@ -43,6 +43,10 @@
white-space: nowrap;
}
}
.brand:nth-child(5n) {
border-right: none;
}
.more {
float: left;
... ...
.good-detail-page {
.banner-top {
position: relative;
.swiper-pagination {
position: absolute;
left: 0;
right: 0;
bottom: 20rem / $pxConvertRem;
text-align: center;
.pagination-inner {
display: inline-block;
span {
display: inline-block;
width: 14rem / $pxConvertRem;
height: 14rem / $pxConvertRem;
background: #fff;
opacity: 0.5;
margin: 0 (9rem / $pxConvertRem);
border-radius: 50%;
}
span.swiper-active-switch {
opacity: 1;
}
}
}
.good-banner-swiper {
height: 598rem / $pxConvertRem;
overflow: hidden;
ul {
position: relative;
height: 100%;
li {
float: left;
height: 100%;
img {
width: 448rem / $pxConvertRem;
height: 100%;
}
}
}
}
}
}
... ...
@import "new-arrival", "discount", "list";
\ No newline at end of file
@import "new-arrival", "discount", "list", "detail";
\ 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;
... ...
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
{{> layout/header}}
<div class="good-detail-page yoho-page">
{{# bannerTop}}
{{> product/banner_swiper_arrow}}
{{/ bannerTop}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -119,6 +119,12 @@
seajs.use('js/product/list');
</script>
{{/if}}
{{!-- 商品详情 --}}
{{#if goodDetail}}
<script>
seajs.use('js/product/detail/detail');
</script>
{{/if}}
{{!-- 品类 --}}
{{#if categoryPage}}
<script>
... ...
<div class="banner-top">
<div class="good-banner-swiper swiper-container">
<ul class="swiper-wrapper">
{{# list}}
<li class="swiper-slide">
<a href="{{url}}">
<img src="{{img}}" alt="">
</a>
</li>
{{/ list}}
</ul>
</div>
<div class="swiper-pagination">
<div class="pagination-inner">
</div>
</div>
<!-- 如果需要导航按钮 -->
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
</div>
\ No newline at end of file
... ...
{{# header}}
<div id="header" class="header clearfix" {{# bgColor}}style="background:{{.}}"{{/ bgColor}}>
<a class="icon-back iconfont" href="javascript:history.go(-1)"></a>
{{title}}
<a class="icon-home iconfont" href="{{homeUrl}}"></a>
</div>
{{/ header}}
... ... @@ -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>
... ...
<?php
use Action\AbstractAction;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
/**
* 商品详情的控制器
*/
class DetailController extends AbstractAction
{
/**
* 商品详情
*
* @param
*/
public function indexAction()
{
$data = array (
'goodDetail' => true,
'bannerTop' => array (
'list' => array (
array (
'url' => '',
'img' => 'http://img10.static.yhbimg.com/adpic/2015/10/15/10/01c161398d3baec2868abe85e26ba1a71d.jpg?imageMogr2/thumbnail/640x300/extent/640x300/background/d2hpdGU=/position/center/quality/90'
),
array (
'url' => '',
'img' => 'http://img13.static.yhbimg.com/adpic/2015/10/15/10/027c45cdc03e23c367ec0ff3d29b7c3f79.jpg?imageMogr2/thumbnail/640x300/extent/640x300/background/d2hpdGU=/position/center/quality/90'
),
array (
'url' => '',
'img' => 'http://img13.static.yhbimg.com/adpic/2015/10/15/10/022e2ac6daa33fc3cb8a0f04025a35994f.jpg?imageMogr2/thumbnail/640x300/extent/640x300/background/d2hpdGU=/position/center/quality/90'
)
)
)
);
$this->_view->assign('title', '商品详情');
//$this->_view->display('brand', compact('brands'));
// 渲染模板
$this->_view->display('index', $data);
}
}
\ No newline at end of file
... ...