Authored by Rock Zhang

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

Conflicts:
	yohobuy/m.yohobuy.com/application/controllers/Girls.php
... ... @@ -628,3 +628,29 @@
areaCode: '',
phoneNum: ''
}
## 分类
{
searchUrl: '',
class: [
{
name: 'BOY',
focus: true, //默认选中
ca: [
{
name: '上衣',
sub: [
{
name: '全部分类',
url: ''
},
...
]
},
...
]
},
...
]
}
\ No newline at end of file
... ...
/**
* 分类
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/14
*/
var $ = require('yoho.zepto');
var $nav = $('.category-nav'),
$contents = $('.category-container > .content');
var $curContent = $contents.not('.hide');
$('#search-input').focus(function() {
$(this).blur();
});
$nav.delegate('li', 'touchstart', function() {
var $this = $(this),
index = $this.index();
if ($this.hasClass('focus')) {
return;
}
$nav.find('li.focus').removeClass('focus');
$this.addClass('focus');
$curContent.addClass('hide');
$curContent = $contents.eq(index).removeClass('hide');
});
$('.primary-level').delegate('li', 'touchstart', function() {
var $this = $(this),
index = $this.index();
var $subLevel = $this.closest('.content').find('.sub-level');
if ($this.hasClass('focus')) {
return;
}
$this.closest('.primary-level').children('.focus').removeClass('focus');
$this.addClass('focus');
$subLevel.not('.hide').addClass('hide');
$subLevel.eq(index).removeClass('hide');
});
\ No newline at end of file
... ...
.category-page {
font-size: 30rem / $pxConvertRem;
.search-input {
position: relative;
background-color: #f8f8f8;
padding: 13rem / $pxConvertRem 20rem / $pxConvertRem;
p {
box-sizing: border-box;
width: 100%;
height: 60rem / $pxConvertRem;
line-height: 60rem / $pxConvertRem;
border: none;
padding-left: 53rem / $pxConvertRem;
border-radius: 60rem / $pxConvertRem;
font-size: 30rem / $pxConvertRem;
background: #fff;
color: #999;
}
}
.search-icon {
position: absolute;
top: 0;
bottom: 0;
left: 43rem / $pxConvertRem;
line-height: 86rem / $pxConvertRem;
color: #999;
}
.category-nav {
height: 71rem / $pxConvertRem;
border-bottom: 1px solid #e6e6e6;
li {
display: block;
float: left;
height: 100%;
line-height: 71rem / $pxConvertRem;
width: 25%;
text-align: center;
border-right: 1px solid #e6e6e6;
color: #999;
&:last-child {
border-right: none;
}
&.focus {
color: #000;
}
}
}
.content.hide {
display: none;
}
.primary-level {
float: left;
box-sizing: border-box;
width: 40%;
background: #f8f8f8;
> li {
height: 69rem / $pxConvertRem;
line-height: 69rem / $pxConvertRem;
padding-left: 32rem / $pxConvertRem;
&.focus {
background-color: #fff;
}
}
}
.sub-level-container {
float: left;
box-sizing: border-box;
padding-left: 20rem / $pxConvertRem;
background: #fff;
width: 60%;
}
.sub-level {
width: 100%;
&.hide {
display: none;
}
> li {
height: 71rem / $pxConvertRem;
line-height: 71rem / $pxConvertRem;
border-bottom: 1px solid #e6e6e6;
&:last-child {
border-bottom: none;
}
}
}
}
\ No newline at end of file
... ...
... ... @@ -88,4 +88,4 @@ a {
@include border-radius(10px);
}
@import "layout/header", "layout/footer", "good", "passport/index", "guang/index", "homepage/index";
\ No newline at end of file
@import "layout/header", "layout/footer", "good", "passport/index", "guang/index", "homepage/index", "category/index";
\ No newline at end of file
... ...
{{> layout/header}}
<div class="category-page yoho-page">
{{# category}}
<div id="search-input" class="search-input">
<a href={{searchUrl}}>
<i class="search-icon iconfont">&#xe60f;</i>
<p>搜索商品</p>
</a>
</div>
<div class="category-nav clearfix">
{{# class}}
<li class={{#if focus}}focus{{/if}}>
{{name}}
</li>
{{/ class}}
</div>
<div class="category-container clearfix">
{{# class}}
<div class="content {{#unless focus}}hide{{/if}}">
<ul class="primary-level">
{{# ca}}
<li class={{#if @first}}focus{{/if}}>{{name}}</li>
{{/ ca}}
</ul>
<div class="sub-level-container">
{{# ca}}
<ul class="sub-level {{#unless @first}}hide{{/if}}">
{{# sub}}
<li>
<a href={{url}}>
{{name}}
</a>
</li>
{{/ sub}}
</ul>
{{/ ca}}
</div>
</div>
{{/ class}}
</div>
{{/ category}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
<div class="banner-top">
<div class="banner-swiper swiper-container">
<ul class="swiper-wrapper">
{{# list}}
<li class="swiper-slide">
<a href="{{url}}">
<img src="{{img}}" alt="">
</a>
</li>
{{/ list}}
</ul>
</div>
<div class="swiper-pagination">
<div class="pagination-inner">
</div>
</div>
</div>
\ No newline at end of file
... ... @@ -10,10 +10,6 @@
{{> common/icons_enter}}
{{/ iconsEnter}}
{{# bannerCategory}}
{{> common/banner_category}}
{{/ bannerCategory}}
{{! 热门品类}}
{{# hotCategory}}
{{> girls/hot_category}}
... ... @@ -34,7 +30,7 @@
{{> common/trend_topics}}
{{/ trendTopics}}
{{! 潮流时装}}
{{! 潮流时装/经典裤裙/时尚靴履/潮人配饰}}
{{# goodsCategory}}
{{> common/goods_category}}
{{/ goodsCategory}}
... ...
<div class="good-info" data-id="{{id}}">
<div class="tag-container clearfix">
{{# tags}}
{{# is_new}}
<p class="good-tag new-tag">NEW</p>
{{/ is_new}}
{{# is_advance}}
<p class="good-tag renew-tag">再到着</p>
{{/ is_advance}}
{{# is_discount}}
<p class="good-tag sale-tag">SALE</p>
{{/ is_discount}}
{{# is_yohoood}}
<div class="good-tag yohood-tag"></div>
{{/ is_yohoood}}
{{# is_limited}}
<p class="good-tag limit-tag">限量商品</p>
{{/ is_limited}}
{{/ tags}}
</div>
<div class="good-detail-img">
<a class="good-islike {{# is_like}}good-like{{/ is_like}} iconfont" href="{{likeUrl}}">&#xe605;</a>
<a class="good-thumb" href="{{url}}">
<img class="lazy" data-original="{{thumb}}">
</a>
{{# is_soon_sold_out}}
<p class="few-tag">即将售罄</p>
{{/ is_soon_sold_out}}
</div>
<div class="good-detail-text">
<div class="name">
<a href="{{url}}">{{product_name}}</a>
</div>
<div class="price">
<span class="sale-price {{^market_price}}no-price{{/market_price}}">¥{{sales_price}}</span>
{{#market_price}}
<span class="market-price">¥{{.}}</span>
{{/market_price}}
</div>
</div>
</div>
\ No newline at end of file
... ... @@ -89,7 +89,9 @@
</script>
{{/if}}
{{!-- 品类 --}}
{{#if categoryPage}}
<script>
seajs.use('js/homePage/girls');
</script>
\ No newline at end of file
seajs.use('js/category/index');
</script>
{{/if}}
\ No newline at end of file
... ...
... ... @@ -39,6 +39,447 @@ class GirlsController extends AbstractAction
$data['content'][] = array('maybeLike' =>$maybeLike);
}*/
$data = array(
'headerDownload' => array(
'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480',
'url' => 'http://www.baidu.com'
),
'homeHeader' => array(
'bgColor' => '#FF88AE',
'searchUrl' => ''
),
'sideNav' => array(
array(
'textCn' => '男生',
'textEn' => 'Boys',
'styleClass' => 'boys',
'url' => ''
),
array(
'textCn' => '女生',
'textEn' => 'GIRLS',
'styleClass' => 'girls',
'url' => ''
),
array(
'textCn' => '潮童',
'textEn' => 'KIDS',
'styleClass' => 'kids',
'url' => ''
),
array(
'textCn' => '创意生活',
'textEn' => 'LIFE STYLE',
'styleClass' => 'life',
'url' => ''
),
array(
'textCn' => '逛',
'textEn' => 'TRENDFINDER',
'styleClass' => 'guang',
'subNav' => array(
'list' => array(
array(
'textCn' => '逛',
'textEn' => 'TrendFinder',
'back' => true,
'bgColor' => '#fd307f'
),
array(
'textCn' => '查看全部',
'url' => ''
),
array(
'textCn' => '只看男生',
'textEn' => 'Boys',
'url' => ''
),
array(
'textCn' => '只看女生',
'textEn' => 'Girls',
'url' => '',
'isSelect' => true
)
)
)
)
),
'content' => array(
'bannerTop' => array(
'list' => array(
array(
'url' => '',
'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
),
array(
'url' => '',
'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
),
array(
'url' => '',
'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
)
)
),
'iconsEnter' => array(
'list' => array(
array(
'url' => '',
'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
'text' => '新品到着'
),
array(
'url' => '',
'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
'text' => '全球优选'
),
array(
'url' => '',
'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
'text' => '明星潮牌'
),
array(
'url' => '',
'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
'text' => '全部品类'
),
array(
'url' => '',
'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
'text' => '逛'
),
array(
'url' => '',
'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
'text' => '搭配指南'
),
array(
'url' => '',
'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
'text' => '潮品推荐'
),
array(
'url' => '',
'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
'text' => '折扣精选'
)
)
),
'hotCategory' => array(
'title' => array(
'name' => '热门品类'
),
'list' => array(
array(
'textCn' => '卫衣',
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
),
array(
'textCn' => 'T恤',
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
),
array(
'textCn' => '打底衫',
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
),
array(
'textCn' => '打底衫',
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
),
array(
'textCn' => '打底衫',
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
),
array(
'textCn' => '打底衫',
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
),
array(
'textCn' => '打底衫',
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
),
array(
'textCn' => '打底衫',
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
)
)
),
'hotBrands' => array(
'title' => array(
'name' => '热门品牌'
),
'list' => array(
array(
'textCn' => 'Moussy',
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
),
array(
'textCn' => 'Moussy',
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
),
array(
'textCn' => 'Moussy',
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
),
array(
'textCn' => 'Moussy',
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
),
array(
'textCn' => 'Moussy',
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
),
array(
'textCn' => 'Moussy',
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
)
)
),
'trendColloaction' => array(
'title' => array(
'title' => '潮人 ▪ 搭配',
'more_name' => '...',
'more_url' => 'http://www.yohobuy.com?openby:yohobuy={"action":"go.guangchannel","params":{"id":3,"name":"\u6f6e\u4eba"}}'
),
'article' => array(
array(
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
),
array(
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
)
),
'recommend_collocation' => array(
array(
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
),
array(
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
),
array(
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
),
array(
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
),
array(
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
)
)
),
'trendTopics' => array(
'title' => array(
'title' => '潮品 ▪ 话题',
'more_name' => '...',
'more_url' => 'http://www.yohobuy.com?openby:yohobuy={"action":"go.guangchannel","params":{"id":3,"name":"\u6f6e\u4eba"}}'
),
'list' => array(
array(
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => '',
'title' => '现代裁剪',
'time' => '2月13日 12:34'
),
array(
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => '',
'title' => '现代裁剪',
'time' => '2月13日 12:34'
),
array(
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => '',
'title' => '现代裁剪',
'time' => '2月13日 12:34'
)
)
),
'goodsCategory' => array(
'title' => array(
'title' => '潮流时装',
'more_name' => '...',
'more_url' => 'http://www.yohobuy.com?openby:yohobuy={"action":"go.guangchannel","params":{"id":3,"name":"\u6f6e\u4eba"}}'
),
'big_image' => array(
'list' => array(
array(
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => ''
)
)
),
'list' => array(
array(
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => '',
'textCn' => '手表'
),
array(
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => '',
'textCn' => '烛台'
),
array(
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => '',
'textCn' => '围巾'
),
array(
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => '',
'textCn' => '盘子'
),
array(
'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
'url' => '',
'textCn' => '耳机'
)
)
),
'bannerCenter' => array(
'img' => 'http://img02.yohoboys.com/staticimg/2015/06/24/16/02ee02f1dd11c9103f7cf7995eafdaa605.jpg',
'url' => ''
),
'creativeLife' => array(
'name' => '创意生活',
'more' => '',
'url' => '',
'banner' => 'http://img10.static.yhbimg.com/yhb-img01/2015/07/09/18/0119ffceddb0819d36d74b408bd743b4a9.jpg?imageView/2/w/640/h/640',
'classify' => array(
array(
'url' => '',
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/04/10/05/029bef1041343ea2e31dc0423f2f176589.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => '手表'
), array(
'url' => '',
'img' => 'http://img12.static.yhbimg.com/goodsimg/2015/07/07/09/02271a775d17649860abec4387b4559e26.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => '烛台'
), array(
'url' => '',
'img' => 'http://img12.static.yhbimg.com/goodsimg/2015/05/19/07/02a269d20ed44803eee33e255fe88d7873.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => '围巾'
), array(
'url' => '',
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/06/01/07/02fe94083352435ce53b5d90812cc5bdbd.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => '盘子'
), array(
'url' => '',
'img' => 'http://img12.static.yhbimg.com/goodsimg/2015/07/08/07/028db8a2afbe4ecbf37bebc7e98e8e1e80.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => '耳机'
), array(
'url' => '',
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/04/22/02/02a1b688b6dafd786f391e0624aea1e93b.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => '生活'
)
)
),
'plusStar' => array(
'name' => 'PLUS 全球优选',
'url' => '',
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/07/13/15/014f7ba48071160053ac3b8f045b9fc264.jpg?imageView/2/w/640/h/640'
),
'bannerCenter' => array(
'img' => 'http://img02.yohoboys.com/staticimg/2015/06/24/16/02ee02f1dd11c9103f7cf7995eafdaa605.jpg',
'url' => ''
),
'plusStar' => array(
'name' => 'STAR 明星潮牌',
'url' => '',
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/07/13/15/014f7ba48071160053ac3b8f045b9fc264.jpg?imageView/2/w/640/h/640'
),
'bannerCenter' => array(
'img' => 'http://img02.yohoboys.com/staticimg/2015/06/24/16/02ee02f1dd11c9103f7cf7995eafdaa605.jpg',
'url' => ''
),
'maybeLike' => array(
'goods' => array(
array(
'id' => 1,
'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/03/02/07/01ebfb219e22770ffb0c2c3a2cbb2b4bef.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
'isLike' => false,
'price' => 1268,
'salePrice' => 589,
'isSale' => true,
'isFew' => true,
'isNew' => false,
'url' => ''
), array(
'id' => 2,
'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/03/08/023d70c59e81ccbfb39404487aaf642da2.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'CLOTtee 撞色连帽外套',
'isLike' => false,
'price' => 488,
'salePrice' => 139,
'isSale' => true,
'isFew' => true,
'isNew' => false,
'url' => ''
), array(
'id' => 3,
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/03/02/08/02e2d44125e95495e3152aa459fa6b9b0c.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'HALFGIRL 插肩棒球服短裙套装',
'isLike' => true,
'price' => 478,
'salePrice' => 208,
'isSale' => true,
'isFew' => true,
'isNew' => false,
'url' => ''
), array(
'id' => 4,
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/03/03/08/022f25fbe177ee12803c522f04fcce06d0.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => '黄伟文Wyman X yohood联名商品YYYOHOOD连帽卫衣',
'isLike' => false,
'salePrice' => 148,
'isSale' => false,
'isFew' => false,
'isNew' => true,
'url' => ''
)
)
),
'bannerBottom' => array(
'img' => 'http://img02.yohoboys.com/staticimg/2015/06/24/16/02ee02f1dd11c9103f7cf7995eafdaa605.jpg',
'url' => ''
)
));
$this->_view->assign('title', 'YOHO!有货');
$this->_view->display('index', $data);
}
... ...
<?php
use Action\AbstractAction;
use LibModels\Wap\Category\ClassData;
// use LibModels\Wap\Category\ClassData;
/**
* 品牌
... ... @@ -9,18 +9,89 @@ class ClassController extends AbstractAction
{
public function indexAction()
{
$brandsData = ClassData::getClassesData();
// $brandsData = ClassData::getClassesData();
$classes = array();
if($brandsData['code'] == 200)
{
$classes = $brandsData['data'];
}
// $classes = array();
// if($brandsData['code'] == 200)
// {
// $classes = $brandsData['data'];
// }
// echo '<pre>';
// var_dump($classes);exit;
echo '<pre>';
var_dump($classes);exit;
// $this->_view->assign('title', 'YOHO!有货');
// $this->_view->display('class', compact('classes'));
$data = array(
"searchUrl" => "",
"class" => array(
array(
"name" => "Boy",
"focus" => true,
"ca" => array(
array(
"name" => "上衣",
"sub" => array(
array(
"name" => "全部上衣",
"url" => ""
),
array(
"name" => "卫衣",
"url" => ""
)
)
),
array(
"name" => "裤装",
"sub" => array(
array(
"name" => "全部裤装",
"url" => ""
),
array(
"name" => "牛仔裤",
"url" => ""
)
)
)
)
),
array(
"name" => "Girl",
"ca" => array(
array(
"name" => "裙装",
"sub" => array(
array(
"name" => "全部裙装",
"url" => ""
),
array(
"name" => "短裙",
"url" => ""
)
)
),
array(
"name" => "鞋靴",
"sub" => array(
array(
"name" => "全部鞋靴",
"url" => ""
),
array(
"name" => "休闲鞋",
"url" => ""
)
)
)
)
)
)
);
$this->_view->assign('title', 'YOHO!有货');
$this->_view->display('class', compact('classes'));
$this->_view->display('index', array('categoryPage' => true, 'category' => $data));
}
}
\ No newline at end of file
... ...