Authored by lore-w

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

@@ -473,7 +473,8 @@ class WebAction extends Controller_Abstract @@ -473,7 +473,8 @@ class WebAction extends Controller_Abstract
473 $header = array( 473 $header = array(
474 'navbars'=> \Index\HomeModel::getNavBars($channel), 474 'navbars'=> \Index\HomeModel::getNavBars($channel),
475 'gobytype'=> 'gobuy'.$channel, 475 'gobytype'=> 'gobuy'.$channel,
476 - 'searchcate'=>'searchcate'.$channel 476 + 'searchcate'=>'searchcate'.$channel,
  477 + 'header'=> true,
477 ); 478 );
478 $this->_view->assign('headerdata', $header); 479 $this->_view->assign('headerdata', $header);
479 } 480 }
@@ -17,15 +17,16 @@ class HelperSearch @@ -17,15 +17,16 @@ class HelperSearch
17 public static $options = array(); 17 public static $options = array();
18 //当前页 18 //当前页
19 public static $page = 1; 19 public static $page = 1;
  20 + //总页数
20 public static $pageTotal; 21 public static $pageTotal;
  22 + //总记录数
  23 + public static $total;
  24 + //接口返回搜索条件
21 public static $filter; 25 public static $filter;
22 -  
23 //选中的条件 26 //选中的条件
24 public static $selected = array(); 27 public static $selected = array();
25 -  
26 //list分类面包屑 28 //list分类面包屑
27 public static $listNav = array(); 29 public static $listNav = array();
28 -  
29 //设置导航 30 //设置导航
30 private static function setListNav() 31 private static function setListNav()
31 { 32 {
@@ -78,9 +79,9 @@ class HelperSearch @@ -78,9 +79,9 @@ class HelperSearch
78 //总页数 79 //总页数
79 $result['page_total'] = isset($data['product']['page_total']) ? $data['product']['page_total'] : ''; 80 $result['page_total'] = isset($data['product']['page_total']) ? $data['product']['page_total'] : '';
80 self::$pageTotal = $result['page_total']; 81 self::$pageTotal = $result['page_total'];
  82 + self::$total = $data['product']['total'];
81 //当前页 83 //当前页
82 - $result['page'] = isset($data['product']['page']) ? $data['product']['page'] : '';  
83 - self::$page = $result['page']; 84 + self::$page = $result['page'] = isset($data['product']['page']) ? $data['product']['page'] : '';
84 //筛选条件 85 //筛选条件
85 $result['filters'] = isset($data['product']['filter']) ? self::filter() : array(); 86 $result['filters'] = isset($data['product']['filter']) ? self::filter() : array();
86 //排序方式、显示数量等其他选项 87 //排序方式、显示数量等其他选项
@@ -145,7 +146,7 @@ class HelperSearch @@ -145,7 +146,7 @@ class HelperSearch
145 * @author sefon 2015-12-21 17:24:04 146 * @author sefon 2015-12-21 17:24:04
146 * @return array 147 * @return array
147 */ 148 */
148 - public static function getProductList($product,$imgSize) 149 + public static function getProductList($product, $imgSize)
149 { 150 {
150 $params = self::$params; 151 $params = self::$params;
151 $goods = array(); 152 $goods = array();
@@ -160,12 +161,26 @@ class HelperSearch @@ -160,12 +161,26 @@ class HelperSearch
160 //即将售罄 161 //即将售罄
161 $isFew = $val['is_soon_sold_out'] === 'Y' ? true : false; 162 $isFew = $val['is_soon_sold_out'] === 'Y' ? true : false;
162 //SALE 163 //SALE
  164 + $isSale = ($val['is_discount'] == 'Y') ? true : false;
163 //新品节 165 //新品节
164 //再到着 166 //再到着
165 //年终大促 167 //年终大促
166 // 年中大促 168 // 年中大促
  169 + $gender = 0;
  170 + if (isset(self::$options['gender'])) {
  171 + $genderArr = explode(',', self::$options['gender']);
  172 + $gender = $genderArr[0];
  173 + }
167 foreach($val['goods_list'] as $k => $v){ 174 foreach($val['goods_list'] as $k => $v){
168 $goods_list[$k]['url'] = Helpers::getUrlBySkc($val['product_id'], $v['goods_id'], $val['cn_alphabet']); 175 $goods_list[$k]['url'] = Helpers::getUrlBySkc($val['product_id'], $v['goods_id'], $val['cn_alphabet']);
  176 + //女封
  177 + if (isset($v['cover_1']) && $gender == 1) {
  178 + $val['default_images'] = $v['images_url'];
  179 + }
  180 + //男封
  181 + if (isset($v['cover_2']) && $gender == 2) {
  182 + $val['default_images'] = $v['images_url'];
  183 + }
169 //筛选符合颜色条件的封面图片 184 //筛选符合颜色条件的封面图片
170 if (isset($params['color']) && $params['color'] == $v['color_id']) { 185 if (isset($params['color']) && $params['color'] == $v['color_id']) {
171 $val['default_images'] = $v['images_url']; 186 $val['default_images'] = $v['images_url'];
@@ -175,11 +190,19 @@ class HelperSearch @@ -175,11 +190,19 @@ class HelperSearch
175 if (!empty($val['default_images'])) { 190 if (!empty($val['default_images'])) {
176 $val['default_images'] = Images::getImageUrl($val['default_images'],$imgSize[0],$imgSize[1]); 191 $val['default_images'] = Images::getImageUrl($val['default_images'],$imgSize[0],$imgSize[1]);
177 } 192 }
178 - 193 + //搜索关键字高亮
  194 + if (isset(self::$params['query']) && !empty(self::$params['query']) && preg_match("/".self::$params['query']."/i", $val['product_name'], $match)) {
  195 + foreach ($match as $k => &$v) {
  196 + $replace[$k] = '<span style="color: #cc0000">'.$v.'</span>';
  197 + $v = '/'.$v.'/';
  198 + }
  199 + $val['product_name'] = preg_replace($match, $replace, $val['product_name']);
  200 + }
179 $good = array( 201 $good = array(
180 'tags' => array( 202 'tags' => array(
181 'isNew' => $isNew, 203 'isNew' => $isNew,
182 - 'isLimit' => $isLimit 204 + 'isLimit' => $isLimit,
  205 + 'isSale' => $isSale
183 ), 206 ),
184 'url' => self::fromPram($goods_list[0]['url'],++$key), 207 'url' => self::fromPram($goods_list[0]['url'],++$key),
185 'thumb' => $val['default_images'], 208 'thumb' => $val['default_images'],
@@ -422,7 +445,7 @@ class HelperSearch @@ -422,7 +445,7 @@ class HelperSearch
422 //已选中品牌数量 445 //已选中品牌数量
423 $existBrandNum = 0; 446 $existBrandNum = 0;
424 //已选中品牌标签名 447 //已选中品牌标签名
425 - $existName = ''; 448 + $existName = array();
426 foreach ($brand as $key => $v) { 449 foreach ($brand as $key => $v) {
427 $selectBrandIds = $brandIds; 450 $selectBrandIds = $brandIds;
428 //品牌已被选中 451 //品牌已被选中
@@ -433,10 +456,10 @@ class HelperSearch @@ -433,10 +456,10 @@ class HelperSearch
433 'brand' => implode(',', $selectBrandIds) 456 'brand' => implode(',', $selectBrandIds)
434 ))); 457 )));
435 if ($existBrandNum === 0) { 458 if ($existBrandNum === 0) {
436 - $existName .= $v['brand_name'].'、'; 459 + $existName[] = $v['brand_name'];
437 } 460 }
438 if ($existBrandNum === 1){ 461 if ($existBrandNum === 1){
439 - $existName .= substr($v['brand_name'], 0, 3).'...'; 462 + $existName[]= substr($v['brand_name'], 0, 3).'...';
440 } 463 }
441 $existBrandNum++; 464 $existBrandNum++;
442 } 465 }
@@ -474,7 +497,7 @@ class HelperSearch @@ -474,7 +497,7 @@ class HelperSearch
474 //设置选中 497 //设置选中
475 if (isset(self::$params['brand']) && !empty(self::$params['brand'])) { 498 if (isset(self::$params['brand']) && !empty(self::$params['brand'])) {
476 self::$selected['brand'] = array( 499 self::$selected['brand'] = array(
477 - 'name' => rtrim($existName, '、'), 500 + 'name' => implode($existName,'、'),
478 'href' => self::buildUrl($params) 501 'href' => self::buildUrl($params)
479 ); 502 );
480 } 503 }
@@ -487,7 +510,6 @@ class HelperSearch @@ -487,7 +510,6 @@ class HelperSearch
487 $result['brandIndex'][] = $index; 510 $result['brandIndex'][] = $index;
488 } 511 }
489 unset($brandList); 512 unset($brandList);
490 -  
491 //搜索页已选中,返回空 513 //搜索页已选中,返回空
492 if (self::checkSearch('brand')) { 514 if (self::checkSearch('brand')) {
493 return array(); 515 return array();
@@ -586,12 +608,16 @@ class HelperSearch @@ -586,12 +608,16 @@ class HelperSearch
586 */ 608 */
587 public static function price($filter) 609 public static function price($filter)
588 { 610 {
  611 + $result = array();
  612 + //商品记录小于10,不显示价格区间
  613 + if (self::$total < 10) {
  614 + return $result;
  615 + }
589 $params = self::$params; 616 $params = self::$params;
590 $priceId = isset($params['price']) && !empty(self::$params['price']) ? self::$params['price'] : ''; 617 $priceId = isset($params['price']) && !empty(self::$params['price']) ? self::$params['price'] : '';
591 if (isset($params['price'])) { 618 if (isset($params['price'])) {
592 unset($params['price']); 619 unset($params['price']);
593 } 620 }
594 - $result = array();  
595 //设置已选中价格 621 //设置已选中价格
596 if (!empty($priceId)) { 622 if (!empty($priceId)) {
597 $price = explode(',' ,$priceId); 623 $price = explode(',' ,$priceId);
@@ -11,39 +11,15 @@ @@ -11,39 +11,15 @@
11 <title>{{title}}</title> 11 <title>{{title}}</title>
12 {{#if rlsEnv}} 12 {{#if rlsEnv}}
13 <link rel="stylesheet" href="http://cdn.yoho.cn/yohobuy/{{version}}/index.css"> 13 <link rel="stylesheet" href="http://cdn.yoho.cn/yohobuy/{{version}}/index.css">
14 - <!--[if lt IE 9]>  
15 - <script src="http://cdn.yoho.cn/yohobuy/respond/respond.min.js"></script>  
16 - <link href="http://cdn.yoho.cn/yohobuy/respond/respond-proxy.html" id="respond-proxy" rel="respond-proxy" />  
17 - <script src="http://cdn.yoho.cn/yohobuy/respond/respond.proxy.js"></script>  
18 - <link href="http://cdn.yoho.cn/yohobuy/respond/respond.proxy.gif" id="respond-redirect" rel="respond-redirect" />  
19 - <![endif]-->  
20 {{/if}} 14 {{/if}}
21 {{#if preEnv}} 15 {{#if preEnv}}
22 <link rel="stylesheet" href="http://cdn.yoho.cn/yohobuy/{{version}}/index.css"> 16 <link rel="stylesheet" href="http://cdn.yoho.cn/yohobuy/{{version}}/index.css">
23 - <!--[if lt IE 9]>  
24 - <script src="http://cdn.yoho.cn/yohobuy/respond/respond.min.js"></script>  
25 - <link href="http://cdn.yoho.cn/yohobuy/respond/respond-proxy.html" id="respond-proxy" rel="respond-proxy" />  
26 - <script src="http://cdn.yoho.cn/yohobuy/respond/respond.proxy.js"></script>  
27 - <link href="http://cdn.yoho.cn/yohobuy/respond/respond.proxy.gif" id="respond-redirect" rel="respond-redirect" />  
28 - <![endif]-->  
29 {{/if}} 17 {{/if}}
30 {{#if testEnv}} 18 {{#if testEnv}}
31 <link rel="stylesheet" href="http://static.buy.test.yoho.cn/dist/yohobuy/{{version}}/index.css"> 19 <link rel="stylesheet" href="http://static.buy.test.yoho.cn/dist/yohobuy/{{version}}/index.css">
32 - <!--[if lt IE 9]>  
33 - <script src="http://static.buy.test.yoho.cn/dist/yohobuy/respond/respond.min.js"></script>  
34 - <link href="http://static.buy.test.yoho.cn/dist/yohobuy/respond/respond-proxy.html" id="respond-proxy" rel="respond-proxy" />  
35 - <script src="http://static.buy.test.yoho.cn/dist/yohobuy/respond/respond.proxy.js"></script>  
36 - <link href="http://static.buy.test.yoho.cn/dist/yohobuy/respond/respond.proxy.gif" id="respond-redirect" rel="respond-redirect" />  
37 - <![endif]-->  
38 {{/if}} 20 {{/if}}
39 {{#if devEnv}} 21 {{#if devEnv}}
40 <link rel="stylesheet" href="http://webstatic.dev.yohobuy.com/css/index.css"> 22 <link rel="stylesheet" href="http://webstatic.dev.yohobuy.com/css/index.css">
41 - <!--[if lt IE 9]>  
42 - <script src="http://webstatic.dev.yohobuy.com/plugin/page/respond/respond.min.js"></script>  
43 - <link href="http://webstatic.dev.yohobuy.com/plugin/page/respond/respond-proxy.html" id="respond-proxy" rel="respond-proxy" />  
44 - <script src="http://webstatic.dev.yohobuy.com/plugin/page/respond/respond.proxy.js"></script>  
45 - <link href="http://webstatic.dev.yohobuy.com/plugin/page/respond/respond.proxy.gif" id="respond-redirect" rel="respond-redirect" />  
46 - <![endif]-->  
47 {{/if}} 23 {{/if}}
48 </head> 24 </head>
49 <body> 25 <body>
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
@@ -5,9 +5,9 @@ @@ -5,9 +5,9 @@
5 */ 5 */
6 var $ = require('yoho.jquery'); 6 var $ = require('yoho.jquery');
7 7
8 -require('./footer');  
9 - 8 +var $body = $('body');
10 9
  10 +require('./footer');
11 11
12 12
13 function cookie(name) { 13 function cookie(name) {
@@ -96,20 +96,20 @@ function getShoppingKey() { @@ -96,20 +96,20 @@ function getShoppingKey() {
96 } 96 }
97 97
98 //YAS统计代码 98 //YAS统计代码
99 -//(function(w, d, s, j, f) {  
100 -// var a = d.createElement(s);  
101 -// var m = d.getElementsByTagName(s)[0];  
102 -//  
103 -// w.YohoAcquisitionObject = f;  
104 -//  
105 -// w[f] = function() {  
106 -// w[f].p = arguments;  
107 -// };  
108 -//  
109 -// a.async = 1;  
110 -// a.src = j;  
111 -// m.parentNode.insertBefore(a, m);  
112 -//})(window, document, 'script', 'http://cdn.yoho.cn/yas-jssdk/1.0.14/yas.js', '_yas'); 99 +(function(w, d, s, j, f) {
  100 + var a = d.createElement(s);
  101 + var m = d.getElementsByTagName(s)[0];
  102 +
  103 + w.YohoAcquisitionObject = f;
  104 +
  105 + w[f] = function() {
  106 + w[f].p = arguments;
  107 + };
  108 +
  109 + a.async = 1;
  110 + a.src = j;
  111 + m.parentNode.insertBefore(a, m);
  112 +})(window, document, 'script', 'http://cdn.yoho.cn/yas-jssdk/1.0.14/yas.js', '_yas');
113 113
114 (function() { 114 (function() {
115 var uid = getUid(); 115 var uid = getUid();
@@ -123,6 +123,25 @@ function getShoppingKey() { @@ -123,6 +123,25 @@ function getShoppingKey() {
123 } 123 }
124 }()); 124 }());
125 125
  126 +//window.resize在width<1180时适配成990
  127 +$(window).on('resize', function() {
  128 + var w = $(this).width();
  129 +
  130 + //return top
  131 + if (w < 1360) {
  132 + $('.return-top').addClass('min');
  133 + } else {
  134 + $('.return-top').removeClass('min');
  135 + }
  136 +
  137 + //body
  138 + if (w < 1180) {
  139 + $body.addClass('min-screen');
  140 + } else {
  141 + $body.removeClass('min-screen');
  142 + }
  143 +}).trigger('resize');
  144 +
126 window.cookie = cookie; 145 window.cookie = cookie;
127 146
128 window.setCookie = setCookie; 147 window.setCookie = setCookie;
@@ -132,9 +151,3 @@ window.getUser = getUser; @@ -132,9 +151,3 @@ window.getUser = getUser;
132 window.getUid = getUid; 151 window.getUid = getUid;
133 152
134 window.getShoppingKey = getShoppingKey; 153 window.getShoppingKey = getShoppingKey;
135 -if($('.simple-header').hasClass('simple-header')){  
136 - require('./simple-header');  
137 -}else{  
138 - require('./header');  
139 -}  
140 -  
@@ -10,11 +10,6 @@ $('#brand-favor').on('click', function() { @@ -10,11 +10,6 @@ $('#brand-favor').on('click', function() {
10 var $this = $(this), 10 var $this = $(this),
11 uid = window.getUid(); 11 uid = window.getUid();
12 12
13 - if (!uid) {  
14 - location.href = '/signin.html?refer=' + encodeURIComponent(location.href);  
15 - return;  
16 - }  
17 -  
18 $.ajax({ 13 $.ajax({
19 type: 'post', 14 type: 'post',
20 url: '/product/index/favoriteBrand', 15 url: '/product/index/favoriteBrand',
@@ -29,6 +24,8 @@ $('#brand-favor').on('click', function() { @@ -29,6 +24,8 @@ $('#brand-favor').on('click', function() {
29 } else { 24 } else {
30 $this.find('i').removeClass('coled'); 25 $this.find('i').removeClass('coled');
31 } 26 }
  27 + } else if (res.code === 403) {
  28 + location.href = '/signin.html?refer=' + encodeURIComponent(location.href);
32 } 29 }
33 }); 30 });
34 }); 31 });
@@ -95,11 +95,6 @@ exports.init = function(num) { @@ -95,11 +95,6 @@ exports.init = function(num) {
95 wrapperPt, //鼠标移入时弹层的上内边距 95 wrapperPt, //鼠标移入时弹层的上内边距
96 containerPt; //商品列表容器的上内边距 96 containerPt; //商品列表容器的上内边距
97 97
98 - // 获取图片之前,先把获取上一张图片的ajax请求取消。 网络差的时候会出现错误  
99 - // if (getProductAjax && getProductAjax.readyState!= 4) {  
100 - // getProductAjax.abort();  
101 - // }  
102 -  
103 $.ajax({ 98 $.ajax({
104 type: 'POST', 99 type: 'POST',
105 url: '/product/list/getProductPic', 100 url: '/product/list/getProductPic',
@@ -174,11 +169,6 @@ $(document).on('hover', '.good-select-color li', function() { @@ -174,11 +169,6 @@ $(document).on('hover', '.good-select-color li', function() {
174 $goodInfoMain.on('click', '.col-btn', function() { 169 $goodInfoMain.on('click', '.col-btn', function() {
175 var $this = $(this); 170 var $this = $(this);
176 171
177 - if (!window.getUid()) {  
178 - location.href = '/signin.html?refer=' + encodeURIComponent(location.href);  
179 - return;  
180 - }  
181 -  
182 $.ajax({ 172 $.ajax({
183 type: 'POST', 173 type: 'POST',
184 url: '/product/list/changeFavorite', 174 url: '/product/list/changeFavorite',
@@ -189,6 +179,8 @@ $goodInfoMain.on('click', '.col-btn', function() { @@ -189,6 +179,8 @@ $goodInfoMain.on('click', '.col-btn', function() {
189 }).then(function(res) { 179 }).then(function(res) {
190 if (res.code === 200) { 180 if (res.code === 200) {
191 $this.toggleClass('coled'); 181 $this.toggleClass('coled');
  182 + } else if (res.code === 403) {
  183 + location.href = '/signin.html?refer=' + encodeURIComponent(location.href);
192 } 184 }
193 }); 185 });
194 }); 186 });
@@ -355,51 +355,46 @@ @@ -355,51 +355,46 @@
355 } 355 }
356 } 356 }
357 357
358 -@media (max-width: 1360px) {  
359 - .yoho-footer .return-top {  
360 - left: 100%;  
361 - right: 20px;  
362 - margin-left: auto;  
363 - } 358 +.yoho-footer .return-top.min {
  359 + left: 100%;
  360 + right: 20px;
  361 + margin-left: auto;
364 } 362 }
365 363
366 -@media (max-width:1180px) {  
367 - .yoho-footer {  
368 -  
369 - .index-foot dd {  
370 - width: 316px;  
371 -  
372 - .two-dim {  
373 - margin-top: 26px;  
374 - margin-bottom: 10px;  
375 - overflow: hidden;  
376 - } 364 +.min-screen .yoho-footer {
  365 + .index-foot dd {
  366 + width: 316px;
377 367
378 - .dim-img {  
379 - width: 69px;  
380 - height: 69px;  
381 - } 368 + .two-dim {
  369 + margin-top: 26px;
  370 + margin-bottom: 10px;
  371 + overflow: hidden;
  372 + }
382 373
383 - .mobile img {  
384 - width: 85px;  
385 - height: 108px;  
386 - } 374 + .dim-img {
  375 + width: 69px;
  376 + height: 69px;
387 } 377 }
388 378
389 - .promise .left {  
390 - margin-right: 45px; 379 + .mobile img {
  380 + width: 85px;
  381 + height: 108px;
391 } 382 }
  383 + }
392 384
393 - .subscribe {  
394 - width: 200px; 385 + .promise .left {
  386 + margin-right: 45px;
  387 + }
395 388
396 - input {  
397 - width: 140px;  
398 - }  
399 - } 389 + .subscribe {
  390 + width: 200px;
400 391
401 - .footer-help li {  
402 - width: 150px; 392 + input {
  393 + width: 140px;
403 } 394 }
404 } 395 }
  396 +
  397 + .footer-help li {
  398 + width: 150px;
  399 + }
405 } 400 }
@@ -80,10 +80,8 @@ input,textarea { @@ -80,10 +80,8 @@ input,textarea {
80 margin-right: auto; 80 margin-right: auto;
81 } 81 }
82 82
83 -@media (max-width: 1180px) {  
84 - .center-content {  
85 - width: 990px;  
86 - } 83 +.min-screen .center-content {
  84 + width: 990px;
87 } 85 }
88 86
89 @import "home/index", "product/index", "guang/index", "passport/index", "error", "order/index", "sale/index"; 87 @import "home/index", "product/index", "guang/index", "passport/index", "error", "order/index", "sale/index";
@@ -387,8 +387,6 @@ @@ -387,8 +387,6 @@
387 } 387 }
388 } 388 }
389 389
390 -@media (max-width: 1180px) {  
391 - .filter-box .brand .attr {  
392 - width: 25%;  
393 - } 390 +.min-screen .filter-box .brand .attr {
  391 + width: 25%;
394 } 392 }
@@ -51,36 +51,33 @@ @@ -51,36 +51,33 @@
51 } 51 }
52 52
53 /*990px*/ 53 /*990px*/
54 -@media (max-width: 1180px) { 54 +.min-screen .product-list-page, .new-sale-page {
55 55
56 - .product-list-page, .new-sale-page {  
57 -  
58 - .list-right {  
59 - width: 810px;  
60 - }  
61 -  
62 - .goods-container {  
63 - height: auto;  
64 - padding-top: 25px;  
65 - position: relative;  
66 - width: 810px + 10px;//每列增加右边距 56 + .list-right {
  57 + width: 810px;
  58 + }
67 59
68 - .good-info {  
69 - width: 195px; 60 + .goods-container {
  61 + height: auto;
  62 + padding-top: 25px;
  63 + position: relative;
  64 + width: 810px + 10px;//每列增加右边距
70 65
71 - .good-detail-img {  
72 - height: 261px;  
73 - }  
74 - } 66 + .good-info {
  67 + width: 195px;
75 68
76 - .block-next-page {  
77 - width: 195px; 69 + .good-detail-img {
78 height: 261px; 70 height: 261px;
79 } 71 }
80 } 72 }
81 73
82 - .filter-box .brand .attr-content {  
83 - max-width: 570px; 74 + .block-next-page {
  75 + width: 195px;
  76 + height: 261px;
84 } 77 }
85 } 78 }
  79 +
  80 + .filter-box .brand .attr-content {
  81 + max-width: 570px;
  82 + }
86 } 83 }
@@ -9,12 +9,11 @@ @@ -9,12 +9,11 @@
9 } 9 }
10 10
11 .goods { 11 .goods {
12 - width: 984px;  
13 height: 241px; 12 height: 241px;
14 margin: 30px 0; 13 margin: 30px 0;
15 overflow: hidden; 14 overflow: hidden;
16 } 15 }
17 - 16 +
18 .good { 17 .good {
19 float: left; 18 float: left;
20 margin-right: 14px; 19 margin-right: 14px;
@@ -49,20 +48,26 @@ @@ -49,20 +48,26 @@
49 } 48 }
50 } 49 }
51 50
52 -@media (max-width: 1180px) { 51 +@media (min-width: 1180px) {
53 .latest-walk { 52 .latest-walk {
54 .goods { 53 .goods {
55 - width: 820px;  
56 - height: 301px; 54 + min-width: 984px;
57 } 55 }
  56 + }
  57 +}
58 58
59 - .good {  
60 - margin-right: 10px;  
61 - } 59 +.min-screen .latest-walk {
  60 + .goods {
  61 + width: 820px;
  62 + height: 301px;
  63 + }
62 64
63 - img {  
64 - width: 195px;  
65 - height: 261px;  
66 - } 65 + .good {
  66 + margin-right: 10px;
  67 + }
  68 +
  69 + img {
  70 + width: 195px;
  71 + height: 261px;
67 } 72 }
68 -}  
  73 +}
@@ -212,21 +212,19 @@ @@ -212,21 +212,19 @@
212 } 212 }
213 } 213 }
214 214
215 -@media (max-width: 1180px) {  
216 - .product-list-page .sort-intro {  
217 - .texts {  
218 - width: 346px;  
219 - height: 248px;  
220 - padding: 0 30px;  
221 - } 215 +.min-screen .product-list-page .sort-intro {
  216 + .texts {
  217 + width: 346px;
  218 + height: 248px;
  219 + padding: 0 30px;
  220 + }
222 221
223 - .name {  
224 - margin-top: 30px;  
225 - } 222 + .name {
  223 + margin-top: 30px;
  224 + }
226 225
227 - .img {  
228 - width: 400px;  
229 - height: 250px;  
230 - } 226 + .img {
  227 + width: 400px;
  228 + height: 250px;
231 } 229 }
232 } 230 }
@@ -190,8 +190,6 @@ @@ -190,8 +190,6 @@
190 } 190 }
191 } 191 }
192 192
193 -@media (max-width: 1180px) {  
194 - .new-sale-page .new-brands .brands-wrap {  
195 - width: 730px;  
196 - } 193 +.min-screen .new-sale-page .new-brands .brands-wrap {
  194 + width: 730px;
197 } 195 }
@@ -19,30 +19,28 @@ @@ -19,30 +19,28 @@
19 19
20 20
21 /*990px*/ 21 /*990px*/
22 -@media (max-width: 1180px) {  
23 - .product-search-page {  
24 - .goods-container {  
25 - height: auto;  
26 - padding-top: 25px;  
27 - position: relative;  
28 - width: 990px + 10px; //每列增加右边距  
29 -  
30 - .good-info {  
31 - width: 190px;  
32 -  
33 - .good-detail-img {  
34 - height: 255px;  
35 - }  
36 - } 22 +.min-screen .product-search-page {
  23 + .goods-container {
  24 + height: auto;
  25 + padding-top: 25px;
  26 + position: relative;
  27 + width: 990px + 10px; //每列增加右边距
37 28
38 - .block-next-page {  
39 - width: 190px; 29 + .good-info {
  30 + width: 190px;
  31 +
  32 + .good-detail-img {
40 height: 255px; 33 height: 255px;
41 } 34 }
42 } 35 }
43 36
44 - .filter-box .brand .attr-content {  
45 - max-width: 750px; 37 + .block-next-page {
  38 + width: 190px;
  39 + height: 255px;
46 } 40 }
47 } 41 }
  42 +
  43 + .filter-box .brand .attr-content {
  44 + max-width: 750px;
  45 + }
48 } 46 }
@@ -36,7 +36,7 @@ class PassportModel @@ -36,7 +36,7 @@ class PassportModel
36 'orderHref' => Helpers::url('/home/orders?t=' . time()), //订单中心连接 36 'orderHref' => Helpers::url('/home/orders?t=' . time()), //订单中心连接
37 'helpHref' => Helpers::url('/help'), 37 'helpHref' => Helpers::url('/help'),
38 ); 38 );
39 - $tool+=array( 39 + $tool += array(
40 'loginHref' => Helpers::url('/signin.html'), //登录链接,已登录不传 40 'loginHref' => Helpers::url('/signin.html'), //登录链接,已登录不传
41 'registerHref' => Helpers::url('/reg.html'), //注册链接,已登录不传 41 'registerHref' => Helpers::url('/reg.html'), //注册链接,已登录不传
42 ); 42 );
@@ -45,7 +45,8 @@ class PassportModel @@ -45,7 +45,8 @@ class PassportModel
45 'img' => 'http://static.yohobuy.com/newheader/img/logo_e.png', 45 'img' => 'http://static.yohobuy.com/newheader/img/logo_e.png',
46 'url' => SITE_MAIN 46 'url' => SITE_MAIN
47 ), 47 ),
48 - 'tool' => $tool 48 + 'tool' => $tool,
  49 + 'simpleHeader' => true,
49 ); 50 );
50 return $simpleHeader; 51 return $simpleHeader;
51 } 52 }
@@ -110,7 +111,7 @@ class PassportModel @@ -110,7 +111,7 @@ class PassportModel
110 $ret = current($data['data']); 111 $ret = current($data['data']);
111 } 112 }
112 } 113 }
113 - return $ret; 114 + return array();
114 } 115 }
115 116
116 /** 117 /**
@@ -155,7 +155,6 @@ class SearchModel @@ -155,7 +155,6 @@ class SearchModel
155 $urlList['sort'] = SearchData::getClassesUrl($searchCondition['sortCondition']); 155 $urlList['sort'] = SearchData::getClassesUrl($searchCondition['sortCondition']);
156 // 组合搜索折扣区间url 156 // 组合搜索折扣区间url
157 $urlList['discount'] = SearchData::getDiscountUrl($searchCondition['condition']); 157 $urlList['discount'] = SearchData::getDiscountUrl($searchCondition['condition']);
158 -  
159 $result = Yohobuy::getMulti($urlList); 158 $result = Yohobuy::getMulti($urlList);
160 // 组织模板数据 159 // 组织模板数据
161 $data = HelperSearch::getList($result, $searchCondition['options']); 160 $data = HelperSearch::getList($result, $searchCondition['options']);
@@ -192,7 +191,7 @@ class SearchModel @@ -192,7 +191,7 @@ class SearchModel
192 $param['keyword'] = $searchCondition['condition']['query']; 191 $param['keyword'] = $searchCondition['condition']['query'];
193 $urlList['shop'] = SearchData::getShopUrl($param); 192 $urlList['shop'] = SearchData::getShopUrl($param);
194 } 193 }
195 - $data = Yohobuy::getMulti($urlList, array(), true); 194 + $data = Yohobuy::getMulti($urlList);
196 //获取品牌商品分类 195 //获取品牌商品分类
197 if (isset($data['shop']) && !empty($data['shop'])) { 196 if (isset($data['shop']) && !empty($data['shop'])) {
198 $shopSortParam['brand'] = $data['shop']['id']; 197 $shopSortParam['brand'] = $data['shop']['id'];
@@ -20,7 +20,7 @@ class BackController extends WebAction { @@ -20,7 +20,7 @@ class BackController extends WebAction {
20 'coverImg' => $banner ['img'], 20 'coverImg' => $banner ['img'],
21 'countryCode' => '86', 21 'countryCode' => '86',
22 'countryName' => '中国', 22 'countryName' => '中国',
23 - 'captchaUrl' => SITE_MAIN.'/passport/images?t=1449799445', 23 + 'captchaUrl' => Helpers::url('/passport/images?t='.time()),
24 'countryList' => RegData::getAreasData() 24 'countryList' => RegData::getAreasData()
25 ) 25 )
26 ); 26 );
@@ -282,7 +282,7 @@ class BackController extends WebAction { @@ -282,7 +282,7 @@ class BackController extends WebAction {
282 $area = $this->post ( 'area' ); 282 $area = $this->post ( 'area' );
283 $verifyCode = $this->post ( 'verifyCode' );//图形验证码 283 $verifyCode = $this->post ( 'verifyCode' );//图形验证码
284 $code = $this->post ( 'code' ); //手机验证码 284 $code = $this->post ( 'code' ); //手机验证码
285 - $data = array('code'=> 400, 'message' => '验证码错误!','data' => SITE_MAIN.'/passport/back/index'); 285 + $data = array('code'=> 400, 'message' => '验证码错误!','data' => Helpers::url('/passport/back/index'));
286 if ($this->getSession ( 'mobile' ) == $mobile && $this->getSession ( 'area' ) == $area && ! empty($code) 286 if ($this->getSession ( 'mobile' ) == $mobile && $this->getSession ( 'area' ) == $area && ! empty($code)
287 && PassportModel::verifyCode($verifyCode)) { 287 && PassportModel::verifyCode($verifyCode)) {
288 $result = BackData::validateMobileCode ( $mobile, $code, $area ); 288 $result = BackData::validateMobileCode ( $mobile, $code, $area );
@@ -297,7 +297,7 @@ class BackController extends WebAction { @@ -297,7 +297,7 @@ class BackController extends WebAction {
297 $url = '/passport/back/backcode?code=' . base64_encode ( $code ); 297 $url = '/passport/back/backcode?code=' . base64_encode ( $code );
298 $data ['code'] = 200; 298 $data ['code'] = 200;
299 $data['message'] = '验证成功'; 299 $data['message'] = '验证成功';
300 - $data['data'] = SITE_MAIN . $url; 300 + $data['data'] = Helpers::url($url);
301 } 301 }
302 } 302 }
303 $this->echoJson($data); 303 $this->echoJson($data);
@@ -19,13 +19,13 @@ class RegisterController extends WebAction @@ -19,13 +19,13 @@ class RegisterController extends WebAction
19 'registerPage' => true, 19 'registerPage' => true,
20 'simpleHeader' => PassportModel::getSimpleHeader(), 20 'simpleHeader' => PassportModel::getSimpleHeader(),
21 'passport' => array( 21 'passport' => array(
22 - 'actionUrl' => SITE_MAIN.'/passport/register/mobileregister', 22 + 'actionUrl' => Helpers::url('/passport/register/mobileregister'),
23 'region' => RegData::getAreasData(), 23 'region' => RegData::getAreasData(),
24 'location' => '+86', 24 'location' => '+86',
25 - 'captchaUrl' => SITE_MAIN.'/passport/images?t=1449799445',  
26 - 'itemUrl' => 'http://www.yohobuy.com/help/?category_id=9', 25 + 'captchaUrl' => Helpers::url('/passport/images?t='.time()),
  26 + 'itemUrl' => Helpers::url('/help/?category_id=9'),
27 'referUrl' => $refer, 27 'referUrl' => $refer,
28 - 'loginUrl' => SITE_MAIN.'/signin.html?refer='.$refer, 28 + 'loginUrl' => Helpers::url('/signin.html?refer='.$refer),
29 'coverHref' => $cover['url'], 29 'coverHref' => $cover['url'],
30 'coverImg' => $cover['img'], 30 'coverImg' => $cover['img'],
31 'regBtnText' => '立即注册' 31 'regBtnText' => '立即注册'
@@ -47,8 +47,10 @@ class SearchController extends WebAction @@ -47,8 +47,10 @@ class SearchController extends WebAction
47 */ 47 */
48 public function sortSizeAction() 48 public function sortSizeAction()
49 { 49 {
50 - $condition['msort'] = $this->get('msort');  
51 - $size = SearchModel::getSortSize($condition);  
52 - $this->echoJson($size); 50 + if (!$this->isAjax()) {
  51 + $condition['msort'] = $this->get('msort');
  52 + $size = SearchModel::getSortSize($condition);
  53 + $this->echoJson($size);
  54 + }
53 } 55 }
54 } 56 }
@@ -25,3 +25,11 @@ routes.searchsuggest.match = "/api/suggest" @@ -25,3 +25,11 @@ routes.searchsuggest.match = "/api/suggest"
25 routes.searchsuggest.route.module = Product 25 routes.searchsuggest.route.module = Product
26 routes.searchsuggest.route.controller = Search 26 routes.searchsuggest.route.controller = Search
27 routes.searchsuggest.route.action = suggest 27 routes.searchsuggest.route.action = suggest
  28 +
  29 +
  30 +;about(品牌介绍)
  31 +routes.brandabout.type = "rewrite"
  32 +routes.brandabout.match = "/about"
  33 +routes.brandabout.route.module = Product
  34 +routes.brandabout.route.controller = Index
  35 +routes.brandabout.route.action = brandIntro