Authored by hf

Merge remote-tracking branch 'origin/develop' into test

@@ -10,4 +10,8 @@ npm-debug.log @@ -10,4 +10,8 @@ npm-debug.log
10 composer.lock 10 composer.lock
11 vendor/ 11 vendor/
12 .jscsrc 12 .jscsrc
13 -.jshintrc  
  13 +.jshintrc
  14 +.tags
  15 +.tags_sorted_by_file
  16 +yohobuyP.sublime-project
  17 +yohobuyP.sublime-workspace
  1 +{{> layout/header}}
  2 +<div class="discount-page yoho-page">
  3 + {{# headerBanner}}
  4 + {{> product/banner_swipe_and_single}}
  5 + {{/ headerBanner}}
  6 +
  7 + <ul id="list-nav" class="list-nav clearfix">
  8 + <li class="new active">
  9 + <a href="javascript:void(0);">
  10 + <span class="spanTest">最新</span>
  11 + <span class="iconfont cur">&#xe616;</span>
  12 + </a>
  13 + </li>
  14 + <li class="price">
  15 + <a href="javascript:void(0);">
  16 + <span class="spanTest">价格</span>
  17 + <span class="icon">
  18 + <i class="iconfont up">&#xe615;</i>
  19 + <i class="iconfont down cur">&#xe616;</i>
  20 + </span>
  21 + </a>
  22 + </li>
  23 + <li class="discount">
  24 + <a href="javascript:void(0);">
  25 + <span class="spanTest">折扣</span>
  26 + <span class="icon">
  27 + <i class="iconfont up">&#xe615;</i>
  28 + <i class="iconfont down cur">&#xe616;</i>
  29 + </span>
  30 + </a>
  31 + </li>
  32 + <li class="filter">
  33 + <a href="javascript:void(0);">
  34 + <span class="spanTest">筛选</span>
  35 + <span class="iconfont">&#xe613;</span>
  36 + </a>
  37 + </li>
  38 + </ul>
  39 +
  40 + <div id="goods-container" class="goods-container">
  41 + <div class="new-goods container clearfix">
  42 + {{# goods}}
  43 + {{> good}}
  44 + {{/ goods}}
  45 + </div>
  46 + <div class="price-goods container hide clearfix"></div>
  47 + <div class="discount-goods container hide clearfix"></div>
  48 +
  49 + {{> filter}}
  50 + </div>
  51 +
  52 + {{#if brand}}
  53 + <input id="brand" type="hidden" value={{brand}}>
  54 + {{/if}}
  55 +
  56 + {{#if gender}}
  57 + <input id="gender" type="hidden" value={{gender}}>
  58 + {{/if}}
  59 +
  60 + {{#if sort}}
  61 + <input id="sort" type="hidden" value={{sort}}>
  62 + {{/if}}
  63 +
  64 + {{#if msort}}
  65 + <input id="msort" type="hidden" value={{msort}}>
  66 + {{/if}}
  67 +
  68 + {{#if misort}}
  69 + <input id="misort" type="hidden" value={{misort}}>
  70 + {{/if}}
  71 +
  72 + {{#if color}}
  73 + <input id="color" type="hidden" value={{color}}>
  74 + {{/if}}
  75 +
  76 + {{#if size}}
  77 + <input id="size" type="hidden" value={{size}}>
  78 + {{/if}}
  79 +
  80 + {{#if price}}
  81 + <input id="price" type="hidden" value={{price}}>
  82 + {{/if}}
  83 +
  84 + {{#if p_d}}
  85 + <input id="p_d" type="hidden" value={{p_d}}>
  86 + {{/if}}
  87 +
  88 + {{#if channel}}
  89 + <input id="channel" type="hidden" value={{channel}}>
  90 + {{/if}}
  91 +
  92 + {{#if limit}}
  93 + <input id="limit" type="hidden" value={{limit}}>
  94 + {{/if}}
  95 +
  96 + {{#if page}}
  97 + <input id="page" type="hidden" value={{page}}>
  98 + {{/if}}
  99 +
  100 + {{#if discount}}
  101 + <input id="discount" type="hidden" value={{discount}}>
  102 + {{/if}}
  103 +
  104 + {{> product/suspend-cart}}
  105 +</div>
  106 +{{> layout/footer}}
@@ -70,6 +70,33 @@ class NewsaleController extends AbstractAction @@ -70,6 +70,33 @@ class NewsaleController extends AbstractAction
70 } 70 }
71 71
72 /** 72 /**
  73 + * 热销排行榜
  74 + *
  75 + * @param int channel 1:男生,2:女生,3:潮童,4:创意生活
  76 + */
  77 + public function hotrankAction()
  78 + {
  79 + $this->setTitle('热销排行榜');
  80 + $this->setNavHeader('热销排行榜');
  81 +
  82 + // 设置一些默认参数
  83 + $data = array(
  84 + 'discountPage' => true,
  85 + 'showDownloadApp' => true,
  86 + 'pageFooter' => true,
  87 + 'brand' => '0',
  88 + 'sort' => '0',
  89 + 'gender' => Helpers::getGenderByCookie(),
  90 + 'price' => '0',
  91 + 'size' => '0',
  92 + 'discount' => '0.1,0.9',
  93 + 'cartUrl' => Helpers::url('/cart/index/index', null),
  94 + );
  95 +
  96 + $this->_view->display('hotrank', $data);
  97 + }
  98 +
  99 + /**
73 * Ajax方式筛选新品到着、折扣专区商品 100 * Ajax方式筛选新品到着、折扣专区商品
74 * 101 *
75 * @return array 根据指定条件筛选之后的商品 102 * @return array 根据指定条件筛选之后的商品
@@ -89,6 +89,13 @@ routes.productsale.route.module = Product @@ -89,6 +89,13 @@ routes.productsale.route.module = Product
89 routes.productsale.route.controller = Newsale 89 routes.productsale.route.controller = Newsale
90 routes.productsale.route.action = Discount 90 routes.productsale.route.action = Discount
91 91
  92 +; 热销排行榜
  93 +routes.productsale.type = "rewrite"
  94 +routes.productsale.match = "/hotrank"
  95 +routes.productsale.route.module = Product
  96 +routes.productsale.route.controller = Newsale
  97 +routes.productsale.route.action = Hotrank
  98 +
92 ; 女生首页 99 ; 女生首页
93 routes.girls.type = "rewrite" 100 routes.girls.type = "rewrite"
94 routes.girls.match = "/girl$" 101 routes.girls.match = "/girl$"