Authored by hf

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

framework @ 119c247f
Subproject commit 75bbc3b075de19f239532f60c5995d06c5f814e2
Subproject commit 119c247f5cf929aa1e059e40609bb16dd6b58f05
... ...
This diff could not be displayed because it is too large.
No preview for this file type
... ... @@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Wed Oct 21 13:32:56 2015
Created by FontForge 20120731 at Wed Oct 21 18:23:04 2015
By Ads
</metadata>
<defs>
... ... @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Wed Oct 21 13:32:56 2015
bbox="0 -224 3943 812.871"
underline-thickness="50"
underline-position="-100"
unicode-range="U+0078-E622"
unicode-range="U+0078-E623"
/>
<missing-glyph horiz-adv-x="374"
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
... ... @@ -140,5 +140,7 @@ t-2.5 -15v-80h-208q-20 0 -34 -14t-14 -34v-80h832v80q0 6 -1.5 11t-3.5 10t-5.5 9t-
<glyph glyph-name="uniE622" unicode="&#xe622;" horiz-adv-x="1173"
d="M586 588q-64 150 -188 203q-114 47 -222 -7q-112 -56 -155 -192q-20 -67 -21 -144q0 -41 9 -78.5t24 -66.5t39 -57.5t47 -48.5t55.5 -43t56.5 -38t58.5 -35.5t53.5 -33.5q63 -42 118 -94.5t86.5 -95t39.5 -69.5q4 19 25.5 50t53.5 66t75 74t88 71q21 15 53.5 35.5t58 36
t57 38t55 43t47 48t39 56.5t25 66.5t8.5 78.5q0 75 -19.5 138t-52.5 105.5t-76.5 70.5t-91 37.5t-98 1t-96 -34.5t-85.5 -72.5t-67 -108.5z" />
<glyph glyph-name="uniE623" unicode="&#xe623;"
d="M835 576l-60 63l-263 -275v0l-263 275l-60 -63l262 -276l-262 -276l60 -63l263 275v0l263 -275l60 63l-262 276z" />
</font>
</defs></svg>
... ...
No preview for this file type
No preview for this file type
... ... @@ -7,6 +7,10 @@
var $ = require('yoho.zepto'),
lazyLoad = require('yoho.zeptolazyload');
//品牌页参数
var $brandHeader = $('#brand-header'),
$introBox = $('#intro-box');
var filter = require('../plugin/filter');
var $goodsContainer = $('#goods-container'),
... ... @@ -277,3 +281,21 @@ $(window).scroll(function() {
search();
}
});
//品牌介绍
$brandHeader.children('.btn-intro').bind('touchstart', function() {
$introBox.removeClass('hide');
});
$('.close-intro, .brand-intro-box').click(function() {
$introBox.addClass('hide');
});
$('#brand-intro').click(function(e) {
e.stopPropagation();
});
//品牌收藏
$brandHeader.children('.btn-col').bind('touchstart', function() {
$(this).toggleClass('coled');
});
\ No newline at end of file
... ...
.brand-page {
.newbrand-search {
width: 93.75%;
height: 30px;
padding: 7px 3.125%;
background-color: #f8f8f8;
left: 0;
z-index: 10;
.search-box {
position: relative;
height: 30px;
background-color: #FFF;
border-radius: 15px;
padding: 0 16px 0 26px;
.search-input {
width: 100%;
height: 30px;
border: 0;
}
.search-icon {
position: absolute;
font-size: 12px;
top: 16px;
left: 24px;
}
}
}
.hot-brand {
margin: (30rem / $pxConvertRem) 0 0;
... ...
... ... @@ -44,10 +44,6 @@
}
}
.brand:nth-child(4n) {
border-right: none;
}
.more {
float: left;
width: 317rem / $pxConvertRem;
... ...
... ... @@ -17,9 +17,6 @@
display: -webkit-flex;
width: 98rem / $pxConvertRem;
height: 98rem / $pxConvertRem;
border-radius: 50%;
border: 2rem / $pxConvertRem solid #e0e0e0;
box-sizing: border-box;
overflow: hidden;
align-items:center;
justify-content: center;
... ...
... ... @@ -39,4 +39,18 @@
color: #000;
}
}
.load-more-info {
width: 100%;
height: 570rem / $pxConvertRem;
line-height: 70rem / $pxConvertRem;
text-align: center;
font-size: 14px;
overflow: hidden;
.status {
&.hide {
display: none;
}
}
}
}
\ No newline at end of file
... ...
... ... @@ -96,10 +96,59 @@
.btn-col {
right: 15px;
.iconfont {
font-size: 12px;
}
}
.brand-intro-box {
display: none;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,.3);
padding: 44px 0;
z-index: 1;
overflow: auto;
.brand-intro {
position: relative;
box-sizing: border-box;
width: 85%;
margin: 0 7.5%;
background: #fff;
padding: 10px 8%;
}
h2 {
text-align: center;
font-size: 17px;
line-height: 40px;
}
.con {
font-size: 12px;
line-height: 16px;
padding: 20px 0;
border-top: 1px solid #e6e6e6;
border-bottom: 1px solid #e6e6e6;
overflow-x: hidden;
}
.fo {
font-size: 18px;
height: 40px;
line-height: 40px;
text-align: center;
}
.close-intro {
position: absolute;
top: 6px;
right: 6px;
}
}
.list-nav {
... ...
{{> layout/header}}
<div class="brand-page yoho-page">
<div class="newbrand-search" style="position: fixed; top: 44px;">
<div class="search-box clearfix">
<a href="/index/search/index" >
<input type="text" class="search-input" placeholder="查找品牌" name="query" id="query" value="" disabled="">
<i class="search-icon iconfont clearfix"></i>
</a>
</div>
</div>
{{# bannerTop}}
{{> home/banner_top}}
{{/ bannerTop}}
... ...
... ... @@ -24,7 +24,7 @@
{{/ brandWay}}
{{# brand}}
<div class="brand-header" data-id={{id}}>
<div id="brand-header" class="brand-header" data-id={{id}}>
<img class="lazy" data-original={{banner}}>
<a class="btn-intro" href="javascript:void(0);">
品牌介绍
... ... @@ -34,8 +34,18 @@
收藏
</a>
</div>
<div class="brand-intro-box">
<div id="brand-intro" class="brand-intro">{{intro}}</div>
<div id="intro-box" class="brand-intro-box hide">
<div id="brand-intro" class="brand-intro">
<h2>品牌介绍</h2>
<div class="con">
{{{intro}}}
</div>
<p class="fo">
<span></span>
100%品牌授权正品
</p>
<span class="iconfont close-intro">&#xe623;</span>
</div>
</div>
{{/ brand}}
... ...
... ... @@ -7,7 +7,7 @@
<div id="goods-list" class="goods-list clearfix"></div>
<div id="load-more-info" class="load-more-info">
<div class="loading status">
<div class="loading status hide">
正在加载...
</div>
<span class="no-more status hide">没有更多啦</span>
... ...
... ... @@ -12,7 +12,7 @@
<div class="recommend-swiper">
<ul class="recommend-list clearfix">
{{# recommend_collocation}}
<li class="recommend-item swiper-slide"><a href="{{url}}"><img class="lazy" src="{{img}}" alt="" /></a></li>
<li class="recommend-item swiper-slide"><a href="{{url}}"><img class="img" src="{{img}}" alt="" /></a></li>
{{/ recommend_collocation}}
</ul>
</div>
... ...
... ... @@ -23,12 +23,239 @@ class BrandController extends AbstractAction
}
/* 获取渲染模板需要的数据 */
$data = Category\BrandModel::getBrandByChannel($channel);
/*$data = Category\BrandModel::getBrandByChannel($channel);
if (!is_array($data)) {
$data = array();
}
$data['brandPage'] = true;
$brandTop = array();
if($brandTopData['code'] == 200)
{
$brandTop = $brandTopData['data'];
}
$brands = array();
if($brandsData['code'] == 200)
{
$brands = $brandsData['data'];
}
echo '<pre>';
var_dump($brandTop, $brands);exit;*/
$data = array (
'brandPage' => true,
'pageHeader' => array (
'navBack' => 'sss ',
'navHome' => 'sss ',
'navTitle' => 'sss '
),
'bannerTop' => array (
'list' => array (
array (
'url' => '',
'img' => 'http://img10.static.yhbimg.com/adpic/2015/10/15/10/01c161398d3baec2868abe85e26ba1a71d.jpg?imageMogr2/thumbnail/640x300/extent/640x300/background/d2hpdGU=/position/center/quality/90'
),
array (
'url' => '',
'img' => 'http://img13.static.yhbimg.com/adpic/2015/10/15/10/027c45cdc03e23c367ec0ff3d29b7c3f79.jpg?imageMogr2/thumbnail/640x300/extent/640x300/background/d2hpdGU=/position/center/quality/90'
),
array (
'url' => '',
'img' => 'http://img13.static.yhbimg.com/adpic/2015/10/15/10/022e2ac6daa33fc3cb8a0f04025a35994f.jpg?imageMogr2/thumbnail/640x300/extent/640x300/background/d2hpdGU=/position/center/quality/90'
)
)
),
'hotBrand' => array (
'list' => array (
array (
'url' => '',
'img' => 'http://img13.static.yhbimg.com/brandLogo/2014/08/12/17/0233d54f34d2534c08271a8fc27090a6af.jpg?imageMogr2/thumbnail/144x144/extent/144x144/background/d2hpdGU=/position/center/quality/90'
),
array (
'url' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2014/01/27/11/020b17265b2103b49005c57395b8b154a9.jpg?imageMogr2/thumbnail/144x144/extent/144x144/background/d2hpdGU=/position/center/quality/90'
),
array (
'url' => '',
'img' => 'http://img13.static.yhbimg.com/brandLogo/2014/11/27/09/02b403bdcbfb965bdc632fea5c29816746.png?imageMogr2/thumbnail/144x144/extent/144x144/background/d2hpdGU=/position/center/quality/90'
),
array (
'url' => '',
'img' => 'http://img13.static.yhbimg.com/brandLogo/2013/11/01/14/027e68260ba30c01b165c17fe043f2ce2c.jpg?imageMogr2/thumbnail/144x144/extent/144x144/background/d2hpdGU=/position/center/quality/90'
),
array (
'url' => '',
'img' => 'http://img11.static.yhbimg.com/brandLogo/2014/04/25/14/0179fa8eacf51fd1a89ec6f7fdeab88fc2.jpg?imageMogr2/thumbnail/144x144/extent/144x144/background/d2hpdGU=/position/center/quality/90'
),
array (
'url' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2014/01/27/11/02608437f8d8b6b7b15786214b0a5ef502.jpg?imageMogr2/thumbnail/144x144/extent/144x144/background/d2hpdGU=/position/center/quality/90'
),
array (
'url' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2013/02/28/17/020aae69720d683a7962c9b7fd3a92c801.jpg?imageMogr2/thumbnail/144x144/extent/144x144/background/d2hpdGU=/position/center/quality/90'
),
array (
'url' => '',
'img' => 'http://img13.static.yhbimg.com/brandLogo/2014/01/27/11/02bca7ac6414c7475b4a337e28a0365590.jpg?imageMogr2/thumbnail/144x144/extent/144x144/background/d2hpdGU=/position/center/quality/90'
)
)
),
'brandList' => array (
array (
'title' => '0~9',
'list' => array(
array (
'name' => '004',
'isHot' => true
),
array (
'name' => '10*1',
'isNew' => true
),
array (
'name' => '2%'
)
)
),
array (
'title' => 'A',
'list' => array(
array (
'name' => 'Aape',
'isHot' => true
),
array (
'name' => 'Adfdfd',
'isNew' => true
),
array (
'name' => 'Acrwewwe'
)
)
),
array (
'title' => 'B',
'list' => array(
array (
'name' => 'Bape'
),
array (
'name' => 'Bdfdfd'
),
array (
'name' => 'Bcrwewwe'
)
)
),
array (
'title' => 'B',
'list' => array(
array (
'name' => 'Bape'
),
array (
'name' => 'Bdfdfd'
),
array (
'name' => 'Bcrwewwe'
)
)
),
array (
'title' => 'B',
'list' => array(
array (
'name' => 'Bape'
),
array (
'name' => 'Bdfdfd'
),
array (
'name' => 'Bcrwewwe'
)
)
),
array (
'title' => 'B',
'list' => array(
array (
'name' => 'Bape'
),
array (
'name' => 'Bdfdfd'
),
array (
'name' => 'Bcrwewwe'
)
)
),
array (
'title' => 'B',
'list' => array(
array (
'name' => 'Bape'
),
array (
'name' => 'Bdfdfd'
),
array (
'name' => 'Bcrwewwe'
)
)
),
array (
'title' => 'B',
'list' => array(
array (
'name' => 'Bape'
),
array (
'name' => 'Bdfdfd'
),
array (
'name' => 'Bcrwewwe'
)
)
),
array (
'title' => 'B',
'list' => array(
array (
'name' => 'Bape'
),
array (
'name' => 'Bdfdfd'
),
array (
'name' => 'Bcrwewwe'
)
)
),
array (
'title' => 'B',
'list' => array(
array (
'name' => 'Bape'
),
array (
'name' => 'Bdfdfd'
),
array (
'name' => 'Bcrwewwe'
)
)
)
)
);
$this->_view->assign('title', 'YOHO!有货');
//$this->_view->display('brand', compact('brands'));
// 渲染模板
$this->_view->display('index', $data);
}
... ...
... ... @@ -19,6 +19,10 @@ class ListController extends AbstractAction
'name' => 'Aape',
'thumb' => 'http://img13.static.yhbimg.com/brandLogo/2015/08/26/15/02261f64c198cb4b181c5ef9e61f38f4b9.jpg?imageMogr2/thumbnail/150x70/extent/150x70/background/d2hpdGU=/position/center/quality/90'
),
'brand' => array(
'id' => 1,
'banner' => 'http://img10.static.yhbimg.com/brandBanner/2015/08/26/07/015af5d6ee626cb132cd9c436e896fae26.jpg?imageMogr2/crop/640x'
),
'new' => array(
array(
'id' => 1,
... ...