Authored by xuqi

product list

@@ -65,7 +65,7 @@ @@ -65,7 +65,7 @@
65 ## 搜索页 65 ## 搜索页
66 66
67 { 67 {
68 - products: { 68 + search: {
69 //路径导航 69 //路径导航
70 pathNav: [...], 70 pathNav: [...],
71 71
  1 +{{> layout/header}}
  2 +<div class="product-list-page yoho-page">
  3 + {{# list}}
  4 + {{# brandBanner}}
  5 + <div class="brand-banner">
  6 + <div class="banner-img" style="background: url({{banner}})"></div>
  7 + <p>
  8 + <a href="{{brandHome}}">
  9 + <i class="iconfont"></i>
  10 + 品牌首页
  11 + </a>
  12 + <a href="{{brandIntro}}">
  13 + <i class="iconfont"></i>
  14 + 品牌介绍
  15 + </a>
  16 + <span class="iconfont{{#if coled}} coled{{/if}}"></span>
  17 + </p>
  18 + </div>
  19 + {{/ brandBanner}}
  20 +
  21 + <div class="center-content clearfix">
  22 + {{> layout/path-nav}}
  23 +
  24 + <div class="list-left pull-left"></div>
  25 + <div class="list-right pull-right">
  26 + {{# filters}}
  27 + {{> product/filter-box}}
  28 + {{/ filters}}
  29 +
  30 + {{# opts}}
  31 + {{> product/sort-pager}}
  32 + {{/ opts}}
  33 +
  34 + <div class="goods-container clearfix">
  35 + {{#each goods}}
  36 + {{> product/good}}
  37 + {{/each}}
  38 + </div>
  39 + </div>
  40 + </div>
  41 + {{/ list}}
  42 +</div>
  43 +{{> layout/footer}}
1 {{> layout/header}} 1 {{> layout/header}}
2 <div class="product-search-page yoho-page center-content"> 2 <div class="product-search-page yoho-page center-content">
3 - {{# products}} 3 + {{# search}}
4 {{> layout/path-nav}} 4 {{> layout/path-nav}}
5 5
6 {{# filters}} 6 {{# filters}}
@@ -20,6 +20,6 @@ @@ -20,6 +20,6 @@
20 <div class="good-select-color"></div> 20 <div class="good-select-color"></div>
21 </div> 21 </div>
22 </div> 22 </div>
23 - {{/ products}} 23 + {{/ search}}
24 </div> 24 </div>
25 {{> layout/footer}} 25 {{> layout/footer}}
@@ -56,6 +56,14 @@ a { @@ -56,6 +56,14 @@ a {
56 display: none !important; 56 display: none !important;
57 } 57 }
58 58
  59 +.pull-left {
  60 + float: left;
  61 +}
  62 +
  63 +.pull-right {
  64 + float: right;
  65 +}
  66 +
59 a:focus { 67 a:focus {
60 outline: none; 68 outline: none;
61 } 69 }
  1 +.product-search-page {
  2 + .list-left {
  3 + width: 160px;
  4 + }
  5 +
  6 + .list-right {
  7 + width: 970px;
  8 + }
  9 +}
@@ -6,14 +6,14 @@ use Plugin\Helpers; @@ -6,14 +6,14 @@ use Plugin\Helpers;
6 class IndexController extends AbstractAction 6 class IndexController extends AbstractAction
7 { 7 {
8 /** 8 /**
9 - * 商品列表 9 + * 商品搜索
10 */ 10 */
11 - public function indexAction() 11 + public function searchAction()
12 { 12 {
13 $data = array( 13 $data = array(
14 'searchListPage' => true, 14 'searchListPage' => true,
15 15
16 - 'products' => array( 16 + 'search' => array(
17 'pathNav' => array( 17 'pathNav' => array(
18 array( 18 array(
19 'href' => 'm.yohobuy.com', 19 'href' => 'm.yohobuy.com',
@@ -376,6 +376,379 @@ class IndexController extends AbstractAction @@ -376,6 +376,379 @@ class IndexController extends AbstractAction
376 $this->_view->display('search', $data); 376 $this->_view->display('search', $data);
377 } 377 }
378 378
  379 +
  380 + /**
  381 + * 商品列表
  382 + */
  383 + public function listAction()
  384 + {
  385 + $data = array(
  386 + 'searchListPage' => true,
  387 +
  388 + 'list' => array(
  389 + 'pathNav' => array(
  390 + array(
  391 + 'href' => 'new.yohobuy.com/girls',
  392 + 'name' => 'GRILS首页'
  393 + ),
  394 + array(
  395 + 'href' => '/?sort=1',
  396 + 'name' => '包类/装备'
  397 + )
  398 + ),
  399 + 'filters' => array(
  400 + 'checkedConditions' => array(
  401 + 'conditions' => array(
  402 + array(
  403 + 'href' => '',
  404 + 'name' => '暗黑'
  405 + ),
  406 + array(
  407 + 'href' => '',
  408 + 'color' => '#f00'
  409 + ),
  410 + array(
  411 + 'href' => '',
  412 + 'name' => 'CLOT'
  413 + )
  414 + ),
  415 + 'clearUrl' => ''
  416 + ),
  417 + 'channel' => array(
  418 + array(
  419 + 'href' => '/?gender=1,3',
  420 + 'name' => 'BOYS'
  421 + ),
  422 + array(
  423 + 'href' => '/?gender=2,3',
  424 + 'name' => 'GIRLS'
  425 + ),
  426 + array(
  427 + 'href' => '',
  428 + 'name' => 'KIDS'
  429 + ),
  430 + array(
  431 + 'href' => '',
  432 + 'name' => 'LIFESTYLE'
  433 + )
  434 + ),
  435 + 'sort' => array(
  436 + array(
  437 + 'id' => '1',
  438 + 'name' => '上衣',
  439 + 'sub' => array(
  440 + array(
  441 + 'href' => '',
  442 + 'name' => 'T恤'
  443 + ),
  444 + array(
  445 + 'href' => '',
  446 + 'name' => '棉袄'
  447 + ),
  448 + array(
  449 + 'href' => '',
  450 + 'name' => '外套'
  451 + )
  452 + )
  453 + ),
  454 + array(
  455 + 'id' => '2',
  456 + 'name' => '裤子'
  457 + ),
  458 + array(
  459 + 'id' => '3',
  460 + 'name' => '连衣裙'
  461 + ),
  462 + array(
  463 + 'id' => '4',
  464 + 'name' => '鞋'
  465 + )
  466 + ),
  467 + 'brand' => array(
  468 + 'default' => array(
  469 + array(
  470 + 'href' => '',
  471 + 'name' => 'CLOT'
  472 + ),
  473 + array(
  474 + 'href' => '',
  475 + 'name' => 'ABLE JEANS'
  476 + ),
  477 + array(
  478 + 'href' => '',
  479 + 'name' => 'Eight Guys'
  480 + ),
  481 + array(
  482 + 'href' => '',
  483 + 'name' => 'FAIRWHALE JEANS'
  484 + ),
  485 + array(
  486 + 'href' => '',
  487 + 'name' => '鬼洗'
  488 + ),
  489 + array(
  490 + 'href' => '',
  491 + 'name' => '金银帝国Imperial Taels'
  492 + ),
  493 + array(
  494 + 'href' => '',
  495 + 'name' => 'F.L.Y.D'
  496 + ),
  497 + array(
  498 + 'href' => '',
  499 + 'name' => 'Tapenade特芙娜'
  500 + ),
  501 + array(
  502 + 'href' => '',
  503 + 'name' => 'Adidas Originals'
  504 + )
  505 + ),
  506 + 'brandIndex' => array(
  507 + array(
  508 + 'index' => 'all',
  509 + 'name' => '全部'
  510 + ),
  511 + array(
  512 + 'index' => '0-9',
  513 + 'name' => '0 ~ 9'
  514 + ),
  515 + array(
  516 + 'index' => 'a',
  517 + 'name' => 'A'
  518 + )
  519 + ),
  520 + 'brandsShow' => array(
  521 + array(
  522 + 'id' => '1',
  523 + 'href' => '',
  524 + 'index' => '0-9',
  525 + 'name' => '5cm',
  526 + 'key' => '5cm'
  527 + ),
  528 + array(
  529 + 'id' => '2',
  530 + 'href' => '',
  531 + 'index' => 'k',
  532 + 'name' => 'KTZ',
  533 + 'key' => 'ktz'
  534 + ),
  535 + array(
  536 + 'id' => '3',
  537 + 'href' => '',
  538 + 'index' => 't',
  539 + 'name' => 'Tapenade特芙娜',
  540 + 'key' => 'tapenade特芙娜'
  541 + ),
  542 + array(
  543 + 'id' => '4',
  544 + 'href' => '',
  545 + 'index' => 'j',
  546 + 'name' => '金银帝国Imperial Taels',
  547 + 'key' => '金银帝国imperial taels'
  548 + ),
  549 + array(
  550 + 'id' => '5',
  551 + 'href' => '',
  552 + 'index' => 'a',
  553 + 'name' => 'ABLE JEANS',
  554 + 'key' => 'able jeans'
  555 + )
  556 + )
  557 + ),
  558 + 'price' => array(
  559 + array(
  560 + 'href' => '',
  561 + 'name' => '0-239'
  562 + ),
  563 + array(
  564 + 'href' => '',
  565 + 'name' => '240-329'
  566 + )
  567 + ),
  568 + 'color' => array(
  569 + array(
  570 + 'href' => '',
  571 + 'name' => '黑色',
  572 + 'rgb' => '#000'
  573 + ),
  574 + array(
  575 + 'href' => '',
  576 + 'name' => '红色',
  577 + 'rgb' => '#f00'
  578 + )
  579 + ),
  580 + 'size' => array(
  581 + array(
  582 + 'href' => '',
  583 + 'name' => 'S'
  584 + ),
  585 + array(
  586 + 'href' => '',
  587 + 'name' => 'L'
  588 + )
  589 + ),
  590 + 'seniorChose' => array(
  591 + array(
  592 + 'attr' => 'style',
  593 + 'name' => '风格',
  594 + 'showMulti' => true,
  595 + 'sub' => array(
  596 + array(
  597 + 'id' => '1',
  598 + 'href' => '',
  599 + 'name' => '街头'
  600 + ),
  601 + array(
  602 + 'id' => '2',
  603 + 'href' => '',
  604 + 'name' => '简约'
  605 + )
  606 + )
  607 + ),
  608 + array(
  609 + 'attr' => 'weather',
  610 + 'name' => '适用季节',
  611 + 'sub' => array(
  612 + array(
  613 + 'id' => '1',
  614 + 'href' => '',
  615 + 'name' => '春天'
  616 + ),
  617 + array(
  618 + 'id' => '2',
  619 + 'href' => '',
  620 + 'name' => '夏天'
  621 + )
  622 + )
  623 + )
  624 + )
  625 + ),
  626 + 'opts' => array(
  627 + 'sortType' => array(
  628 + array(
  629 + 'href' => '',
  630 + 'name' => '默认'
  631 + ),
  632 + array(
  633 + 'active' => true,
  634 + 'href' => '',
  635 + 'name' => '最新',
  636 + 'hasSortOrient' => true,
  637 + 'desc' => true
  638 + ),
  639 + array(
  640 + 'href' => '',
  641 + 'name' => '价格',
  642 + 'hasSortOrient' => true
  643 + ),
  644 + array(
  645 + 'href' => '',
  646 + 'name' => '折扣',
  647 + 'hasSortOrient' => true
  648 + )
  649 + ),
  650 + 'checks' => array(
  651 + array(
  652 + 'name' => '新品',
  653 + 'checked' => true,
  654 + 'href' => ''
  655 + ),
  656 + array(
  657 + 'name' => '打折',
  658 + 'href' => ''
  659 + ),
  660 + array(
  661 + 'name' => '限量',
  662 + 'checked' => true,
  663 + 'href' => ''
  664 + )
  665 + ),
  666 + 'fivePerLine' => true,
  667 + 'sixPerLineHref' => '',
  668 + 'countPerPage' => '120',
  669 + 'pageCounts' => array(
  670 + array(
  671 + 'href' => '',
  672 + 'count' => 60
  673 + ),
  674 + array(
  675 + 'href' => '',
  676 + 'count' => 100
  677 + ),
  678 + array(
  679 + 'href' => '',
  680 + 'count' => 120
  681 + )
  682 + ),
  683 + 'curPage' => 1,
  684 + 'pageCount' => 30,
  685 + 'nextHref' => 'hello'
  686 + ),
  687 + 'goods' => array(
  688 + array(
  689 + 'tags' => array(
  690 + 'isNew' => true,
  691 + 'isYearEndPromotion' => true
  692 + ),
  693 + 'url' => 'http://adidas.yohobuy.com/?gender=1,3',
  694 + 'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
  695 + 'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
  696 + 'salePrice' => '899',
  697 + 'isFew' => true
  698 + ),
  699 + array(
  700 + 'tags' => array(
  701 + 'isNew' => true,
  702 + 'isReNew' => true
  703 + ),
  704 + 'url' => 'http://adidas.yohobuy.com/?gender=1,3',
  705 + 'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
  706 + 'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
  707 + 'salePrice' => '899',
  708 + 'showColBtn' => true
  709 + ),
  710 + array(
  711 + 'tags' => array(
  712 + 'isNew' => true,
  713 + 'isReNew' => true
  714 + ),
  715 + 'url' => 'http://adidas.yohobuy.com/?gender=1,3',
  716 + 'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
  717 + 'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
  718 + 'salePrice' => '899'
  719 + ),
  720 + array(
  721 + 'url' => 'http://adidas.yohobuy.com/?gender=1,3',
  722 + 'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
  723 + 'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
  724 + 'salePrice' => '899'
  725 + ),
  726 + array(
  727 + 'tags' => array(
  728 + 'isNew' => true,
  729 + 'isReNew' => true
  730 + ),
  731 + 'url' => 'http://adidas.yohobuy.com/?gender=1,3',
  732 + 'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
  733 + 'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
  734 + 'salePrice' => '899'
  735 + ),
  736 + array(
  737 + 'tags' => array(
  738 + 'isNew' => true,
  739 + 'isReNew' => true
  740 + ),
  741 + 'url' => 'http://adidas.yohobuy.com/?gender=1,3',
  742 + 'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
  743 + 'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
  744 + 'salePrice' => '899'
  745 + )
  746 + )
  747 + )
  748 + );
  749 + $this->_view->display('list', $data);
  750 + }
  751 +
379 /* 752 /*
380 * 获取商品颜色 753 * 获取商品颜色
381 */ 754 */