Authored by 梁志锋

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

... ... @@ -9,9 +9,6 @@ use Plugin\Helpers;
*/
class FloorProcess
{
private static $guangUrl = 'http://guang.m.yohobuy.com';
/**
* 频道参数
*
... ... @@ -209,6 +206,7 @@ class FloorProcess
foreach ($data['list'] as &$one) {
if (isset($one['url'])) {
$one['url'] = Helpers::getFilterUrl($one['url']);
isset(self::$channel[$type]) && $one['url'] .= '?gender='.self::$channel[$type];
}
$one['img'] = Helpers::getImageUrl($one['src'], 158, 174);
unset($one['src']);
... ...
... ... @@ -3,7 +3,6 @@
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/20
*/
var $ = require('yoho.zepto'),
Swiper = require('yoho.iswiper'),
lazyLoad = require('yoho.zeptolazyload');
... ...
... ... @@ -274,7 +274,6 @@ $listNav.delegate('li', 'tap', function() {
$pre.removeClass('active');
$this.addClass('active');
filter.showFilter();
}
} else {
... ...
... ... @@ -2,7 +2,7 @@
position: absolute;
left: 0;
right: 0;
top: 0;
top: 2px;
}
.filter-mask {
... ... @@ -40,6 +40,7 @@
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
color: #333;
}
.default {
... ...
.good-info {
float: left;
width: 44%;
width: 46.4%;
height: 486rem / $pxConvertRem;
margin: 28rem / $pxConvertRem 3% 0;
margin: 28rem / $pxConvertRem 0 0 2.4%;
.tag-container {
... ...
... ... @@ -24,6 +24,10 @@ $clothes: sprite-map("guang/clothes/*.png");
}
.guang-detail-page {
#wrapper {
background: #f0f0f0;
}
#wrapper.ios {
position: absolute;
top: 0;
... ...
... ... @@ -73,6 +73,7 @@
.info-list-container {
overflow-x: hidden;
background: #f0f0f0;
}
.info-list.hide {
... ...
... ... @@ -29,8 +29,8 @@
}
} */
.home-header {
height: 88rem / $pxConvertRem;
line-height: 88rem / $pxConvertRem;
height: 90rem / $pxConvertRem;
line-height: 90rem / $pxConvertRem;
@include background-image(linear-gradient(#323232, #414141));
position: relative;
.iconfont {
... ...
... ... @@ -14,16 +14,18 @@
border-right: 1px solid #e0e0e0;
border-top: 1px solid #e0e0e0;
overflow: hidden;
background: #fff;
.brand-logo {
width: 100%;
display: table-cell;
width: 3.95rem;
height: 128rem / $pxConvertRem;
line-height: 128rem / $pxConvertRem;
text-align: center;
font-size: 0;
vertical-align: middle;
img {
vertical-align: middle;
max-width: 100%;
max-height: 100%;
}
... ... @@ -52,7 +54,8 @@
width: 317rem / $pxConvertRem;
height: 174rem / $pxConvertRem;
border-top: 1px solid #e0e0e0;
background: #fff;
a {
display: block;
width: 100%;
... ... @@ -68,7 +71,7 @@
background: #fff;
width: 100%;
height: 140rem / $pxConvertRem;
margin-bottom: 28rem / $pxConvertRem;
// margin-bottom: 28rem / $pxConvertRem;
border-top: 1px solid #e0e0e0;
overflow: hidden;
... ...
... ... @@ -30,11 +30,11 @@
.nav-icon, .nav-img {
position: absolute;
width: 60rem / $pxConvertRem;
height: 60rem / $pxConvertRem;
width: 48rem / $pxConvertRem;
height: 48rem / $pxConvertRem;
top: 50%;
margin-top: -30rem / $pxConvertRem;
left: 24rem / $pxConvertRem;
margin-top: -24rem / $pxConvertRem;
left: 30rem / $pxConvertRem;
}
.enter-subnav {
... ...
... ... @@ -4,8 +4,8 @@
color: #fff;
width: 100%;
overflow: hidden;
height: 88rem / $pxConvertRem;
line-height: 88rem / $pxConvertRem;
height: 90rem / $pxConvertRem;
line-height: 90rem / $pxConvertRem;
&.boys {
@include background-image(linear-gradient(#323232, #414141));
... ...
.discount-page {
background-color: #f0f0f0;
background-color: #fff;
.swiper-container {
width: 100%;
... ... @@ -23,7 +23,7 @@
.banner-top-single{
width: 100%;
height: 240rem / $pxConvertRem;
height: 200rem / $pxConvertRem;
img {
display: block;
height: 100%;
... ... @@ -32,6 +32,7 @@
}
.list-nav {
border:1px solid #e6e6e6;
> li {
float: left;
width: 25%;
... ... @@ -50,9 +51,14 @@
}
.active > a {
border-bottom: 2px solid #000;
color: #000;
.spanTest{
width: auto;
height: 100%;
border-bottom: 2px solid #000;
display: inline-block;
box-sizing:border-box;
}
.iconfont {
color: #999;
... ...
.newarrival-page {
background-color: #f0f0f0;
background-color: #fff;
.swiper-container {
width: 100%;
height: 240rem / $pxConvertRem;
height: 310rem / $pxConvertRem;
img {
height: 100%;
... ... @@ -23,7 +23,7 @@
.banner-top-single{
width: 100%;
height: 240rem / $pxConvertRem;
height: 200rem / $pxConvertRem;
img {
display: block;
height: 100%;
... ... @@ -32,6 +32,7 @@
}
.list-nav {
border:1px solid #e6e6e6;
> li {
float: left;
width: 25%;
... ... @@ -39,12 +40,13 @@
line-height: 33px;
text-align: center;
font-size: 14px;
color: #999;
}
a {
display: block;
display: inline-block;
box-sizing: border-box;
width: 100%;
width: auto;
height: 100%;
color: #999;
}
... ... @@ -52,15 +54,14 @@
.active > a {
border-bottom: 2px solid #000;
color: #000;
.iconfont {
color: #999;
box-sizing:border-box;
}
.active > .iconfont {
color: #000;
&.cur {
color: #000;
}
}
}
.filter .iconfont {
font-size: 12px;
... ...
{{> filter}}
\ No newline at end of file
... ...
... ... @@ -22,8 +22,8 @@
<li class="filter">
<a href="javascript:void(0);">
筛选
<span class="iconfont">&#xe613;</span>
</a>
<span class="iconfont">&#xe613;</span>
</li>
</ul>
... ...
... ... @@ -7,13 +7,13 @@
<ul id="list-nav" class="list-nav clearfix">
<li class="new active">
<a href="javascript:void(0);">
最新
<span class="spanTest">最新</span>
<span class="iconfont cur">&#xe616;</span>
</a>
</li>
<li class="price">
<a href="javascript:void(0);">
价格
<span class="spanTest">价格</span>
<span class="icon">
<i class="iconfont up">&#xe615;</i>
<i class="iconfont down cur">&#xe616;</i>
... ... @@ -22,7 +22,7 @@
</li>
<li class="discount">
<a href="javascript:void(0);">
折扣
<span class="spanTest">折扣</span>
<span class="icon">
<i class="iconfont up">&#xe615;</i>
<i class="iconfont down cur">&#xe616;</i>
... ... @@ -31,7 +31,7 @@
</li>
<li class="filter">
<a href="javascript:void(0);">
筛选
<span class="spanTest">筛选</span>
<span class="iconfont">&#xe613;</span>
</a>
</li>
... ...
... ... @@ -203,20 +203,9 @@ class SearchController extends AbstractAction
// 转换排序方式
$page = $this->get('page', 1);
$order = $this->get('order', 0);
$orderVal = $this->get('order', 0);
$type = $this->get('type', '');
switch ($type) {
case 'price':
$order = ($order == 0) ? 's_p_desc' : 's_p_asc';
break;
case 'discount':
$order = ($order == 0) ? 'p_d_desc' : 'p_d_asc';
break;
case 'newest':
default:
$order = ($order == 0) ? 's_t_desc' : 's_t_asc';
break;
}
$order = Helpers::transOrder($orderVal, $type);
$data = array();
// 查询品类或品牌数据
... ... @@ -258,6 +247,56 @@ class SearchController extends AbstractAction
}
/**
* Ajax异步获取筛选数据
* @return array 筛选数据
*/
public function filterAction()
{
if ($this->isAjax()) {
// 过滤请求参数
$condition = filter_input_array(INPUT_GET, array(
'query' => FILTER_DEFAULT,
'brand' => FILTER_VALIDATE_INT,
'sort' => FILTER_DEFAULT,
'msort' => FILTER_VALIDATE_INT,
'misort' => FILTER_VALIDATE_INT,
'color' => FILTER_VALIDATE_INT,
'size' => FILTER_VALIDATE_INT,
'price' => FILTER_VALIDATE_INT,
'discount' => FILTER_DEFAULT,
'gender' => FILTER_DEFAULT,
'p_d' => FILTER_DEFAULT,), false);
if (isset($condition['sort'])) {
$condition['sort'] = rawurldecode($condition['sort']);
}
if (isset($condition['discount'])) {
$condition['p_d'] = rawurldecode($condition['discount']);
unset($condition['discount']);
}
if (isset($condition['gender'])) {
$condition['gender'] = rawurldecode($condition['gender']);
}
$data = array();
$listData = SearchData::searchByCondition($condition);
// 处理返回的数据
if (isset($listData['data']) && isset($listData['data']['filter'])) {
$data['filter'] = ListProcess::getFilterData($listData['data']['filter']);
}
$listData = array();
if (empty($data)) {
echo ' ';
} else {
$this->_view->display('filter', $data);
}
} else {
echo ' ';
}
}
/**
* 模糊搜索指定字符
*
* @return array 模糊搜索的结果
... ...
... ... @@ -46,7 +46,7 @@ class ClassModel
$oneClass = array();
$item = array();
foreach ($data['data'] as $k => $v) {
$oneClass = array('name' => $k, 'ca' => array());
$oneClass = array('name' => ucfirst($k), 'ca' => array());
foreach ($v as $val) {
$item = array();
... ...
... ... @@ -48,7 +48,7 @@ class SideModel
$result[$key]['textEn'] = $value['sort_name_en'];
$result[$key]['styleClass'] = strtolower($value['sort_name_en']);
$result[$key]['url'] = Helpers::getFilterUrl($value['sort_url']);
$result[$key]['img'] = Helpers::getImageUrl($value['sort_ico'], 60, 60);
$result[$key]['img'] = Helpers::getImageUrl($value['sort_ico'], 60, 60, 1);
}
}
... ...
... ... @@ -100,7 +100,7 @@ class BackController extends AbstractAction
$domain_name = 'http://' . (($domain == 'gmail.com') ? 'mail.google.com' : 'mail.' . $domain);
$data = array(
'backUrl' => 'emailback.html',
'backUrl' => '/emailback.html',
'headerText' => '找回密码',
'isPassportPage' => true,
'backEmailSuccess' => true,
... ...