Showing
16 changed files
with
176 additions
and
23 deletions
framework @ 119c247f
npm-debug.log
0 → 100644
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.
static/js/product/detail/detail.js
0 → 100644
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 | +}); |
static/sass/product/_detail.scss
0 → 100644
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 | -<?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 | <?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 | +} |
-
Please register or login to post a comment