Authored by liuyue

Merge branch 'feature/hotrank' into 'web'

Feature/hotrank

重构热销排行。
修改了logoBrand插件bug。

review by @王成龙

See merge request !44
... ... @@ -166,7 +166,7 @@
{
slide: {
//大图列表
bigSlide: [
list: [
{
'href': '',
'img': ''
... ... @@ -174,7 +174,7 @@
...
],
//小图列表
smallSlide: [
pagination: [
{
'href': '',
'img': ''
... ... @@ -304,7 +304,7 @@
]
}
## 男首新品上架 ajax数据
### 男首新品上架 ajax数据
{
code:200, //返回状态
commodity:[
... ... @@ -319,8 +319,9 @@
]
}
## 男首优选品牌,logo品牌,ajax数据
### logo品牌,ajax数据
{
moreBrand: '', //更多商品链接
logoBrand: [
{
'href': '',
... ... @@ -587,12 +588,6 @@
}
}
<<<<<<< HEAD
## 逛
### 【公用】资讯
=======
## Passport
### 【公用】左侧YohoFamily LOGO
... ... @@ -622,8 +617,9 @@
}
}
## 站点头部
>>>>>>> 17d25992b3d621fa97bd9318bff69ee5dcbeff5a
## 逛
### 【公用】资讯
{
id: '',
classification: '最新',
... ... @@ -734,7 +730,6 @@
}
}
### 逛详情页
{
guang:{
... ... @@ -840,3 +835,66 @@
coverImg' => '##', //右侧封面地址
}
}
## Product
### 热销排行
{
hotrankPage: true, //引用hotrank.js
hotrank: [
{
slide: {
//大图列表
list: [
{
'href': '',
'img': ''
},
...
]
}
},
{
popular: { //人气单品
name: '', //楼层标题
list: [
{
href: '', //链接
img: '', //图片
title: '', //商品名称
price: '', //商品原价
sPrice: '', //商品现价
rank: '' //排行
}
...
]
}
}
{
hotBrands: { //同上logo品牌 ajax数据
name: '' //楼层标题
}
},
{
hotWeek: { //一周热卖
name: '' //楼层标题
nav: [ //一周热卖导航
{
textCn' => 'TOP100', //导航名称
'url' => '',
'sid' => 1 //对应ajax发送id
}
],
list: [ //同上面商品数据
{
...
}
...
]
}
}
]
}
一键海淘
值得买
我的收藏
... ...
{{> layout/header}}
<div class="hotrank-page home-page yoho-page">
{{# hotrank}}
{{! 头部banner}}
{{# slide}}
{{> index/slide-banner}}
{{/ slide}}
{{! 人气单品}}
{{# popular}}
{{> index/floor-header}}
<div class="popular-goods">
<div class="popular-list clearfix">
{{# list}}
<li class="popular-item{{@index}}">
<div class="item-img">
<a target="_blank" href="{{href}}"><img class="lazy" data-original="{{img}}"></a>
<i class="polular-icon">{{rank}}</i>
</div>
<div class="item-content">
<h2>{{title}}</h2>
<p>¥{{# price}}<span>{{.}}</span>{{/ price}{{sPrice}}</p>
</div>
</li>
{{/ list}}
</div>
</div>
{{/ popular}}
{{! 热门品牌}}
{{# hotBrands}}
{{> index/floor-header}}
<div class="hot-brands logo-brand clearfix"></div>
{{/ hotBrands}}
{{! 一周热卖}}
{{# hotWeek}}
{{> index/floor-header}}
<div class="hot-week">
<div class="hot-cate">
<ul class="clearfix">
{{# nav}}
<li data-sid="{{sid}}">
<a href="javascript:;">{{textCn}}</a>
</li>
{{/ nav}}
</ul>
</div>
<div class="hot-week-list clearfix">
{{# list}}
<!-- <li>
<div class="item-img">
<a target="_blank" href="{{url}}"><img class="lazy" data-original="{{img}}"></a>
<i class="polular-icon">{{rank}}</i>
</div>
<div class="item-content">
<h2>{{title}}</h2>
<p>{{# price}}<span>{{.}}</span>{{/ price}}{{sPrice}}</p>
</div>
</li> -->
{{> product/good}}
{{/ list}}
</div>
<div class="floatlayer">
<ul>
{{# nav}}
<li data-sid="{{sid}}">
<a href="javascript:;"><span>{{textCn}}</span></a>
</li>
{{/ nav}}
</ul>
</div>
</div>
{{/ hotWeek}}
{{/ hotrank}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -81,3 +81,10 @@
seajs.use('js/passport/vertification');
</script>
{{/if}}
{{!-- 热销排行--}}
{{#if hotrankPage}}
<script>
seajs.use('js/product/hotrank');
</script>
{{/if}}
\ No newline at end of file
... ...
... ... @@ -26,7 +26,7 @@
</div>
<div class="good-detail-img">
<a class="good-thumb" href="{{url}}">
<img class="lazy" src="{{thumb}}">
<img class="lazy" data-original="{{thumb}}">
</a>
{{# isFew}}
<p class="few-tag">即将售罄</p>
... ...
... ... @@ -31,9 +31,8 @@ var $ = require('yoho.jquery'),
for (i = 0; i < items.length; i++) {
item = options.fn(items[i]);
console.log(items.length);
if (i % showNum === 5 || i === 5) {
if (i % showNum === 5 || i === 5) {
//插入切换按钮的位置
out = out + '<li class="logo-brand-switch" data-page="' + Math.floor(i / showNum) + '">' +
... ... @@ -44,7 +43,7 @@ var $ = require('yoho.jquery'),
//插入more的位置,more占的是下一页第一个brand的位置,所以page是i/17
out = out + '<li class="brand-more" data-page="' + Math.floor(i / (showNum + 1)) + '">' +
'<a href="{{href}}">MORE ></a></li>' +
'<a href="javascript:;">MORE ></a></li>' +
'<li data-page="' + Math.floor(i / showNum) + '">' + item + '</li>';
} else {
out = out + '<li data-page="' + Math.floor(i / showNum) + '">' + item + '</li>';
... ... @@ -53,7 +52,7 @@ var $ = require('yoho.jquery'),
//加上最后一个more, more占的是下一页第一个brand的位置,这里已经循环不到brand,所以加在末尾
return out + '<li class="brand-more" data-page="' + Math.floor(i / (showNum + 1)) + '">' +
'<a href="{{href}}">MORE ></a></li></ul>';
'<a href="javascript:;">MORE ></a></li></ul>';
});
},
... ... @@ -74,6 +73,7 @@ var $ = require('yoho.jquery'),
'\{{/brandList}}';
brandTpl = Handlebars.compile(brandHtml);
that.$element.html(brandTpl(data));
that.$element.find('.brand-more a').attr('href', data.moreBrand);
lazyLoad(that.$element.find('img.lazy'));
that._bindEvent();
}
... ... @@ -85,7 +85,6 @@ var $ = require('yoho.jquery'),
lazyLoad($('li[data-page=' + showPage + ']').find('img.lazy').trigger('appear'));
that.$element.find('li[data-page=' + hidePage + ']').find('img').fadeOut('normal', function() {
that.$element.find('li').hide();
that.$element.find('li[data-page=' + showPage + ']').show().find('img').fadeIn();
});
},
... ...
/**
* 首页
* @author: liuyue<yue.liu@yoho.cn>
* @date: 2015/12/17
*/
var $ = require('yoho.jquery'),
Handlebars = require('yoho.handlebars'),
lazyLoad = require('yoho.lazyload');
require('../common/slider');
require('../common/logo-brand');
lazyLoad($('img.lazy'));
$('.slide-container').slider();
$('.logo-brand').logoBrand({
showNum: 10,
url: './getBrand'
});
/*
* 一周热卖
*/
(function($) {
var floatlayer = $('.hot-week').find('.floatlayer'),
sid = $('.hot-cate').find('li').eq(0).data('sid'),
weekOffsetTop,
source,
template,
page = 1,
hotCateW = 0,
weekEnd = false;
source = '\{{# list}}' +
'<div class="good-info">' +
'<div class="item-img">' +
'<a class="good-thumb" target="_blank" href="\{{url}}">' +
'<img class="lazy" data-original="\{{img}}">' +
'</a>' +
'</div>' +
'<div class="good-detail-text">' +
'<a target="_blank" href="{{url}}">{{name}}</a>' +
'<p class="price">' +
'<span class="sale-price{{#unless marketPrice}}prime-cost{{/unless}}">' +
'¥{{salePrice}}</span>' +
'{{# marketPrice}}<span class="market-price">¥{{.}}</span>{{/ marketPrice}}' +
'</p>' +
'</div>' +
'</div>' +
'{{/ list}}';
//监听滚动事件,控制浮层样式及下拉加载更多
$(window).on('scroll', function() {
var maxH = weekOffsetTop + $('.hot-week').outerHeight();
//热卖右侧浮动导航位置
weekOffsetTop = $('.hot-week').offset().top;
if ($(this).scrollTop() >= weekOffsetTop - $(window).height() / 2) {
if (floatlayer.offset().top + floatlayer.outerHeight() >= maxH) {
floatlayer.css({
position: 'absolute',
marginTop: 0,
top: $('.hot-week').outerHeight() - floatlayer.outerHeight()
});
} else {
floatlayer.css({
marginTop: -floatlayer.height() / 2
}).stop().animate({
opacity: 1
}, 200, function() {
floatlayer.show();
});
}
} else {
floatlayer.stop().animate({
opacity: 0
}, 200, function() {
floatlayer.hide();
});
}
if (floatlayer.offset().top >= $(this).scrollTop() + ($(window).height() - floatlayer.outerHeight()) / 2) {
floatlayer.css({
position: 'fixed',
marginTop: -floatlayer.height() / 2,
top: '50%'
});
}
//下拉加载
if ($(this).scrollTop() >= weekOffsetTop + $('.hot-week').height() - $(window).height()) {
if (!weekEnd) {
page++;
weekEnd = true; //防止多次请求
weekAjax(sid, page);
}
}
});
//热卖横导航及竖导航的超出显示控制
$('.hot-cate').find('li').each(function(i) {
var maxW = $('.hot-cate').width();
if (hotCateW <= maxW) {
hotCateW = hotCateW + $(this).width();
if (hotCateW >= maxW) {
$('.floatlayer').find('li').eq(i).hide().nextAll().hide();
}
}
});
//热卖横导航点击事件处理
$('.hot-cate').on('click', 'li', function() {
var nowIndex = $(this).index(),
sid = $(this).data('sid');
//处理current样式
$(this).addClass('current').siblings().removeClass('current');
$('.floatlayer').find('li').removeClass('current').eq(nowIndex).addClass('current');
//返回热卖顶部,110为floor-header所占高度
$('body,html').stop().animate({
scrollTop: weekOffsetTop - 110
}, 500);
//调用ajax请求函数,重置page,weekEnd
weekAjax(sid);
page = 1;
});
//热卖右侧悬浮导航点击事件处理
$('.floatlayer').on('click', 'li', function() {
var nowIndex = $(this).index();
$('.hot-cate').find('li').trigger('click');
//处理current样式
$(this).addClass('current').siblings().removeClass('current');
$('.hot-cate').find('li').removeClass('current').eq(nowIndex).addClass('current');
});
/*
* 热卖内容ajax请求
* param: sid(ajax请求的id), page(ajax请求的页码)
*/
function weekAjax(sid, page) {
var param = {};
if (page) {
param = {
sid: sid,
page: page
};
} else {
param = {
sid: sid
};
}
$.ajax({
type: 'GET',
dataType: 'json',
url: '/hotrank/getdata',
data: param,
success: function(res) {
var data;
if (res.code === 200) {
data = {
list: res.data
};
//mustache渲染数据,并替换原内容
template = Handlebars.compile(source);
if (page) {
$('.hot-week-list').append(template(data));
floatlayer.css({
position: 'fixed',
marginTop: -floatlayer.height() / 2,
top: '50%'
});
} else {
$('.hot-week-list').html(template(data));
}
lazyLoad($('img.lazy'));
weekEnd = false;
}
}
});
}
//热卖中导航current类处理
$('.hot-cate').find('li').eq(0).addClass('current');
$('.floatlayer').find('li').eq(0).addClass('current');
})($);
\ No newline at end of file
... ...
.hotrank-page {
width: 1150px;
margin: 0 auto;
.popular-goods {
.popular-list {
width: 1160px;
}
li {
position: relative;
float: left;
width: 378px;
height: 596px;
overflow: hidden;
list-style: none;
margin: 0 8px 0 0;
.item-img {
width: 378px;
height: 506px;
line-height: 506px;
text-align: center;
overflow: hidden;
}
img {
display: block;
width: 100%;
height: 100%;
}
.polular-icon {
position: absolute;
top: 0;
right: 0;
width: 50px;
height: 50px;
line-height: 60px;
background: #ffc513 image-url('product/hotrank/popular-icon.png') no-repeat center center;
text-align: center;
color: #ffc513;
font-weight: bold;
}
.item-content {
width: 378px;
padding: 14px 0 0 0;
height: 77px;
overflow: hidden;
text-align: center;
color: #222;
line-height: 18px;
h2 {
max-height: 36px;
font-size: 12px;
color: #000;
line-height: 18px;
text-align: center;
overflow: hidden;
}
p {
display: inline-block;
margin: 3px 0 0 0;
font-size: 12px;
*zoom: 1;
*display: inline;
text-align: center;
line-height: 20px;
color: #000;
span {
text-decoration: line-through;
margin: 0 10px 0 0;
color: #999;
}
}
}
}
.popular-item6,
.popular-item7,
.popular-item8,
.popular-item9 {
width: 280px;
height: 464px;
margin: 0 10px 0 0;
overflow: hidden;
.item-img {
width: 280px;
height: 374px;
line-height: 374px;
}
.item-content {
width: 280px;
}
}
}
.hot-week {
position: relative;
padding: 0 0 40px;
}
.hot-cate {
height: 45px;
background: #f5f7f6;
overflow: hidden;
li {
float: left;
height: 45px;
line-height: 45px;
display: table-cell;
a {
vertical-align: middle;
padding: 0 26px;
font-size: 14px;
color: #777;
line-height: 20px;
border-left: 1px solid #999;
}
}
li:first-child {
a {
border: none;
}
}
li.current {
a {
font-size: 16px;
color: #000;
}
}
}
.hot-week-list {
width: 1160px;
.good-info {
width: 280px;
height: 464px;
margin: 10px 10px 0 0;
.tag-container {
display: none;
}
.good-detail-img {
height: 374px;
line-height: 374px;
text-align: center;
font-size: 0;
img {
vertical-align: middle;
}
}
.good-detail-text {
height: 77px;
overflow: hidden;
text-align: center;
color: #222;
line-height: 18px;
a {
max-height: 36px;
font-size: 12px;
color: #000;
line-height: 18px;
text-align: center;
overflow: hidden;
}
p {
display: inline-block;
margin: 3px 0 0 0;
font-size: 12px;
*zoom: 1;
*display: inline;
text-align: center;
line-height: 20px;
color: #000;
.sale-price {
text-decoration: line-through;
margin: 0 10px 0 0;
color: #999;
}
}
}
}
}
.floatlayer {
display: none;
position: fixed;
top: 50%;
left: 50%;
margin: 0 0 0 575px;
opacity: 0;
filter: alpha(opacity = 0);
li {
width: 42px;
height: 42px;
border: 2px solid #555;
border-top: none;
border-bottom-width: 1px;
text-align: center;
a {
position: relative;
display: table-cell;
width: 42px;
height: 42px;
vertical-align: middle;
color: #555;
font-size: 12px;
span {
display: inline-block;
vertical-align: middle;
width: 28px;
*zoom: 1;
*display: inline;
word-wrap: break-word;
}
}
}
li:first-child {
border-top: 1px solid #555;
}
li.current, li:hover {
background: #555;
a {
color: #fff;
}
}
}
}
... ...
@import "search", "list", "filter-box", "sort-pager", "good";
\ No newline at end of file
@import "search", "list", "filter-box", "sort-pager", "good", "hot-rank";
\ No newline at end of file
... ...
... ... @@ -270,6 +270,7 @@ class BoysController extends WebAction
public function getBrandAction()
{
$data = array(
'moreBrand' => 'http://www.baidu.com',
'logoBrand' => array(
array(
'href' => 'http://www.yohobuy.com',
... ...
... ... @@ -916,4 +916,432 @@ class IndexController extends AbstractAction
$this->echoJson($data);
}
/*
* 热销排行
*/
public function hotrankAction() {
$data = array(
'hotrankPage' => true,
'hotrank' => array(
array(
'slide' => array(
'list' => array(
array(
'href' => '/?gender=1,3',
'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/26/12/01c3b99f554ad50d9e5a9900719715c94c.jpg'
),
array(
'href' => '/?gender=1,3',
'img' => 'http://img12.static.yhbimg.com/taobaocms/2015/11/27/09/02a4f1c10e1e81574520e5c0239741a076.jpg'
),
array(
'href' => '/?gender=1,3',
'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/26/12/01c3b99f554ad50d9e5a9900719715c94c.jpg'
),
array(
'href' => '/?gender=1,3',
'img' => 'http://img12.static.yhbimg.com/taobaocms/2015/11/27/09/02a4f1c10e1e81574520e5c0239741a076.jpg'
),
array(
'href' => '/?gender=1,3',
'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/26/12/01c3b99f554ad50d9e5a9900719715c94c.jpg'
),
array(
'href' => '/?gender=1,3',
'img' => 'http://img12.static.yhbimg.com/taobaocms/2015/11/27/09/02a4f1c10e1e81574520e5c0239741a076.jpg'
),
array(
'href' => '/?gender=1,3',
'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/26/12/01c3b99f554ad50d9e5a9900719715c94c.jpg'
),
array(
'href' => '/?gender=1,3',
'img' => 'http://img12.static.yhbimg.com/taobaocms/2015/11/27/09/02a4f1c10e1e81574520e5c0239741a076.jpg'
)
)
)
),
array(
'popular' => array(
'name' => '人气单品',
'list' => array(
array(
'href' => '',
'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
'price' => '399',
'sPrice' => '199',
'rank' => '1'
),
array(
'href' => '',
'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
'price' => '399',
'sPrice' => '199',
'rank' => '2'
),
array(
'href' => '',
'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
'price' => '399',
'sPrice' => '199',
'rank' => '3'
),
array(
'href' => '',
'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
'price' => '399',
'sPrice' => '199',
'rank' => '4'
),
array(
'href' => '',
'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
'price' => '399',
'sPrice' => '199',
'rank' => '5'
),
array(
'href' => '',
'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
'price' => '399',
'sPrice' => '199',
'rank' => '6'
),
array(
'href' => '',
'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
'price' => '399',
'sPrice' => '199',
'rank' => '7'
),
array(
'href' => '',
'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
'price' => '399',
'sPrice' => '199',
'rank' => '8'
),
array(
'href' => '',
'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
'price' => '399',
'sPrice' => '199',
'rank' => '9'
),
array(
'href' => '',
'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
'price' => '399',
'sPrice' => '199',
'rank' => '10'
)
)
)
),
array(
'hotBrands' => array(
'name' => '热门品牌'
)
),
array(
'hotWeek' => array(
'name' => '一周热卖',
'nav' => array(
array(
'textCn' => 'TOP100',
'url' => '',
'sid' => 1
),
array(
'textCn' => '上装',
'url' => '',
'sid' => 2
),
array(
'textCn' => '男生测试',
'url' => '',
'sid' => 3
),
array(
'textCn' => '配饰',
'url' => '',
'sid' => 4
)
),
'list' => array(
array(
'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
'marketPrice' => '109',
'salePrice' => '129'
),
array(
'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
'marketPrice' => '109',
'salePrice' => '129'
),
array(
'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
'marketPrice' => '109',
'salePrice' => '129'
),
array(
'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
'marketPrice' => '109',
'salePrice' => '129'
),
array(
'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
'marketPrice' => '109',
'salePrice' => '129'
),
array(
'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
'marketPrice' => '109',
'salePrice' => '129'
),
)
)
)
)
);
$this->_view->display('hotrank', $data);
}
/*
* 热销排行热门品牌ajax
*/
public function getBrandAction()
{
$data = array(
'logoBrand' => array(
array(
'href' => 'http://www.yohobuy.com',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2014/09/25/17/0248182b151d2d59cbeea8e73495d1607a.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/04/10/16/02963cdc1aeab10959bfeccc400aaa8de8.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/04/10/16/02963cdc1aeab10959bfeccc400aaa8de8.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
),
array(
'href' => '',
'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/03/18/16/020d4fec29ade8ccb6bc8e23b02c958a9d.jpg?imageView/2/w/185/h/86'
)
)
);
$this->echoJson($data);
}
}
\ No newline at end of file
... ...