Authored by hf

Merge branch 'develop' into test

framework @ 119c247f
1 -Subproject commit 75bbc3b075de19f239532f60c5995d06c5f814e2 1 +Subproject commit 119c247f5cf929aa1e059e40609bb16dd6b58f05
  1 +0 info it worked if it ends with ok
  2 +1 verbose cli [ 'node',
  3 +1 verbose cli 'c:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\npm\\bin\\npm-cli.js',
  4 +1 verbose cli '--userconfig=C:\\Users\\Administrator\\.cnpmrc',
  5 +1 verbose cli '--disturl=https://npm.taobao.org/mirrors/node',
  6 +1 verbose cli '--cache=C:\\Users\\Administrator\\.cnpm',
  7 +1 verbose cli '--registry=https://registry.npm.taobao.org',
  8 +1 verbose cli '--node-gyp=c:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\pangyp\\bin\\node-gyp.js',
  9 +1 verbose cli 'install',
  10 +1 verbose cli '-d' ]
  11 +2 info using npm@2.13.5
  12 +3 info using node@v0.12.0
  13 +4 verbose readDependencies loading dependencies from d:\YOHO\yohobuy\package.json
  14 +5 error install Couldn't read dependencies
  15 +6 verbose stack Error: ENOENT, open 'd:\YOHO\yohobuy\package.json'
  16 +6 verbose stack at Error (native)
  17 +7 verbose cwd d:\YOHO\yohobuy
  18 +8 error Windows_NT 6.1.7601
  19 +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"
  20 +10 error node v0.12.0
  21 +11 error npm v2.13.5
  22 +12 error path d:\YOHO\yohobuy\package.json
  23 +13 error code ENOPACKAGEJSON
  24 +14 error errno -4058
  25 +15 error package.json ENOENT, open 'd:\YOHO\yohobuy\package.json'
  26 +15 error package.json This is most likely not a problem with npm itself.
  27 +15 error package.json npm can't find a package.json file in your current directory.
  28 +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 @@ @@ -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="&#xe619;" 114 <glyph glyph-name="uniE619" unicode="&#xe619;"
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="&#xe61a;"  
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="&#xe61b;" 117 <glyph glyph-name="uniE61B" unicode="&#xe61b;"
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="&#xe625;" horiz-adv-x="1000" 144 <glyph glyph-name="uniE625" unicode="&#xe625;" horiz-adv-x="1000"
148 d="M77 372h873v-109h-873v109z" /> 145 d="M77 372h873v-109h-873v109z" />
  146 + <glyph glyph-name="uniE626" unicode="&#xe626;"
  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);
  1 +/**
  2 + * 产品打包入口
  3 + * @author: liangzhifeng<zhifeng.liang@yoho.cn>
  4 + * @date: 2015/10/20
  5 + */
  6 + var $ = require('yoho.zepto'),
  7 + Swiper = require('yoho.iswiper'),
  8 + lazyLoad = require('yoho.zeptolazyload'),
  9 + goodsSwiper;
  10 +
  11 +lazyLoad($('img.lazy'));
  12 +
  13 +goodsSwiper = new Swiper('.banner-swiper', {
  14 + loop: true,
  15 + pagination: '.banner-top .pagination-inner',
  16 + slideElement: 'li',
  17 + nextButton: '.swiper-button-next',
  18 + prevButton: '.swiper-button-prev'
  19 +});
