Authored by 梁志锋

Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop

@@ -9,9 +9,6 @@ use Plugin\Helpers; @@ -9,9 +9,6 @@ use Plugin\Helpers;
9 */ 9 */
10 class FloorProcess 10 class FloorProcess
11 { 11 {
12 -  
13 - private static $guangUrl = 'http://guang.m.yohobuy.com';  
14 -  
15 /** 12 /**
16 * 频道参数 13 * 频道参数
17 * 14 *
@@ -209,6 +206,7 @@ class FloorProcess @@ -209,6 +206,7 @@ class FloorProcess
209 foreach ($data['list'] as &$one) { 206 foreach ($data['list'] as &$one) {
210 if (isset($one['url'])) { 207 if (isset($one['url'])) {
211 $one['url'] = Helpers::getFilterUrl($one['url']); 208 $one['url'] = Helpers::getFilterUrl($one['url']);
  209 + isset(self::$channel[$type]) && $one['url'] .= '?gender='.self::$channel[$type];
212 } 210 }
213 $one['img'] = Helpers::getImageUrl($one['src'], 158, 174); 211 $one['img'] = Helpers::getImageUrl($one['src'], 158, 174);
214 unset($one['src']); 212 unset($one['src']);
@@ -3,7 +3,6 @@ @@ -3,7 +3,6 @@
3 * @author: xuqi<qi.xu@yoho.cn> 3 * @author: xuqi<qi.xu@yoho.cn>
4 * @date: 2015/10/20 4 * @date: 2015/10/20
5 */ 5 */
6 -  
7 var $ = require('yoho.zepto'), 6 var $ = require('yoho.zepto'),
8 Swiper = require('yoho.iswiper'), 7 Swiper = require('yoho.iswiper'),
9 lazyLoad = require('yoho.zeptolazyload'); 8 lazyLoad = require('yoho.zeptolazyload');
@@ -274,7 +274,6 @@ $listNav.delegate('li', 'tap', function() { @@ -274,7 +274,6 @@ $listNav.delegate('li', 'tap', function() {
274 274
275 $pre.removeClass('active'); 275 $pre.removeClass('active');
276 $this.addClass('active'); 276 $this.addClass('active');
277 -  
278 filter.showFilter(); 277 filter.showFilter();
279 } 278 }
280 } else { 279 } else {
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 position: absolute; 2 position: absolute;
3 left: 0; 3 left: 0;
4 right: 0; 4 right: 0;
5 - top: 0; 5 + top: 2px;
6 } 6 }
7 7
8 .filter-mask { 8 .filter-mask {
@@ -40,6 +40,7 @@ @@ -40,6 +40,7 @@
40 overflow: hidden; 40 overflow: hidden;
41 white-space: nowrap; 41 white-space: nowrap;
42 text-overflow: ellipsis; 42 text-overflow: ellipsis;
  43 + color: #333;
43 } 44 }
44 45
45 .default { 46 .default {
1 .good-info { 1 .good-info {
2 float: left; 2 float: left;
3 - width: 44%; 3 + width: 46.4%;
4 height: 486rem / $pxConvertRem; 4 height: 486rem / $pxConvertRem;
5 - margin: 28rem / $pxConvertRem 3% 0; 5 + margin: 28rem / $pxConvertRem 0 0 2.4%;
6 6
7 7
8 .tag-container { 8 .tag-container {
@@ -24,6 +24,10 @@ $clothes: sprite-map("guang/clothes/*.png"); @@ -24,6 +24,10 @@ $clothes: sprite-map("guang/clothes/*.png");
24 } 24 }
25 25
26 .guang-detail-page { 26 .guang-detail-page {
  27 + #wrapper {
  28 + background: #f0f0f0;
  29 + }
  30 +
27 #wrapper.ios { 31 #wrapper.ios {
28 position: absolute; 32 position: absolute;
29 top: 0; 33 top: 0;
@@ -73,6 +73,7 @@ @@ -73,6 +73,7 @@
73 73
74 .info-list-container { 74 .info-list-container {
75 overflow-x: hidden; 75 overflow-x: hidden;
  76 + background: #f0f0f0;
76 } 77 }
77 78
78 .info-list.hide { 79 .info-list.hide {
@@ -29,8 +29,8 @@ @@ -29,8 +29,8 @@
29 } 29 }
30 } */ 30 } */
31 .home-header { 31 .home-header {
32 - height: 88rem / $pxConvertRem;  
33 - line-height: 88rem / $pxConvertRem; 32 + height: 90rem / $pxConvertRem;
  33 + line-height: 90rem / $pxConvertRem;
34 @include background-image(linear-gradient(#323232, #414141)); 34 @include background-image(linear-gradient(#323232, #414141));
35 position: relative; 35 position: relative;
36 .iconfont { 36 .iconfont {
@@ -14,16 +14,18 @@ @@ -14,16 +14,18 @@
14 border-right: 1px solid #e0e0e0; 14 border-right: 1px solid #e0e0e0;
15 border-top: 1px solid #e0e0e0; 15 border-top: 1px solid #e0e0e0;
16 overflow: hidden; 16 overflow: hidden;
  17 + background: #fff;
17 18
18 .brand-logo { 19 .brand-logo {
19 - width: 100%; 20 + display: table-cell;
  21 + width: 3.95rem;
20 height: 128rem / $pxConvertRem; 22 height: 128rem / $pxConvertRem;
21 line-height: 128rem / $pxConvertRem; 23 line-height: 128rem / $pxConvertRem;
22 text-align: center; 24 text-align: center;
23 font-size: 0; 25 font-size: 0;
  26 + vertical-align: middle;
24 27
25 img { 28 img {
26 - vertical-align: middle;  
27 max-width: 100%; 29 max-width: 100%;
28 max-height: 100%; 30 max-height: 100%;
29 } 31 }
@@ -52,7 +54,8 @@ @@ -52,7 +54,8 @@
52 width: 317rem / $pxConvertRem; 54 width: 317rem / $pxConvertRem;
53 height: 174rem / $pxConvertRem; 55 height: 174rem / $pxConvertRem;
54 border-top: 1px solid #e0e0e0; 56 border-top: 1px solid #e0e0e0;
55 - 57 + background: #fff;
  58 +
56 a { 59 a {
57 display: block; 60 display: block;
58 width: 100%; 61 width: 100%;
@@ -68,7 +71,7 @@ @@ -68,7 +71,7 @@
68 background: #fff; 71 background: #fff;
69 width: 100%; 72 width: 100%;
70 height: 140rem / $pxConvertRem; 73 height: 140rem / $pxConvertRem;
71 - margin-bottom: 28rem / $pxConvertRem; 74 + // margin-bottom: 28rem / $pxConvertRem;
72 border-top: 1px solid #e0e0e0; 75 border-top: 1px solid #e0e0e0;
73 overflow: hidden; 76 overflow: hidden;
74 77
@@ -30,11 +30,11 @@ @@ -30,11 +30,11 @@
30 30
31 .nav-icon, .nav-img { 31 .nav-icon, .nav-img {
32 position: absolute; 32 position: absolute;
33 - width: 60rem / $pxConvertRem;  
34 - height: 60rem / $pxConvertRem; 33 + width: 48rem / $pxConvertRem;
  34 + height: 48rem / $pxConvertRem;
35 top: 50%; 35 top: 50%;
36 - margin-top: -30rem / $pxConvertRem;  
37 - left: 24rem / $pxConvertRem; 36 + margin-top: -24rem / $pxConvertRem;
  37 + left: 30rem / $pxConvertRem;
38 } 38 }
39 39
40 .enter-subnav { 40 .enter-subnav {
@@ -4,8 +4,8 @@ @@ -4,8 +4,8 @@
4 color: #fff; 4 color: #fff;
5 width: 100%; 5 width: 100%;
6 overflow: hidden; 6 overflow: hidden;
7 - height: 88rem / $pxConvertRem;  
8 - line-height: 88rem / $pxConvertRem; 7 + height: 90rem / $pxConvertRem;
  8 + line-height: 90rem / $pxConvertRem;
9 9
10 &.boys { 10 &.boys {
11 @include background-image(linear-gradient(#323232, #414141)); 11 @include background-image(linear-gradient(#323232, #414141));
1 .discount-page { 1 .discount-page {
2 - background-color: #f0f0f0; 2 + background-color: #fff;
3 3
4 .swiper-container { 4 .swiper-container {
5 width: 100%; 5 width: 100%;
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 23
24 .banner-top-single{ 24 .banner-top-single{
25 width: 100%; 25 width: 100%;
26 - height: 240rem / $pxConvertRem; 26 + height: 200rem / $pxConvertRem;
27 img { 27 img {
28 display: block; 28 display: block;
29 height: 100%; 29 height: 100%;
@@ -32,6 +32,7 @@ @@ -32,6 +32,7 @@
32 } 32 }
33 33
34 .list-nav { 34 .list-nav {
  35 + border:1px solid #e6e6e6;
35 > li { 36 > li {
36 float: left; 37 float: left;
37 width: 25%; 38 width: 25%;
@@ -50,9 +51,14 @@ @@ -50,9 +51,14 @@
50 } 51 }
51 52
52 .active > a { 53 .active > a {
53 - border-bottom: 2px solid #000;  
54 color: #000; 54 color: #000;
55 - 55 + .spanTest{
  56 + width: auto;
  57 + height: 100%;
  58 + border-bottom: 2px solid #000;
  59 + display: inline-block;
  60 + box-sizing:border-box;
  61 + }
56 .iconfont { 62 .iconfont {
57 color: #999; 63 color: #999;
58 64
1 .newarrival-page { 1 .newarrival-page {
2 - background-color: #f0f0f0; 2 + background-color: #fff;
3 3
4 .swiper-container { 4 .swiper-container {
5 width: 100%; 5 width: 100%;
6 - height: 240rem / $pxConvertRem; 6 + height: 310rem / $pxConvertRem;
7 7
8 img { 8 img {
9 height: 100%; 9 height: 100%;
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 23
24 .banner-top-single{ 24 .banner-top-single{
25 width: 100%; 25 width: 100%;
26 - height: 240rem / $pxConvertRem; 26 + height: 200rem / $pxConvertRem;
27 img { 27 img {
28 display: block; 28 display: block;
29 height: 100%; 29 height: 100%;
@@ -32,6 +32,7 @@ @@ -32,6 +32,7 @@
32 } 32 }
33 33
34 .list-nav { 34 .list-nav {
  35 + border:1px solid #e6e6e6;
35 > li { 36 > li {
36 float: left; 37 float: left;
37 width: 25%; 38 width: 25%;
@@ -39,12 +40,13 @@ @@ -39,12 +40,13 @@
39 line-height: 33px; 40 line-height: 33px;
40 text-align: center; 41 text-align: center;
41 font-size: 14px; 42 font-size: 14px;
  43 + color: #999;
42 } 44 }
43 45
44 a { 46 a {
45 - display: block; 47 + display: inline-block;
46 box-sizing: border-box; 48 box-sizing: border-box;
47 - width: 100%; 49 + width: auto;
48 height: 100%; 50 height: 100%;
49 color: #999; 51 color: #999;
50 } 52 }
@@ -52,15 +54,14 @@ @@ -52,15 +54,14 @@
52 .active > a { 54 .active > a {
53 border-bottom: 2px solid #000; 55 border-bottom: 2px solid #000;
54 color: #000; 56 color: #000;
55 -  
56 - .iconfont {  
57 - color: #999;  
58 - 57 + box-sizing:border-box;
  58 + }
  59 + .active > .iconfont {
  60 + color: #000;
59 &.cur { 61 &.cur {
60 color: #000; 62 color: #000;
61 } 63 }
62 } 64 }
63 - }  
64 65
65 .filter .iconfont { 66 .filter .iconfont {
66 font-size: 12px; 67 font-size: 12px;
@@ -22,8 +22,8 @@ @@ -22,8 +22,8 @@
22 <li class="filter"> 22 <li class="filter">
23 <a href="javascript:void(0);"> 23 <a href="javascript:void(0);">
24 筛选 24 筛选
25 - <span class="iconfont">&#xe613;</span>  
26 </a> 25 </a>
  26 + <span class="iconfont">&#xe613;</span>
27 </li> 27 </li>
28 </ul> 28 </ul>
29 29
@@ -7,13 +7,13 @@ @@ -7,13 +7,13 @@
7 <ul id="list-nav" class="list-nav clearfix"> 7 <ul id="list-nav" class="list-nav clearfix">
8 <li class="new active"> 8 <li class="new active">
9 <a href="javascript:void(0);"> 9 <a href="javascript:void(0);">
10 - 最新 10 + <span class="spanTest">最新</span>
11 <span class="iconfont cur">&#xe616;</span> 11 <span class="iconfont cur">&#xe616;</span>
12 </a> 12 </a>
13 </li> 13 </li>
14 <li class="price"> 14 <li class="price">
15 <a href="javascript:void(0);"> 15 <a href="javascript:void(0);">
16 - 价格 16 + <span class="spanTest">价格</span>
17 <span class="icon"> 17 <span class="icon">
18 <i class="iconfont up">&#xe615;</i> 18 <i class="iconfont up">&#xe615;</i>
19 <i class="iconfont down cur">&#xe616;</i> 19 <i class="iconfont down cur">&#xe616;</i>
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 </li> 22 </li>
23 <li class="discount"> 23 <li class="discount">
24 <a href="javascript:void(0);"> 24 <a href="javascript:void(0);">
25 - 折扣 25 + <span class="spanTest">折扣</span>
26 <span class="icon"> 26 <span class="icon">
27 <i class="iconfont up">&#xe615;</i> 27 <i class="iconfont up">&#xe615;</i>
28 <i class="iconfont down cur">&#xe616;</i> 28 <i class="iconfont down cur">&#xe616;</i>
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 </li> 31 </li>
32 <li class="filter"> 32 <li class="filter">
33 <a href="javascript:void(0);"> 33 <a href="javascript:void(0);">
34 - 筛选 34 + <span class="spanTest">筛选</span>
35 <span class="iconfont">&#xe613;</span> 35 <span class="iconfont">&#xe613;</span>
36 </a> 36 </a>
37 </li> 37 </li>
@@ -203,20 +203,9 @@ class SearchController extends AbstractAction @@ -203,20 +203,9 @@ class SearchController extends AbstractAction
203 203
204 // 转换排序方式 204 // 转换排序方式
205 $page = $this->get('page', 1); 205 $page = $this->get('page', 1);
206 - $order = $this->get('order', 0); 206 + $orderVal = $this->get('order', 0);
207 $type = $this->get('type', ''); 207 $type = $this->get('type', '');
208 - switch ($type) {  
209 - case 'price':  
210 - $order = ($order == 0) ? 's_p_desc' : 's_p_asc';  
211 - break;  
212 - case 'discount':  
213 - $order = ($order == 0) ? 'p_d_desc' : 'p_d_asc';  
214 - break;  
215 - case 'newest':  
216 - default:  
217 - $order = ($order == 0) ? 's_t_desc' : 's_t_asc';  
218 - break;  
219 - } 208 + $order = Helpers::transOrder($orderVal, $type);
220 209
221 $data = array(); 210 $data = array();
222 // 查询品类或品牌数据 211 // 查询品类或品牌数据
@@ -258,6 +247,56 @@ class SearchController extends AbstractAction @@ -258,6 +247,56 @@ class SearchController extends AbstractAction
258 } 247 }
259 248
260 /** 249 /**
  250 + * Ajax异步获取筛选数据
  251 + * @return array 筛选数据
  252 + */
  253 + public function filterAction()
  254 + {
  255 + if ($this->isAjax()) {
  256 + // 过滤请求参数
  257 + $condition = filter_input_array(INPUT_GET, array(
  258 + 'query' => FILTER_DEFAULT,
  259 + 'brand' => FILTER_VALIDATE_INT,
  260 + 'sort' => FILTER_DEFAULT,
  261 + 'msort' => FILTER_VALIDATE_INT,
  262 + 'misort' => FILTER_VALIDATE_INT,
  263 + 'color' => FILTER_VALIDATE_INT,
  264 + 'size' => FILTER_VALIDATE_INT,
  265 + 'price' => FILTER_VALIDATE_INT,
  266 + 'discount' => FILTER_DEFAULT,
  267 + 'gender' => FILTER_DEFAULT,
  268 + 'p_d' => FILTER_DEFAULT,), false);
  269 +
  270 + if (isset($condition['sort'])) {
  271 + $condition['sort'] = rawurldecode($condition['sort']);
  272 + }
  273 + if (isset($condition['discount'])) {
  274 + $condition['p_d'] = rawurldecode($condition['discount']);
  275 + unset($condition['discount']);
  276 + }
  277 + if (isset($condition['gender'])) {
  278 + $condition['gender'] = rawurldecode($condition['gender']);
  279 + }
  280 +
  281 + $data = array();
  282 + $listData = SearchData::searchByCondition($condition);
  283 + // 处理返回的数据
  284 + if (isset($listData['data']) && isset($listData['data']['filter'])) {
  285 + $data['filter'] = ListProcess::getFilterData($listData['data']['filter']);
  286 + }
  287 + $listData = array();
  288 +
  289 + if (empty($data)) {
  290 + echo ' ';
  291 + } else {
  292 + $this->_view->display('filter', $data);
  293 + }
  294 + } else {
  295 + echo ' ';
  296 + }
  297 + }
  298 +
  299 + /**
261 * 模糊搜索指定字符 300 * 模糊搜索指定字符
262 * 301 *
263 * @return array 模糊搜索的结果 302 * @return array 模糊搜索的结果
@@ -46,7 +46,7 @@ class ClassModel @@ -46,7 +46,7 @@ class ClassModel
46 $oneClass = array(); 46 $oneClass = array();
47 $item = array(); 47 $item = array();
48 foreach ($data['data'] as $k => $v) { 48 foreach ($data['data'] as $k => $v) {
49 - $oneClass = array('name' => $k, 'ca' => array()); 49 + $oneClass = array('name' => ucfirst($k), 'ca' => array());
50 50
51 foreach ($v as $val) { 51 foreach ($v as $val) {
52 $item = array(); 52 $item = array();
@@ -48,7 +48,7 @@ class SideModel @@ -48,7 +48,7 @@ class SideModel
48 $result[$key]['textEn'] = $value['sort_name_en']; 48 $result[$key]['textEn'] = $value['sort_name_en'];
49 $result[$key]['styleClass'] = strtolower($value['sort_name_en']); 49 $result[$key]['styleClass'] = strtolower($value['sort_name_en']);
50 $result[$key]['url'] = Helpers::getFilterUrl($value['sort_url']); 50 $result[$key]['url'] = Helpers::getFilterUrl($value['sort_url']);
51 - $result[$key]['img'] = Helpers::getImageUrl($value['sort_ico'], 60, 60); 51 + $result[$key]['img'] = Helpers::getImageUrl($value['sort_ico'], 60, 60, 1);
52 } 52 }
53 } 53 }
54 54
@@ -100,7 +100,7 @@ class BackController extends AbstractAction @@ -100,7 +100,7 @@ class BackController extends AbstractAction
100 $domain_name = 'http://' . (($domain == 'gmail.com') ? 'mail.google.com' : 'mail.' . $domain); 100 $domain_name = 'http://' . (($domain == 'gmail.com') ? 'mail.google.com' : 'mail.' . $domain);
101 101
102 $data = array( 102 $data = array(
103 - 'backUrl' => 'emailback.html', 103 + 'backUrl' => '/emailback.html',
104 'headerText' => '找回密码', 104 'headerText' => '找回密码',
105 'isPassportPage' => true, 105 'isPassportPage' => true,
106 'backEmailSuccess' => true, 106 'backEmailSuccess' => true,