@@ -7,3 +7,4 @@ @@ -7,3 +7,4 @@
7 require('./newsale/newarrival'); 7 require('./newsale/newarrival');
8 require('./newsale/discount'); 8 require('./newsale/discount');
9 require('./list'); 9 require('./list');
  10 +require('./detail/detail');
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;
1 .brand-page { 1 .brand-page {
2 2
3 -  
4 .newbrand-search { 3 .newbrand-search {
5 width: 93.75%; 4 width: 93.75%;
6 height: 30px; 5 height: 30px;
  1 +@import "brand";
  2 +
1 .category-page { 3 .category-page {
2 font-size: 30rem / $pxConvertRem; 4 font-size: 30rem / $pxConvertRem;
3 5
@@ -44,6 +44,10 @@ @@ -44,6 +44,10 @@
44 } 44 }
45 } 45 }
46 46
  47 + .brand:nth-child(5n) {
  48 + border-right: none;
  49 + }
  50 +
47 .more { 51 .more {
48 float: left; 52 float: left;
49 width: 317rem / $pxConvertRem; 53 width: 317rem / $pxConvertRem;
  1 +.good-detail-page {
  2 + .banner-top {
  3 + position: relative;
  4 + .swiper-pagination {
  5 + position: absolute;
  6 + left: 0;
  7 + right: 0;
  8 + bottom: 20rem / $pxConvertRem;
  9 + text-align: center;
  10 + .pagination-inner {
  11 + display: inline-block;
  12 + span {
  13 + display: inline-block;
  14 + width: 14rem / $pxConvertRem;
  15 + height: 14rem / $pxConvertRem;
  16 + background: #fff;
  17 + opacity: 0.5;
  18 + margin: 0 (9rem / $pxConvertRem);
  19 + border-radius: 50%;
  20 + }
  21 + span.swiper-active-switch {
  22 + opacity: 1;
  23 + }
  24 + }
  25 + }
  26 +
  27 + .good-banner-swiper {
  28 + height: 598rem / $pxConvertRem;
  29 + overflow: hidden;
  30 + ul {
  31 + position: relative;
  32 + height: 100%;
  33 + li {
  34 + float: left;
  35 + height: 100%;
  36 + img {
  37 + width: 448rem / $pxConvertRem;
  38 + height: 100%;
  39 + }
  40 + }
  41 + }
  42 + }
  43 + }
  44 +
  45 +
  46 +}
1 -@import "new-arrival", "discount", "list";  
  1 +@import "new-arrival", "discount", "list", "detail";
@@ -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;
1 -<?php  
2 -  
3 -/*  
4 - * To change this license header, choose License Headers in Project Properties.  
5 - * To change this template file, choose Tools | Templates  
6 - * and open the template in the editor.  
7 - */ 1 +{{> layout/header}}
  2 +<div class="good-detail-page yoho-page">
  3 + {{# bannerTop}}
  4 + {{> product/banner_swiper_arrow}}
  5 + {{/ bannerTop}}
8 6
  7 +</div>
  8 +{{> layout/footer}}
@@ -119,6 +119,12 @@ @@ -119,6 +119,12 @@
119 seajs.use('js/product/list'); 119 seajs.use('js/product/list');
120 </script> 120 </script>
121 {{/if}} 121 {{/if}}
  122 +{{!-- 商品详情 --}}
  123 +{{#if goodDetail}}
  124 +<script>
  125 + seajs.use('js/product/detail/detail');
  126 +</script>
  127 +{{/if}}
122 {{!-- 品类 --}} 128 {{!-- 品类 --}}
123 {{#if categoryPage}} 129 {{#if categoryPage}}
124 <script> 130 <script>
  1 +<div class="banner-top">
  2 + <div class="good-banner-swiper swiper-container">
  3 + <ul class="swiper-wrapper">
  4 + {{# list}}
  5 + <li class="swiper-slide">
  6 + <a href="{{url}}">
  7 + <img src="{{img}}" alt="">
  8 + </a>
  9 + </li>
  10 + {{/ list}}
  11 + </ul>
  12 + </div>
  13 + <div class="swiper-pagination">
  14 + <div class="pagination-inner">
  15 + </div>
  16 + </div>
  17 +
  18 + <!-- 如果需要导航按钮 -->
  19 + <div class="swiper-button-prev"></div>
  20 + <div class="swiper-button-next"></div>
  21 +</div>
1 -{{# header}}  
2 -<div id="header" class="header clearfix" {{# bgColor}}style="background:{{.}}"{{/ bgColor}}>  
3 - <a class="icon-back iconfont" href="javascript:history.go(-1)"></a>  
4 - {{title}}  
5 - <a class="icon-home iconfont" href="{{homeUrl}}"></a>  
6 -</div>  
7 -{{/ header}}  
@@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
13 </p> 13 </p>
14 </div> 14 </div>
15 </div> 15 </div>
  16 + <div class="chose-items">
16 <div class="color-list"> 17 <div class="color-list">
17 <span>颜色</span> 18 <span>颜色</span>
18 <ul class="clearfix" data-type="color"> 19 <ul class="clearfix" data-type="color">
@@ -46,6 +47,7 @@ @@ -46,6 +47,7 @@
46 </div> 47 </div>
47 </div> 48 </div>
48 </div> 49 </div>
  50 + </div>
49 <div class="btn-wrap"> 51 <div class="btn-wrap">
50 <button id="chose-btn-sure" class="btn btn-sure">确定</button> 52 <button id="chose-btn-sure" class="btn btn-sure">确定</button>
51 </div> 53 </div>
1 <?php 1 <?php
  2 +use Action\AbstractAction;
2 3
3 -/*  
4 - * To change this license header, choose License Headers in Project Properties.  
5 - * To change this template file, choose Tools | Templates  
6 - * and open the template in the editor. 4 +/**
  5 + * 商品详情的控制器
7 */ 6 */
  7 +class DetailController extends AbstractAction
  8 +{
  9 + /**
  10 + * 商品详情
  11 + *
  12 + * @param
  13 + */
  14 + public function indexAction()
  15 + {
  16 + $data = array (
  17 + 'goodDetail' => true,
  18 + 'bannerTop' => array (
  19 + 'list' => array (
  20 + array (
  21 + 'url' => '',
  22 + 'img' => 'http://img10.static.yhbimg.com/adpic/2015/10/15/10/01c161398d3baec2868abe85e26ba1a71d.jpg?imageMogr2/thumbnail/640x300/extent/640x300/background/d2hpdGU=/position/center/quality/90'
  23 + ),
  24 + array (
  25 + 'url' => '',
  26 + 'img' => 'http://img13.static.yhbimg.com/adpic/2015/10/15/10/027c45cdc03e23c367ec0ff3d29b7c3f79.jpg?imageMogr2/thumbnail/640x300/extent/640x300/background/d2hpdGU=/position/center/quality/90'
  27 + ),
  28 + array (
  29 + 'url' => '',
  30 + 'img' => 'http://img13.static.yhbimg.com/adpic/2015/10/15/10/022e2ac6daa33fc3cb8a0f04025a35994f.jpg?imageMogr2/thumbnail/640x300/extent/640x300/background/d2hpdGU=/position/center/quality/90'
  31 + )
  32 + )
  33 + )
  34 + );
  35 +
  36 + $this->_view->assign('title', '商品详情');
  37 + //$this->_view->display('brand', compact('brands'));
8 38
  39 + // 渲染模板
  40 + $this->_view->display('index', $data);
  41 + }
  42 +}