Authored by xuqi

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

Showing 35 changed files with 3009 additions and 324 deletions
... ... @@ -25,6 +25,8 @@ $('.address-item').on('touchend', function() {
orderInfo('addressId', addressId);
orderInfo('address', address);
window.location.href = $this.data('href');
}).on('touchstart', '.edit', function() {
window.location.href = $(this).data('href');
return false;
... ...
... ... @@ -6,6 +6,7 @@
var $ = require('jquery'),
Handlebars = require('yoho.handlebars'),
Hammer = require('yoho.hammer'),
ellipsis = require('mlellipsis'),
loading = require('../plugin/loading'),
tip = require('../plugin/tip'),
... ... @@ -17,14 +18,13 @@ var page = 1,
var conponTmpl = Handlebars.compile($('#tmpl-coupon').html()),
conponNotAvaliableTmpl = Handlebars.compile($('#tmpl-coupon-not-avaliable').html()),
$newCoupon = $('#new-coupon');
$newCoupon = $('#new-coupon'),
$couponList = $('#coupon-list');
var winH = $(window).height();
require('../common');
// conponNotAvaliableTmpl = Handlebars.compile($('#tmpl-coupon-not-avaliable').html()),
function fixedLayOut() {
var $null = $('.null'),
navH = $('.nav-title').height(),
... ... @@ -53,13 +53,14 @@ $newCoupon.on('submit', function() {
url: '/cart/index/couponSearch',
data: $this.serialize()
}).then(function(res) {
if (res.message) {
tip.show(res.message);
}
if (res.code === 200) {
tip.show('优惠券可用');
orderInfo('couponCode', res.data.coupon_code);
orderInfo('couponName', res.data.coupon_title);
window.location.href = '/cart/index/orderEnsure';
} else {
tip.show(res.message || '网络错误');
}
}).fail(function() {
tip.show('网络错误');
... ... @@ -67,30 +68,7 @@ $newCoupon.on('submit', function() {
return false;
});
$('#coupon-list').on('click', '.employ-main', function() {
var $this = $(this);
var couponCode = $this.data('coupon-code');
$.ajax({
method: 'POST',
url: '/cart/index/couponSearch',
data: {
couponCode: couponCode
}
}).then(function(res) {
if (res.code === 200) {
//tip.show('优惠券可用');
orderInfo('couponCode', res.data.coupon_code);
orderInfo('couponName', res.data.coupon_title);
window.location.href = '/cart/index/orderEnsure';
} else {
tip.show(res.message || '网络错误');
}
}).fail(function() {
tip.show('网络错误');
});
}).on('touchstart', '.employ-main', function() {
$couponList.on('touchstart', '.employ-main', function() {
var $this = $(this);
$this.siblings().removeClass('focus');
... ... @@ -164,10 +142,37 @@ function getCouponHandle(coupons) {
}
});
$('#coupon-list').append(conponTmpl({
$couponList.append(conponTmpl({
coupons: coupons
}));
})).find('.employ-main').each(function(i, elem) {
var employHammer = new Hammer(elem);
employHammer.on('tap', function(e) {
var $this = $(e.srcEvent.currentTarget);
var couponCode = $this.data('coupon-code');
$.ajax({
method: 'POST',
url: '/cart/index/couponSearch',
data: {
couponCode: couponCode
}
}).then(function(res) {
if (res.message) {
tip.show(res.message);
}
if (res.code === 200) {
//tip.show('优惠券可用');
orderInfo('couponCode', res.data.coupon_code);
orderInfo('couponName', res.data.coupon_title);
window.location.href = '/cart/index/orderEnsure';
}
}).fail(function() {
tip.show('网络错误');
});
});
});
if (notAvailableCoupons.length) {
$('.not-avaliable-coupon-line').show();
... ... @@ -201,14 +206,14 @@ function getCouponDate() {
}
}).then(getCouponHandle).fail(function() {
page -= 1;
tip.show('加载优惠券失败');
// tip.show('加载优惠券失败');
}).always(function() {
isGetData = false;
loading.hideLoadingMask();
});
}
getCouponDate();
// $(window).scroll(function() {
... ...
... ... @@ -47,7 +47,9 @@ optHammer.on('tap', function(e) {
if (res.message) {
tip.show(res.message);
}
window.location.href = '/home/orders';
setTimeout(function() {
window.location.href = '/home/orders';
}, 2000);
}).fail(function() {
tip.show('网络错误');
});
... ... @@ -76,7 +78,9 @@ optHammer.on('tap', function(e) {
if (res.message) {
tip.show(res.message);
}
window.location.href = '/home/orders';
setTimeout(function() {
window.location.href = '/home/orders';
}, 2000);
}).fail(function() {
tip.show('网络错误');
});
... ...
... ... @@ -171,7 +171,9 @@ orderHammer.on('tap', function(e) {
if (data.code === 200) {
//取消订单页面刷新
window.location.reload();
setTimeout(function() {
window.location.reload();
}, 2000);
}
},
error: function() {
... ...
... ... @@ -6,80 +6,73 @@
var $ = require('jquery'),
Hammer = require('yoho.hammer'),
tip = require('../../plugin/tip'),
chosePanel = require('../../cart/chose-panel');
tip = require('../../plugin/tip'),
chosePanel = require('../../cart/chose-panel');
var likeEle = document.getElementById('likeBtn'),
likeHammer = likeEle && new Hammer(likeEle);
var productId = $('#productId').val();
var addToCartEle = document.getElementById('addtoCart'),
addToCartHammer = addToCartEle && new Hammer(addToCartEle),
productId = $('#productId').val();
$('#likeBtn').on('touchstart', function() {
var opt,
favorite;
if (likeHammer) {
likeHammer.on('tap', function(e) {
var opt,
favorite;
var $this = $(this);
var $this = $(e.target);
if ($this.hasClass('liked')) {
opt = 'cancel';
favorite = 0;
} else {
opt = 'ok';
favorite = 1;
}
if ($this.hasClass('liked')) {
opt = 'cancel';
favorite = 0;
} else {
opt = 'ok';
favorite = 1;
}
$.ajax({
type: 'POST',
url: '/product/opt/favoriteProduct',
data: {
id: productId,
opt: opt
},
success: function(data) {
if (data.code === 200) {
$this.toggleClass('liked');
$.ajax({
type: 'POST',
url: '/product/opt/favoriteProduct',
data: {
id: productId,
opt: opt
},
success: function(data) {
if (data.code === 200) {
$this.toggleClass('liked');
if ('cancel' === opt) {
tip.show('取消收藏成功');
} else if ('ok' === opt) {
tip.show('收藏成功');
}
} else if (data.code === 400) {
location.href = data.data;//未登录跳转登录页
} else {
tip.show(data.message);
if ('cancel' === opt) {
tip.show('取消收藏成功');
} else if ('ok' === opt) {
tip.show('收藏成功');
}
},
error: function() {
tip.show('网络断开连接了~');
} else if (data.code === 400) {
location.href = data.data;//未登录跳转登录页
} else {
tip.show(data.message);
}
});
// 统计代码:用于统计用户加入或取消商品收藏的动作
if (window._yas) {
window._yas.sendCustomInfo({
pd: productId,
fa: favorite
}, true);
},
error: function() {
tip.show('网络断开连接了~');
}
});
}
if (addToCartHammer) {
addToCartHammer.on('tap', function(e) {
chosePanel.show();
// 统计代码:用于统计用户加入或取消商品收藏的动作
if (window._yas) {
window._yas.sendCustomInfo({
pd: productId,
fa: favorite
}, true);
}
//统计代码:用于统计用户加入购物车的动作
if (window._yas) {
window._yas.sendCustomInfo({
pd: productId,
by: 1
}, true);
}
return false;
});
});
}
$('#addtoCart').on('touchstart', function() {
chosePanel.show();
//统计代码:用于统计用户加入购物车的动作
if (window._yas) {
window._yas.sendCustomInfo({
pd: productId,
by: 1
}, true);
}
return false;
});
\ No newline at end of file
... ...
... ... @@ -101,11 +101,15 @@
}
.title {
width: 600rem / $pxConvertRem;
height: 60rem / $pxConvertRem;
line-height: 60rem / $pxConvertRem;
padding: 0 20rem / $pxConvertRem;
font-size: 24rem / $pxConvertRem;
background: #f8f8f8;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.gift-block .tag {
... ...
... ... @@ -2,7 +2,7 @@
<div class="my-address-page select-address-page yoho-page">
<div class="page-wrap clearfix">
{{# address}}
<a class="address-item" data-address-id="{{address_id}}" data-is-support="{{is_support}}" href="/cart/index/orderEnsure">
<div class="address-item" data-address-id="{{address_id}}" data-is-support="{{is_support}}" data-href="/cart/index/orderEnsure">
<span class="name">{{consignee}}</span>
<span class="tel">{{mobile}}</span>
<p class="address-info">{{area}} {{address}}</p>
... ... @@ -10,7 +10,7 @@
<span class="edit" data-href="/home/addressAct?id={{address_id}}&refer=shopping">&#xe61e;</span>
<span class="del" data-id="{{address_id}}">&#xe621;</span>
</div>
</a>
</div>
{{/ address}}
<a class="add-address" data-href="/home/addressAct?refer=shopping">
... ...
{{> layout/header}}
<div class="home-page yoho-page boys" data-page="boys" data-newarrivls='{"url":"/boys/commodity","pageCount":"4","flag":"boys"}'>
<div class="home-page yoho-page boys" data-page="boys">
{{# boys}}
{{! 头部banner}}
{{# slide}}
... ... @@ -69,7 +69,7 @@
{{! 广告}}
{{# adbanner}}
<div class="adbanner">
<div class="floor-ad">
<a href="{{url}}"><img class="lazy" data-original="{{img}}"/></a>
</div>
{{/ adbanner}}
... ...
{{> layout/header}}
<div class="home-page yoho-page brands" data-page="brands">
{{# brands}}
<div class="sit-nav">
<a>BOYS首页<a><span class="sep">></span><a>品牌一览</a>
</div>
<div class="brands-tabs">
<ul class="clearfix">
{{#each tabs}}
<li>
<a href="{{url}}" target="_blank">
<div class="g-mask"></div>
<p class="tips">{{name}}</p>
<img class="lazy" data-original="{{src}}"/>
</a>
<div class="brands-content">
<div class="brands-icon">
{{#each items}}
<a title="{{name}}" href="{{url}}" target="_blank">
<img class="lazy" data-original="{{src}}"/></a>
{{/each}}
</div>
</div>
</li>
{{/each}}
</ul>
<div class="hover-contain">
<div class="hoverarr">
<i></i>
</div>
</div>
</div>
<div class="brands-category">
<div class="category-nav">
<span>BRANDS A-Z:</span>
{{#each category}}
<a href="#{{@key}}">{{@key}}</a>
{{/each}}
</div>
</div>
<div class="brands-list" >
{{#each category}}
<dl class="clearfix" name="{{@key}}">
<dt>{{@key}}</dt>
<dd>
<ul class="clearfix">
{{#each this}}
<li>
<a class="{{hot}}" data-key="{{key}}" href="javascript:void(0);">{{name}}</a>
{{# hot}}
<i class="iconfont">&#xe629;</i>
{{/ hot}}
<div class="brands-dialog"></div>
</li>
{{/each}}
</ul>
</dd>
</dl>
{{/each}}
</div>
{{/ brands}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header}}
<div class="home-page yoho-page brands" data-page="brands">
{{# brands}}
{{! 头部banner}}
{{# slide}}
{{>index/slide-banner}}
{{/ slide}}
{{! 品牌 BRAND}}
{{# brand}}
{{> index/floor-header}}
<div class="brandfloor clearfix">
<ul class="g-list">
{{# list}}
<li>
<a href="{{url}}">
<img class="lazy" data-original="{{src}}" alt="">
</a>
</li>
{{/ list}}
</ul>
</div>
{{/ brand}}
{{! 单品 SINGLE GOODS}}
{{# singlegoods}}
{{> index/floor-header}}
<div class="singlegoods clearfix">
<ul class="g-list">
{{# list}}
<li>
<a href="{{url}}">
<img class="lazy" data-original="{{src}}" alt="">
<div class="singlegoods-title">
<div class="g-mask"></div>
<p>{{name}}</p>
</div>
</a>
</li>
{{/ list}}
</ul>
</div>
{{/ singlegoods}}
{{!视频 VIDEO}}
{{# video}}
{{> index/floor-header}}
<div class="video clearfix">
<ul class="g-list">
{{# list}}
<li>
<a href="{{url}}">
<img class="lazy" data-original="{{src}}" alt="" /><i class="video-play"></i>
<div class="video-title">
<div class="g-mask"></div>
<p>{{name}}</p>
</div>
</a>
</li>
{{/ list}}
</ul>
</div>
{{/ video}}
{{!新闻 NEWS}}
{{# news}}
{{> index/floor-header}}
<div class="news clearfix">
<div class="news-pic">
{{# pics}}
{{>index/slide-banner}}
{{/ pics}}
</div>
<div class="news-txt">
{{# txts}}
<ul>
{{#each list}}
<li>
<i class="iconfont">&#xe619;</i><a href="{{url}}">{{name}}</a>
</li>
{{/each}}
</ul>
{{/ txts}}
</div>
</div>
{{/ news}}
{{!推广 AD}}
{{# ads}}
<div class="ads clearfix">
<ul class="g-list">
{{# list}}
<li>
<a href="{{url}}">
<img class="lazy" data-original="{{src}}" alt="">
<span class="name g-title">{{name}}</span>
<span class="des g-title">{{des}}</span>
</a>
</li>
{{/ list}}
</ul>
</div>
{{/ ads}}
{{/ brands}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header}}
<div class="home-page yoho-page brands" data-page="brands">
{{# brands}}
<div class="sit-nav">
<a href="#">BOYS首页</a><span class="sep">></span><a href="#">品牌一览</a>
</div>
<div class="brands-tabs height-initial">
<ul class="clearfix">
{{#each tabs}}
<li>
<a href="{{url}}" target="_blank">
<div class="g-mask"></div>
<p class="tips">{{name}}</p>
<img class="lazy" data-original="{{src}}"/>
</a>
</li>
{{/each}}
</ul>
<div class="hover-contain">
<div class="hoverarr">
<i></i>
</div>
</div>
</div>
<div class="brands-items clearfix">
{{#each items}}
<div class="brands-item clearfix">
<a class="brands-pic" title="{{name}}" href="{{url}}" target="_blank">
<img class="lazy" data-original="{{src}}"/>
</a>
<div class="brand-info">
<a title="{{name}}" href="{{url}}" target="_blank">
<h3>
{{name}}
</h3>
</a>
<div class="brand-desc">{{desc}}</div>
</div>
</div>
{{/each}}
</div>
<div class="pagination">
<a href="#" class="page_pre" title="上一页"><i class="iconfont">&#xe60f;</i>上一页</a>
<a href="#"><span>1</span></a>
<a href="#" class="cur"><span>2</span></a>
<a href="#"><span>3</span></a>
<a href="#"><span>4</span></a>
<a href="#"><span>5</span></a>
<a><span>...</span></a>
<a href="#"><span>215</span></a>
<a href="#" title="下一页">下一页<i class="iconfont">&#xe60e;</i></a>
</div>
{{/ brands}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header}}
<div class="home-page yoho-page girls" data-page="girls" data-newarrivls='{"url":"/girls/commodity","pageCount":"4","flag":"girls"}'>
<div class="home-page yoho-page girls" data-page="girls">
{{# girls}}
{{! 头部banner}}
... ...
{{> layout/header}}
<div class="home-page yoho-page kids" data-page="kids" data-newarrivls='{"url":"/kids/commodity","pageCount":"4","flag":"kids"}'>
<div class="home-page yoho-page kids" data-page="kids">
{{# kids}}
{{! 头部banner}}
{{# slide}}
... ...
{{> layout/header}}
<div class="home-page yoho-page lifestyle" data-page="lifestyle" data-newarrivls='{"url":"/lifestyle/commodity","pageCount":"4","flag":"lifestyle"}'>
<div class="home-page yoho-page lifestyle" data-page="lifestyle">
{{# lifestyle}}
{{! 头部banner}}
{{# slide}}
... ...
{{# tplrecommend}}
{{> index/floor-header}}
<div class="tpl-recommend clearfix">
{{> index/floor-header}}
<div class="tpl-body clearfix">
<div class="tpl-nav">
<div class="tpl-keywords">
... ...
{{> index/floor-header}}
<div class="singlehot clearfix">
<ul>
{{> index/floor-header}}
<ul class="g-list">
{{#each imgHot}}
<li><a class="impo{{@index}}" href="{{url}}"><img class="lazy" data-original="{{img}}"/></a></li>
{{/each}}
... ...
{{> index/floor-header}}
<div class="commodity clearfix" id="newarrivals">
<div class="commodity-list">
<ul class="clearfix">
</ul>
{{> index/floor-header}}
<div class="goods-container clearfix">
</div>
<div class="loading">
{{# navs}}
<a href="{{href}}">Loading...</a>
{{/ navs}}
</div>
</div>
\ No newline at end of file
... ...
{{# tplrecommend}}
{{> index/floor-header}}
<div class="tpl-recommend clearfix">
{{> index/floor-header}}
<div class="tpl-body clearfix">
<div class="tpl-nav">
<div class="tpl-keywords">
... ...
{{> index/floor-header}}
<div class="commodity clearfix">
{{> index/floor-header}}
<div class="commodity-list">
<ul class="clearfix">
<ul class="g-list clearfix">
{{#each imgHot}}
<li>
<a href="{{url}}"><div class="commodity-img">
... ... @@ -17,7 +17,7 @@
</ul>
</div>
<div class="commodity-brands clearfix">
{{#each bands}}
{{#each brands}}
<a href="{{url}}" title="{{name}}"><img class="lazy" data-original="{{img}}"/></a>
{{/each}}
</div>
... ...
... ... @@ -2,7 +2,7 @@
<div class="slide-accordion clearfix">
<ul>
{{#each slide}}
<li><a title="{{name}}" href="{{href}}"><img class="lazy" data-original="{{img}}"/></a></li>
<li><a title="{{name}}" href="{{href}}"><div class="g-mask"></div><img class="lazy" data-original="{{img}}"/></a></li>
{{/each}}
</ul>
</div>
... ...
... ... @@ -94,4 +94,11 @@
<script>
seajs.use('js/product/hotrank');
</script>
{{/if}}
{{!-- 品牌页 --}}
{{#if brandsHomePage}}
<script>
seajs.use('js/brand/index');
</script>
{{/if}}
\ No newline at end of file
... ...
<div class="good-info" data-skn="{{skn}}">
<div class="good-info" data-skn="{{skn}}" data-id="{{id}}">
<div class="tag-container clearfix">
{{# tags}}
{{# isNew}}
... ...
... ... @@ -45,7 +45,7 @@
</h2>
<ul>
{{#each list}}
<li class="product-list-nav">
<li class="product-list-nav {{#if active}}active{{/if}}">
<h3>
<span class="icon-triangle"></span>
{{name}}
... ... @@ -53,7 +53,7 @@
</h3>
<ul class="sort-child-list">
{{#each childList}}
<li>
<li class="{{#if childActive}}active{{/if}}">
<a href="{{href}}">{{name}}</a>
<span>{{num}}</span>
</li>
... ...
var $ = require('yoho.jquery'),
Handlebars = require('yoho.handlebars');
var $tabs = $('.brands-tabs');
var $list = $('.brands-list');
var $gory = $('.brands-category');
var $brand = $list.find('li>a');
var $category = $gory.find('a');
var $tab = $tabs.find('li>a');
var $arr = $tabs.find('.hoverarr');
var categoryHeight = $category.height();
var categoryTop = $category.offset() ? $category.offset().top : 0;
var timeout;
//用于临时存储数据
var tempdata = {};
var templete = '<div class="brands-layer">';
templete += ' <div class="layer-content">';
templete += ' <div class="title">{{title}}</div>';
templete += ' <div class="clearfix desc">';
templete += ' <img src="{{icon}}">';
templete += ' <p class="right">{{content}}</p>';
templete += ' </div> ';
templete += ' <div class="featured">';
templete += ' <p>{{subtitle}}</p> ';
templete += ' <div class="clearfix"> ';
templete += ' {{#each imgs}}';
templete += ' <img src="{{src}}">';
templete += ' {{/each}}';
templete += ' </div>';
templete += ' </div>';
templete += ' </div>';
templete += '</div>';
$.easing.easeOutQuint = function(x, t, b, c, d) {
return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
};
//头部图片TAB切换展示
$tab.eq(0).parent('li').find('.brands-content').css('z-index', '1');
$tab.hover(function() {
var $this = $(this);
clearTimeout(timeout);
timeout = setTimeout(function() {
var targetLeft = parseFloat($this.offset().left) - parseFloat($tabs.offset().left);
$arr.animate({
left: targetLeft
}, 200, 'easeOutQuint');
}, 200);
$tabs.find('.brands-content').removeAttr('style');
$this.parent('li').find('.brands-content').css('z-index', '1');
}, function() {
clearTimeout(timeout);
});
//品牌类别滚动事件
$(window).scroll(function() {
if ($(this).scrollTop() > categoryTop) {
$gory.addClass('category-fix');
} else {
$gory.removeClass('category-fix');
}
});
//点击字母,页面滚动到相关区域
$category.click(function() {
var name = $(this).attr('href').split('#')[1];
var targetTop = $list.find('[name=' + name + ']').offset().top - categoryHeight;
$('html,body').animate({
scrollTop: targetTop
}, 200);
return false;
});
//浮层代码
function bindTemplete($select, data, templete) {
var $this = $select;
var offset = {
width: $this.width(),
left: $this.offset().left,
right: parseFloat($(window).width()) - parseFloat($this.offset().left) - parseFloat($this.width())
};
var myTemplate;
$list.find('.brands-layer').remove();
myTemplate = Handlebars.compile(templete);
$this.parent('li').find('.brands-dialog').html(myTemplate(data));
if (offset.right - 350 < 0) {
$this.parent('li').find('.brands-layer')
.addClass('brands-layer-right').css('left', -330 - offset.width);
}
}
//鼠标悬浮品牌,请求数据,并且展示
$brand.hover(function() {
var $this = $(this);
var key = $this.attr('data-key');
var options = {
url: '/brands/brandinfo',
type: 'get',
success: function(_data) {
if (_data.code === 200 && _data.brand) {
if (!tempdata.hasOwnProperty(_data.brand.key)) {
tempdata[_data.brand.key] = _data.brand;
}
bindTemplete($this, tempdata[_data.brand.key], templete);
}
}
};
clearTimeout(timeout);
timeout = setTimeout(function() {
if (!tempdata.hasOwnProperty(key)) {
$.ajax(options);
} else {
bindTemplete($this, tempdata[key], templete);
}
}, 200);
}, function() {
clearTimeout(timeout);
$list.find('.brands-layer').remove();
});
... ...
/**
* 首页
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/11/23
*/
var $ = require('yoho.jquery'),
lazyLoad = require('yoho.lazyload');
require('../common/slider');
require('./brands');
lazyLoad($('img.lazy'));
$('.slide-container').slider();
... ...
... ... @@ -10,14 +10,15 @@ var slide;
function switchfun(to) {
$item.each(function(index) {
$(this).css('zIndex', index);
if (index <= to) {
$(this).stop().animate({
left: index * $spn
});
}, 400);
} else {
$(this).stop().animate({
left: (to) * $spn + $width + $spn * (index - to - 1)
});
}, 400);
}
});
}
... ...
var $ = require('yoho.jquery');
function infiniteLoad(options) {
var defaults = {
index: 0,
isload: true,//是否正在加载
isrun: true,//判断是否执行
offset: {
height: null,
width: null
}
};
this.registerEvent = {
before: [],
change: [],
after: []
};
this.options = $.extend(true, {}, defaults, options);
return this;
}
infiniteLoad.prototype.on = function(name, callback) {
var g = this;
var _e = g.registerEvent[name];
if (_e) {
_e.push(callback);
}
return _e;
};
infiniteLoad.prototype.off = function(name, callback) {
var g = this;
var _e = g.registerEvent[name];
var e = [];
$.each(_e, function(name, _callback) {
if (_callback === callback) {
e.push(name);
}
});
$.each(e.reverse(), function(name, _callback) {
_e.splice(_callback, 1);
});
};
infiniteLoad.prototype.exect = function(key, params) {
var g = this;
var e;
if (g.registerEvent[key] && g.registerEvent[key].length > 0) {
for (e in g.registerEvent[key]) {
if (g.registerEvent[key].hasOwnProperty(e)) {
g.registerEvent[key][e](params);
}
}
}
};
infiniteLoad.prototype.init = function() {
var g = this;
var p = this.options;
function __loadMore() {
if (p.isrun && p.isload && g.__directionCalculation()) {
p.isload = false;
p.index++;
g.exect('after', p);
}
g.exect('change', p);
}
g.exect('before', p);
$(window).scroll(__loadMore);
};
infiniteLoad.prototype.emit = function() {
var p = this.options;
p.isload = true;
};
infiniteLoad.prototype.stop = function() {
var p = this.options;
p.isrun = false;
p.isload = false;
};
infiniteLoad.prototype.__directionCalculation = function() {
var p = this.options;
if (p.offset.height && p.offset.height() > 0 && $(window).scrollTop() + $(window).height() >= p.offset.height()) {
return true;
}
if (p.offset.width && p.offset.width() > 0 && $(window).scrollLeft() + $(window).width() >= p.offset.width()) {
return true;
}
return false;
};
module.exports = infiniteLoad;
\ No newline at end of file
var $ = require('yoho.jquery');
//var Lazyload = require('yoho.lazyload');
var Handlebars = require('yoho.handlebars');
var InfiniteLoad = require('../common/infinite-load');
module.exports = function(url, data) {
var $container = $('#newarrivals ul');
function InfiniteLoad(options) {
var defaults = {
index: 0,
isload: true,//是否正在加载
isrun: true,//判断是否执行
offset: {
height: null,
width: null
}
};
this.registerEvent = {
before: [],
change: [],
after: []
};
this.options = $.extend(true, {}, defaults, options);
return this;
}
InfiniteLoad.prototype.on = function(name, callback) {
var g = this;
var _e = g.registerEvent[name];
if (_e) {
_e.push(callback);
}
return _e;
};
InfiniteLoad.prototype.exect = function(key, params) {
var g = this;
var e;
if (g.registerEvent[key] && g.registerEvent[key].length > 0) {
for (e in g.registerEvent[key]) {
if (g.registerEvent[key].hasOwnProperty(e)) {
g.registerEvent[key][e](params);
}
}
}
};
InfiniteLoad.prototype.init = function() {
var g = this;
var p = this.options;
function __loadMore() {
if (p.isrun && p.isload && g.__directionCalculation()) {
p.isload = false;
p.index++;
g.exect('after', p);
}
g.exect('change', p);
}
g.exect('before', p);
$(window).scroll(__loadMore);
};
InfiniteLoad.prototype.emit = function() {
var p = this.options;
p.isload = true;
};
InfiniteLoad.prototype.stop = function() {
var p = this.options;
p.isrun = false;
p.isload = false;
};
InfiniteLoad.prototype.__directionCalculation = function() {
var p = this.options;
if (p.offset.height && p.offset.height() > 0 && $(window).scrollTop() + $(window).height() >= p.offset.height()) {
return true;
}
return false;
};
module.exports = function(data) {
var $container = $('#newarrivals .goods-container');
var $load = $('.loading a');
var load = new InfiniteLoad({
offset: {
... ... @@ -15,6 +99,10 @@ module.exports = function(url, data) {
}
});
var options;
var url = data.url;
delete data.url;
load.on('after', function(p) {
... ... @@ -34,7 +122,7 @@ module.exports = function(url, data) {
myTemplate = Handlebars.compile(load.tpl);
$container.append(myTemplate(data.commodity));
$container.append(myTemplate(data.goods));
//懒加载插件貌似有点问题,图片先直接展示
//Lazyload($container.find('img.lazy'));
... ... @@ -59,19 +147,73 @@ module.exports = function(url, data) {
load.on('before', function() {
//请求模板
// load.tpl = '{{#each this}}';
// load.tpl += '<li>';
// load.tpl += ' <a href="{{url}}"><div class="commodity-img">';
// load.tpl += ' {{# tip}}';
// load.tpl += ' <i class="commodity-tag">{{.}}</i>';
// load.tpl += ' {{/ tip}}';
// load.tpl += ' <img class="lazy" data-original="{{img}}" src="{{img}}"/></div>';
// load.tpl += ' <p class="commodity-name">{{name}}</p>';
// load.tpl += ' <p class="commodity-price"><span>¥{{price}}</span></p>';
// load.tpl += ' </a>';
// load.tpl += '</li>';
// load.tpl += '{{/each}}';
load.tpl = '{{#each this}}';
load.tpl += '<li>';
load.tpl += ' <a href="{{url}}"><div class="commodity-img">';
load.tpl += ' {{# tip}}';
load.tpl += ' <i class="commodity-tag">{{.}}</i>';
load.tpl += ' {{/ tip}}';
load.tpl += ' <img class="lazy" data-original="{{img}}" src="{{img}}"/></div>';
load.tpl += ' <p class="commodity-name">{{name}}</p>';
load.tpl += ' <p class="commodity-price"><span>¥{{price}}</span></p>';
load.tpl += ' </a>';
load.tpl += '</li>';
load.tpl += '<div class="good-info" data-skn="{{skn}}">';
load.tpl += ' <div class="tag-container clearfix">';
load.tpl += ' {{# tags}}';
load.tpl += ' {{# isNew}}';
load.tpl += ' <span class="good-tag new-tag">NEW</span>';
load.tpl += ' {{/ isNew}}';
load.tpl += ' {{# isReNew}}';
load.tpl += ' <span class="good-tag renew-tag">再到着</span>';
load.tpl += ' {{/ isReNew}}';
load.tpl += ' {{# isSale}}';
load.tpl += ' <span class="good-tag sale-tag">SALE</span>';
load.tpl += ' {{/ isSale}}';
load.tpl += ' {{# isNewFestival}}';
load.tpl += ' <span class="good-tag new-festival-tag">新品节</span>';
load.tpl += ' {{/ isNewFestival}}';
load.tpl += ' {{# isLimit}}';
load.tpl += ' <span class="good-tag limit-tag">限量商品</span>';
load.tpl += ' {{/ isLimit}}';
load.tpl += ' {{# isYearEndPromotion}}';
load.tpl += ' <span class="good-tag yep-tag">年终大促</span>';
load.tpl += ' {{/ isYearEndPromotion}}';
load.tpl += ' {{# isYearMidPromotion}}';
load.tpl += ' <span class="good-tag ymp-tag">年中热促</span>';
load.tpl += ' {{/ isYearMidPromotion}}';
load.tpl += ' {{/ tags}}';
load.tpl += ' </div>';
load.tpl += ' <div class="good-detail-img">';
load.tpl += ' <a class="good-thumb" href="{{url}}">';
load.tpl += ' <img class="lazy" data-original="{{thumb}}">';
load.tpl += ' </a>';
load.tpl += ' {{# isFew}}';
load.tpl += ' <p class="few-tag">即将售罄</p>';
load.tpl += ' {{/ isFew}}';
load.tpl += ' {{#if showColBtn}}';
load.tpl += ' <span class="col-btn iconfont{{#if coled}} coled{{/if}}">&#xe616;</span>';
load.tpl += ' {{/if}}';
load.tpl += ' </div>';
load.tpl += ' <div class="good-detail-text">';
load.tpl += ' <a href="{{url}}">{{name}}</a>';
load.tpl += ' <p class="price">';
load.tpl += ' <span class="sale-price{{#unless marketPrice}}prime-cost{{/unless}}">';
load.tpl += ' ¥{{salePrice}}';
load.tpl += ' </span>';
load.tpl += ' {{# marketPrice}}';
load.tpl += ' <span class="market-price">¥{{.}}</span>';
load.tpl += ' {{/ marketPrice}}';
load.tpl += ' </p>';
load.tpl += ' </div>';
load.tpl += '</div>';
load.tpl += '{{/each}}';
load.emit();
});
... ...
... ... @@ -7,7 +7,8 @@
var $ = require('yoho.jquery'),
lazyLoad = require('yoho.lazyload'),
homePage = $('.home-page').data('page'),
$data = JSON.parse($('.home-page').attr('data-newarrivls'));
brandUrl = $('.logo-brand').data('url');
require('../common/slider');
require('../common/slider2');
... ... @@ -16,10 +17,14 @@ require('../common/logo-brand');
require('../common/accordion');
require('../common/new-arrivls')($data.url, {
pageCount: $data.pageCount,
flag: $data.flag
});
if (['boys','girls','kids','lifestyle'].indexOf(homePage) > -1) {
require('../common/new-arrivls')({
type: homePage,
url: '/common/getNewArrival',
pageCount: homePage === 'boys' ? '15' : '20'
});
}
lazyLoad($('img.lazy'));
if (homePage === 'boys') {
... ...
... ... @@ -92,9 +92,12 @@ exports.init = function(num) {
display: 'none'
});
$.ajax({
type: 'GET',
type: 'post',
url: '/product/index/productColor',
dataType: 'json'
dataType: 'json',
data: {
id: $goodItem.attr('data-id')
}
}).then(function(data) {
ulStr = createColorList(data).colorListStr; //ajax请求的颜色列表
... ...
//公共样式g-
.g-list{
li{
float: left;
a{
position: relative;
display: block;
overflow: hidden;
img{
width: 100%;
height: 100%;
}
}
}
}
.g-mask{
display: block;
position: absolute;
height: 100%;
width: 100%;
z-index: 1;
background: #000;
@include opacity(0.5);
overflow: hidden;
-webkit-transition: opacity 0.6s;
transition: opacity 0.6s;
}
.g-title{
display: block;
text-align: center;
font-weight: bold;
line-height: 2;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
word-break: keep-all;
white-space: nowrap;
}
/**
* 热门推荐模板样式
*/
... ... @@ -77,6 +116,9 @@
height: 32px;
line-height: 32px;
font-size: 12px;
&:hover{
text-decoration: underline;
}
}
}
}
... ... @@ -111,14 +153,9 @@
*/
.home-page{
.singlehot{
a{
display: block;
img{display: block;width: 100%;height: 100%;}
}
overflow: hidden;
margin-left:-8px;
li{
float: left;
margin-left:8px;
margin-bottom:8px;
}
... ... @@ -132,7 +169,7 @@
width: 323px;
}
}
.adbanner{
.floor-ad{
a{
display: block;
img{display: block;width: 100%;height: 100%;}
... ... @@ -141,21 +178,25 @@
height: 129px;
}
}
.goods-container{
margin-right:-10px;
.good-info{
width: 240px;
.good-detail-img{
height: 320px;
}
}
.price{
text-align: center;
}
}
}
/**
* 新品上架模板样式
*/
.home-page{
.commodity{
a{
display: block;
img{display: block;width: 100%;height: 100%;}
}
.commodity-list{
margin-left: -10px;
li{
float: left;
margin-left: 10px;
}
i{
... ... @@ -205,14 +246,30 @@
float: left;
margin-left: 8px;
display: block;
img{
width: 100%;
height: 100%;
}
}
}
.loading{
position: relative;
width: 100%;
text-align: center;
font-size: 16px;
top: -20px;
a{
display: block;
height: 35px;
width: 120px;
margin: 0 auto 40px;
background-color: #000;
color: #fff;
font-size: 14px;
line-height: 35px;
text-align: center;
}
}
}
//990
... ... @@ -220,9 +277,9 @@
.commodity-list{
a{
height: 400px;
width: 240px;
}
.commodity-img{
width: 240px;
height: 320px;
}
i.top{
... ... @@ -241,6 +298,7 @@
}
}
.home-page{
.slide-accordion{
overflow: hidden;
... ... @@ -249,6 +307,7 @@
a{
display: block;
img{display: block;width: 100%;height: 100%;}
position: relative;
}
ul{
position: absolute;
... ... @@ -256,10 +315,17 @@
}
li{
position: absolute;
border-left: 5px solid #fff;
a{
width: 558px;
height: 342px;
border-left: 5px solid #fff;
}
}
.g-mask{
@include opacity(0.2);
&:hover{
@include opacity(0);
}
}
}
... ... @@ -279,23 +345,15 @@
.tpl-brands{
margin-top:-8px!important;
}
.commodity{
.commodity-list{
a{
height: 360px!important;
}
.commodity-img{
width: 188px!important;
height: 255px!important;
}
i.top{
height: 52px!important;
width: 52px!important;
line-height: 52px!important;
font-size: 14px!important;
.goods-container{
.good-info{
width: 188px;
.good-detail-img{
height: 255px;
}
}
}
}
... ... @@ -306,14 +364,14 @@
@media screen and (min-width: 1150px) {
.home-page{
.tpl-recommend{
.tpl-nav{
width: 185px;
.keywords0{
margin-bottom: 10px;
height: 152px;
.tpl-nav{
width: 185px;
.keywords0,.keywords1,.keywords2{
margin-bottom:10px;
height: 76px;
}
.keywords1{
height: 86px;
.keywords2{
margin-bottom:0px;
}
.tpl-category{
a{
... ... @@ -343,6 +401,7 @@
}
}
}
.singlehot{
li a{
width: 185px;
... ... @@ -358,14 +417,33 @@
height: 150px;
}
}
.slide-accordion{
height: 400px;
li{
a{
width: 650px;
height: 400px;
}
}
}
.goods-container{
.good-info{
width: 280px;
.good-detail-img{
height: 374px;
}
}
}
.commodity{
.commodity-list{
a{
height: 465px;
width: 280px;
}
.commodity-img{
height: 374px;
width: 280px;
}
i.top{
height: 60px;
... ... @@ -381,34 +459,753 @@
}
}
}
.slide-accordion{
height: 400px;
}
.boys{
.tpl-nav{
width: 185px!important;
.keywords0{
margin-bottom: 10px!important;
height: 152px!important;
}
.keywords1{
height: 86px!important;
}
.tpl-category{
a{
height: 38px!important;
line-height: 38px!important;
font-size: 14px!important;
}
}
}
.goods-container{
.good-info{
width: 222px!important;
.good-detail-img{
height: 298px!important;
}
}
}
}
}
.brands{
.brands-tabs{
margin: 20px auto;
position: relative;
a{
display: block;
img{
width: 100%;
height: 100%;
display: block;
}
}
li{
float: left;
p{
display: block;
font-size: 30px;
text-align: center;
color: #dedede;
position: absolute;
top: 50%;
width: 100%;
margin-top: -15px;
z-index: 3;
}
.g-mask{
@include opacity(0.4);
}
&:hover .g-mask{
@include opacity(0);
}
}
.brands-content{
position: absolute;
left: 0;
.brands-icon{
padding: 0 4px;
a{
float: left;
width: 80px;
height: 50px;
}
}
}
.hover-contain{
position: relative;
border-bottom: 1px solid #dfdfdf;
.hoverarr{
background-color: #3d3d3d;
position: absolute;
bottom: 0px;
z-index: 1000;
i{
width: 0;
height: 0;
position: absolute;
left: 50%;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #3d3d3d;
top: -6px;
margin-left: -3px;
}
}
}
}
.category-nav{
border: 2px solid #222;
padding-left: 16px;
height: 44px;
line-height: 44px;
font-size: 12px;
font-weight: bold;
position: relative;
top: 1px;
z-index: 100;
background-color: #fff;
span{
display: inline-block;
margin-right: 15px;
}
a{
display: inline-block;
padding: 0 7px;
text-align: center;
color: #222;
cursor: pointer;
}
}
.category-fix{
position: fixed;
top: 0;
z-index: 100;
margin-top:0!important;
}
.brands-list{
dl{
border-top: 1px dotted #999;
padding: 20px 0;
position: relative;
}
dt{
width: 130px;
text-align: center;
font-weight: bold;
font-size: 16px;
text-align: center;
top: 50%;
margin-top: -9px;
position: absolute;
}
dd{
margin-left: 130px;
li{
float: left;
display: block;
width: 170px;
height: 18px;
}
a{
color: #666;
line-height: 18px;
font-size: 12px;
position: relative;
&:hover{
text-decoration:underline;
}
}
.brands-dialog{
display: inline;
position: relative;
}
.hot{
font-weight: bold;
color:#222;
}
i {
position: relative;
top: -4px;
color: #ee0011;
font-size: 10px;
line-height: 10px;
-webkit-transform: scale(0.9);
}
}
}
//990
.sit-nav{
padding-top: 10px;
padding-left: 22px;
font-size: 12px;
.sep{
margin: 0 6px;
}
}
.brands-category{
margin-top: 84px;
width: 990px;
}
.brands-tabs{
ul{
margin-left: -9px;
}
li{
margin-left: 9px;
a{
width: 190px;
height: 154px;
position: relative;
}
}
.brands-content{
width: 990px;
top: 200px;
.brands-icon{
margin-left: -33px;
padding: 0 4px;
a{
width: 650px;
height: 400px;
float: left;
width: 68px;
height: 44px;
margin-left: 33px;
}
}
}
.hover-contain{
height: 25px;
.hoverarr{
height: 4px;
width: 190px;
}
}
}
.boys{
.commodity{
.commodity-list{
.brandfloor{
//990
ul{
margin-left: -12px;
}
li{
margin-left: 12px;
margin-bottom:26px;
a{
width: 322px;
height: 206px;
}
}
}
.singlegoods{
//990
ul{
margin-left: -10px;
}
li{
margin-left: 10px;
margin-bottom:10px;
a{
width: 240px;
height: 322px;
}
}
.singlegoods-title{
position: absolute;
left: 0;
bottom: 0;
height: 50px;
width: 100%;
p{
position: absolute;
z-index: 2;
top: 0;
left: 0;
display: block;;
width: 100%;
height: 100%;
line-height: 50px;
font-size: 18px;
text-align: center;
color: #fff;
}
}
}
.video{
ul{
margin-left: -10px;
}
li{
margin-left: 10px;
margin-bottom:10px;
a{
width: 323px;
height: 208px;
}
}
.video-play{
display: block;
position: absolute;
left: 50%;
top: 50%;
margin-left: -30px;
margin-top: -28px;
width: 60px;
height: 56px;
background-image: image-url("index/play.png");
}
.video-title{
position: absolute;
left: 0;
bottom: 0;
height: 32px;
width: 100%;
p{
position: absolute;
z-index: 2;
top: 0;
left: 0;
display: block;;
width: 100%;
height: 100%;
font-size: 14px;
line-height: 32px;
text-align: center;
color: #fff;
}
}
}
.news{
margin-bottom: 30px;
.news-pic{
float: left;
width: 660px;
height: 376px;
.slide-wrapper{
height: 376px;
img{
height: 376px;
}
&:hover {
.slide-switch.show {
display: none;
}
}
}
.slide-tips{
position: absolute;
left: 0;
bottom: 0;
height: 30px;
width: 100%;
p{
position: absolute;
left: 18px;
z-index: 2;
height: 30px;
font-size: 14px;
line-height: 30px;
color: #fff;
}
}
.slide-pagination{
right: 0;
left: initial;
bottom: 0;
.slide-shade{
@include opacity(0);
background:none;
}
}
}
.news-txt{
float: right;
padding: 20px 16px;
width: 284px;
height: 334px;
float: right;
border: 1px solid #000;
overflow: auto;
li{
position: relative;
display: block;
margin-top: 12px;
margin-left: 20px;
}
a{
font-size: 14px;
line-height: 24px;
cursor: pointer;
color: #010101;
display: block;
&:hover {
color: #fff;
background: #000;
padding-left: 12px;
-webkit-transition: padding 0.4s;
transition: padding 0.4s;
}
}
i{
position: absolute;
top: -6px;
left: -26px;
font-size: 30px;
}
}
}
.ads{
margin-bottom: 30px;
ul{
margin-left: -10px;
}
li{
margin-left: 10px;
margin-bottom: 10px;
a{
width: 240px;
img{
height: 140px;
}
}
.name{
font-size: 14px
}
.des{
font-size: 12px;
}
}
}
.brands-items{
margin: 25px auto;
.brands-item{
float: left;
padding: 15px 0;
width: 50%;
}
a.brands-pic{
float: left;
width: 240px;
height: 116px;
display: block;
img{
width: 100%;
height: 100%;
}
}
.brand-info{
float: right;
padding: 0 20px;
width: 212px;
color: #000;
h3{
width: 100%;
font-size: 20px;
line-height: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.brand-desc{
padding: 12px 0;
height: 72px;
font-size: 14px;
line-height: 22px;
overflow: hidden;
text-overflow: ellipsis;
word-wrap: break-word;
}
}
}
.pagination{
margin-top: 60px;
margin-bottom: 60px;
text-align: center;
a {
height: 24px;
padding: 0 9px;
line-height: 24px;
display: inline-block;
text-align: center;
margin-right: 8px;
color: #222;
font-size: 12px;
i{
position: relative;
top: -1px;
font-size: 10px;
-webkit-transform: scale(0.8);
}
}
a.cur {
background: #222;
color: #fff;
}
}
}
@media screen and (min-width: 1150px) {
.brands{
.sit-nav{
padding-left: 26px;
font-size: 12px;
.sep{
margin: 0 8px;
}
}
.brands-category{
width: 1150px;
}
.brands-tabs{
ul{
margin-left: -10px;
}
li{
margin-left: 10px;
a{
height: 408px!important;
width: 222px;
height: 180px;
}
.commodity-img{
height: 298px!important;
width: 222px!important;
}
.brands-content{
width: 1150px;
top: 230px;
.brands-icon{
margin-left: -38px;
padding: 0 4px;
a{
float: left;
width: 80px;
height: 50px;
margin-left: 38px;
}
}
i.top{
height: 60px!important;
width: 60px!important;
line-height: 60px!important;
font-size: 20px!important;
}
.hover-contain{
height: 30px;
.hoverarr{
height: 5px;
width: 222px;
}
}
}
.brandfloor{
ul{
margin-left: -10px;
}
li{
margin-left: 10px;
margin-bottom:32px;
a{
width: 376px;
height: 206px;
}
}
}
.singlegoods{
//990
ul{
margin-left: -10px;
}
li{
margin-left: 10px;
margin-bottom:10px;
a{
width: 280px;
height: 376px;
}
}
.singlegoods-title{
position: absolute;
left: 0;
bottom: 0;
height: 50px;
width: 100%;
p{
position: absolute;
z-index: 2;
top: 0;
left: 0;
display: block;;
width: 100%;
height: 100%;
line-height: 50px;
font-size: 18px;
text-align: center;
color: #fff;
}
}
}
.video{
ul{
margin-left: -10px;
}
li{
margin-left: 10px;
margin-bottom:10px;
a{
width: 376px;
height: 240px;
}
}
.video-play{
display: block;
position: absolute;
left: 50%;
top: 50%;
margin-left: -30px;
margin-top: -28px;
width: 60px;
height: 56px;
background-image: image-url("index/play.png");
}
.video-title{
position: absolute;
left: 0;
bottom: 0;
height: 32px;
width: 100%;
p{
position: absolute;
z-index: 2;
top: 0;
left: 0;
display: block;;
width: 100%;
height: 100%;
font-size: 14px;
line-height: 32px;
text-align: center;
color: #fff;
}
}
}
.news{
.news-pic{
width: 764px;
height: 436px;
.slide-wrapper{
height: 436px;
img{
height: 436px;
}
}
}
.news-txt{
width: 342px;
height: 394px;
}
}
.ads{
ul{
margin-left: -10px;
}
li{
margin-left: 10px;
margin-bottom: 10px;
a{
width: 280px;
img{
height: 160px;
}
}
.name{
font-size: 14px
}
.des{
font-size: 12px;
}
}
}
.brands-items{
a.brands-pic{
width: 280px;
height: 136px;
}
.brand-info{
width: 255px;
color: #000;
.brand-desc{
height: 92px;
}
}
}
}
}
\ No newline at end of file
}
.brands-layer{
position: absolute;
z-index: 100;
top: -83px;
left: 15px;
width: 325px;
height: 287px;
background: url(http://static.yohobuy.com/images/v3/index/brands-layer.png) no-repeat;
font-weight: normal;
.layer-content{
padding: 20px 20px 20px 35px;
.title{
font-size: 24px;
line-height: 24px;
border-bottom: 1px solid #ccc;
padding-bottom: 5px;
}
.desc{
margin: 5px 0 5px 0;
height: 72px;
overflow: hidden;
img{
width: 80px;
height: 50px;
margin: 3px 5px 0 0;
float: left;
}
.right{
width: 180px;
float: right;
font-size: 12px;
line-height: 150%;
}
}
.featured{
font-size: 16px;
margin-right: -15px;
img{
height: 100px;
width: 80px;
float: left;
margin: 15px 15px 0 0;
}
}
}
}
.brands-layer-right{
background: url(http://static.yohobuy.com/images/v3/index/brands-layer.png) no-repeat 0 -287px;
left: -325px;
top: -83px;
.layer-content{
padding: 20px 35px 20px 20px;
}
}
... ...
... ... @@ -58,9 +58,9 @@
}
}
}
/*ul.sort-child-list {
ul.sort-child-list {
display: block;
}*/
}
}
}
... ... @@ -73,6 +73,15 @@
li {
color: #bbb;
&.active {
background: #333;
color: #fff;
a {
color: #fff;
}
}
span {
padding-left: 5px;
}
... ...
<?php
use Action\AbstractAction;
/**
* 品牌首页
*/
class BrandsController extends AbstractAction
{
public function brandsAction()
{
$headerdata = array(
'gobytype' => 'gobuyboys',
'searchcate' => 'searchcateboys',
'navbars' => array(
array(
'name_cn' => '男生',
'name_en' => 'BOYS',
'link' => '',
'classname' => 'boys',
'index_main' => 0,
'subnav' => array(
array(
'name' => '男首1',
'link' => '',
'index_sub' => 0,
'thirdnav' => array(
array(
'title' => '上装',
'branditems' => array(
array(
'brandname' => '背心',
'link' => ''
),
array(
'brandname' => 'T恤',
'link' => ''
)
)
)
)
),
array(
'name' => '男首2',
'link' => '',
'index_sub' => 1,
'thirdnav' => array(
array(
'title' => '上装',
'branditems' => array(
array(
'brandname' => '背心',
'link' => ''
),
array(
'brandname' => 'T恤',
'link' => ''
)
)
)
)
),
array(
'name' => '男首3',
'link' => '',
'index_sub' => 2,
'thirdnav' => array(
array(
'title' => '上装',
'branditems' => array(
array(
'brandname' => '背心',
'link' => ''
),
array(
'brandname' => 'T恤',
'link' => ''
)
)
)
)
)
)
),
array(
'name_cn' => '女生',
'name_en' => 'GIRLS',
'link' => 'http=>//www.baidu.com',
'classname' => '',
'index_main' => 0,
'subnav' => array(
array(
'name' => '女生1',
'link' => '',
'index_sub' => 0,
'thirdnav' => array(
array(
'title' => '上装',
'branditems' => array(
array(
'brandname' => '背心',
'link' => ''
),
array(
'brandname' => 'T恤',
'link' => ''
)
)
)
)
),
array(
'name' => '女生2',
'link' => '',
'index_sub' => 1,
'thirdnav' => array(
array(
'title' => '上装',
'branditems' => array(
array(
'brandname' => '背心',
'link' => ''
),
array(
'brandname' => 'T恤',
'link' => ''
)
)
)
)
),
array(
'name' => '女生3',
'link' => '',
'index_sub' => 2,
'thirdnav' => array(
array(
'title' => '上装',
'branditems' => array(
array(
'brandname' => '背心',
'link' => ''
),
array(
'brandname' => 'T恤',
'link' => ''
)
)
)
)
)
)
)
),
'myyoho' => array(
'email' => 'hhh@126.com',
'viptype' => '普通会员',
'currentscore' => 495,
'totalscore' => 600,
'cardtype' => '银卡',
'infolist' => array(
array(
'name' => '待处理的订单',
'link' => '',
'num' => '0'
),
array(
'name' => '我的收藏',
'link' => '',
'num' => '1'
),
array(
'name' => '我的优惠券',
'link' => '',
'num' => '2'
),
array(
'name' => '我的YOHO币',
'link' => '',
'num' => '1'
),
array(
'name' => '我的退货换货',
'link' => '',
'num' => '1'
)
),
'updlink' => ''
),
'gobuy' => array(
'gobuynum' => 3
),
'breadcrumbnav' => array(
array(
'notend' => array(
'link' => 'http=>//www.baidu.com',
'name' => 'BOYS首页'
)
),
array(
'notend' => array(
'link' => 'http=>//www.baidu.com',
'name' => '上衣'
)
),
array(
'isend' => array(
'link' => 'http=>//www.baidu.com',
'name' => '衬衫'
)
)
)
);
$imgsrc = 'http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg';
$item = array(
'name' => 'cc',
'key' => '1000011'
);
$item0 = array(
'name' => 'cc',
'hot' => 'hot',
'key' => '1000012'
);
$item1 = array(
'name' => '所有品牌',
'src' => $imgsrc,
'url' => ''
);
$item2 = array(
'name' => '所有品牌',
'src' => $imgsrc,
'url' => '',
'items' => array(
$item1,
$item1,
$item1,
$item1,
$item1,
$item1,
$item1,
$item1,
$item1,
$item1
)
);
$data = array(
'brandsHomePage' => true,
'headerdata' => $headerdata,
'brands' => array(
'category' => array(
'A' => array(
$item,
$item,
$item,
$item,
$item,
$item,
$item,
$item,
$item
),
'B' => array(
$item,
$item,
$item0,
$item,
$item,
$item,
$item,
$item,
$item
),
'C' => array(
$item,
$item,
$item,
$item,
$item,
$item,
$item,
$item,
$item
),
'D' => array(
$item,
$item,
$item,
$item,
$item,
$item,
$item,
$item,
$item,
$item,
$item0,
$item,
$item,
$item,
$item,
$item,
$item,
$item,
$item,
$item,
$item,
$item,
$item,
$item,
$item
),
'E' => array(
$item,
$item,
$item0,
$item,
$item,
$item,
$item,
$item,
$item
),
'F' => array(
$item0,
$item,
$item,
$item0,
$item0,
$item,
$item0,
$item,
$item
),
'G' => array(
$item,
$item,
$item,
$item,
$item,
$item0,
$item,
$item,
$item
),
'H' => array(
$item,
$item,
$item,
$item,
$item,
$item,
$item0,
$item,
$item
),
'I' => array(
$item,
$item,
$item0,
$item0,
$item0,
$item0,
$item,
$item,
$item
),
'J' => array(
$item,
$item,
$item,
$item,
$item0,
$item,
$item,
$item,
$item
),
'K' => array(
$item,
$item,
$item,
$item,
$item,
$item,
$item,
$item,
$item
),
'L' => array(
$item,
$item0,
$item,
$item,
$item,
$item,
$item,
$item,
$item
),
'M' => array(
$item,
$item0,
$item,
$item,
$item,
$item,
$item,
$item,
$item
),
'N' => array(
$item,
$item0,
$item0,
$item0,
$item,
$item,
$item,
$item,
$item
)
),
'tabs' => array(
$item2,
$item2,
$item2,
$item2,
$item2
)
)
);
$this->_view->display('brands', $data);
}
/**
* 品牌接口数据
*
* @param
* string id 获取品牌ID
* @return json
*/
public function brandinfoAction()
{
$result = array();
do {
/* 判断是不是AJAX请求 */
if (! $this->isAjax()) {
break;
}
$imgsrc = 'http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg';
$data = array(
'key' => '1000011',
'icon' => $imgsrc,
'title' => '优显led触控台灯',
'content' => '优显led触控台灯优显led触控台灯优显led触控台灯优显led触控台灯',
'subtitle' => 'AAAAAA',
'imgs' => array(
array(
'src' => $imgsrc
),
array(
'src' => $imgsrc
),
array(
'src' => $imgsrc
)
)
) // 提示
;
$result = array(
'code' => 200,
'brand' => $data
);
} while (false);
$this->echoJson($result);
}
/**
* 品牌一览
*/
public function indexAction()
{
$headerdata = array(
'gobytype' => 'gobuyboys',
'searchcate' => 'searchcateboys',
'navbars' => array(
array(
'name_cn' => '男生',
'name_en' => 'BOYS',
'link' => '',
'classname' => 'boys',
'index_main' => 0,
'subnav' => array(
array(
'name' => '男首1',
'link' => '',
'index_sub' => 0,
'thirdnav' => array(
array(
'title' => '上装',
'branditems' => array(
array(
'brandname' => '背心',
'link' => ''
),
array(
'brandname' => 'T恤',
'link' => ''
)
)
)
)
),
array(
'name' => '男首2',
'link' => '',
'index_sub' => 1,
'thirdnav' => array(
array(
'title' => '上装',
'branditems' => array(
array(
'brandname' => '背心',
'link' => ''
),
array(
'brandname' => 'T恤',
'link' => ''
)
)
)
)
),
array(
'name' => '男首3',
'link' => '',
'index_sub' => 2,
'thirdnav' => array(
array(
'title' => '上装',
'branditems' => array(
array(
'brandname' => '背心',
'link' => ''
),
array(
'brandname' => 'T恤',
'link' => ''
)
)
)
)
)
)
),
array(
'name_cn' => '女生',
'name_en' => 'GIRLS',
'link' => 'http=>//www.baidu.com',
'classname' => '',
'index_main' => 0,
'subnav' => array(
array(
'name' => '女生1',
'link' => '',
'index_sub' => 0,
'thirdnav' => array(
array(
'title' => '上装',
'branditems' => array(
array(
'brandname' => '背心',
'link' => ''
),
array(
'brandname' => 'T恤',
'link' => ''
)
)
)
)
),
array(
'name' => '女生2',
'link' => '',
'index_sub' => 1,
'thirdnav' => array(
array(
'title' => '上装',
'branditems' => array(
array(
'brandname' => '背心',
'link' => ''
),
array(
'brandname' => 'T恤',
'link' => ''
)
)
)
)
),
array(
'name' => '女生3',
'link' => '',
'index_sub' => 2,
'thirdnav' => array(
array(
'title' => '上装',
'branditems' => array(
array(
'brandname' => '背心',
'link' => ''
),
array(
'brandname' => 'T恤',
'link' => ''
)
)
)
)
)
)
)
),
'myyoho' => array(
'email' => 'hhh@126.com',
'viptype' => '普通会员',
'currentscore' => 495,
'totalscore' => 600,
'cardtype' => '银卡',
'infolist' => array(
array(
'name' => '待处理的订单',
'link' => '',
'num' => '0'
),
array(
'name' => '我的收藏',
'link' => '',
'num' => '1'
),
array(
'name' => '我的优惠券',
'link' => '',
'num' => '2'
),
array(
'name' => '我的YOHO币',
'link' => '',
'num' => '1'
),
array(
'name' => '我的退货换货',
'link' => '',
'num' => '1'
)
),
'updlink' => ''
),
'gobuy' => array(
'gobuynum' => 3
),
'breadcrumbnav' => array(
array(
'notend' => array(
'link' => 'http=>//www.baidu.com',
'name' => 'BOYS首页'
)
),
array(
'notend' => array(
'link' => 'http=>//www.baidu.com',
'name' => '上衣'
)
),
array(
'isend' => array(
'link' => 'http=>//www.baidu.com',
'name' => '衬衫'
)
)
)
);
$imgsrc = 'http://img01.yohoboys.com/staticimg/2015/11/26/17/01350e0e001b91af0fc91c974a772b931c.png';
$name_href = array(
'name' => '衣服',
'url' => ''
);
$name_href_img = array(
'href' => '',
'src' => $imgsrc,
'name' => '优显led触控台灯'
);
$data = array(
'brandsHomePage' => true,
'headerdata' => $headerdata,
'brands' => 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(
'brand' => array(
'name' => '品牌 BRAND',
'navs' => array(
array(
'id' => '',
'href' => '',
'name' => '设计师品牌'
),
array(
'id' => '',
'href' => '',
'name' => '街头品牌'
),
array(
'id' => '',
'href' => '',
'name' => '明星品牌'
)
),
'list' => array(
$name_href_img,
$name_href_img,
$name_href_img,
$name_href_img,
$name_href_img,
$name_href_img,
$name_href_img,
$name_href_img,
$name_href_img
)
)
),
array(
'singlegoods' => array(
'name' => '单品 SINGLE GOODS',
'navs' => array(
array(
'id' => '',
'href' => '',
'name' => '设计师品牌'
),
array(
'id' => '',
'href' => '',
'name' => '街头品牌'
),
array(
'id' => '',
'href' => '',
'name' => '明星品牌'
)
),
'list' => array(
$name_href_img,
$name_href_img,
$name_href_img,
$name_href_img,
$name_href_img,
$name_href_img,
$name_href_img,
$name_href_img,
$name_href_img,
$name_href_img,
$name_href_img,
$name_href_img
)
)
),
array(
'video' => array(
'name' => '视频 VIDEO',
'navs' => array(
array(
'id' => '',
'href' => '',
'name' => '设计师品牌'
),
array(
'id' => '',
'href' => '',
'name' => '街头品牌'
),
array(
'id' => '',
'href' => '',
'name' => '明星品牌'
)
),
'list' => array(
$name_href_img,
$name_href_img,
$name_href_img,
$name_href_img,
$name_href_img,
$name_href_img
)
)
),
array(
'news' => array(
'name' => '新闻 NEWS',
"pics" => array(
'list' => array(
array(
'href' => '/?gender=1,3',
'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/26/12/01c3b99f554ad50d9e5a9900719715c94c.jpg',
'tips' => '轻户外 TEENTEAM ,2015 A/W !'
),
array(
'href' => '/?gender=1,3',
'img' => 'http://img12.static.yhbimg.com/taobaocms/2015/11/27/09/02a4f1c10e1e81574520e5c0239741a076.jpg',
'tips' => '轻户外TEENTEAM ,2015 A/W !'
)
)
),
"txts" => array(
'list' => array(
array(
'href' => '/?gender=1,3',
'name' => '“轻户外” TEENTEAM ,2015 A/W “GOOUT TO HUNT ”系列新品上线!'
),
array(
'href' => '/?gender=1,3',
'name' => '“轻户外” TEENTEAM ,2015 A/W “GOOUT TO HUNT ”系列新品上线!'
),
array(
'href' => '/?gender=1,3',
'name' => '“轻户外” TEENTEAM ,2015 A/W “GOOUT TO HUNT ”系列新品上线!'
),
array(
'href' => '/?gender=1,3',
'name' => '“轻户外” TEENTEAM ,2015 A/W “GOOUT TO HUNT ”系列新品上线!'
),
array(
'href' => '/?gender=1,3',
'name' => '“轻户外” TEENTEAM ,2015 A/W “GOOUT TO HUNT ”系列新品上线!'
),
array(
'href' => '/?gender=1,3',
'name' => '“轻户外” TEENTEAM ,2015 A/W “GOOUT TO HUNT ”系列新品上线!'
),
array(
'href' => '/?gender=1,3',
'name' => '“轻户外” TEENTEAM ,2015 A/W “GOOUT TO HUNT ”系列新品上线!'
),
array(
'href' => '/?gender=1,3',
'name' => '“轻户外” TEENTEAM ,2015 A/W “GOOUT TO HUNT ”系列新品上线!'
),
array(
'href' => '/?gender=1,3',
'name' => '“轻户外” TEENTEAM ,2015 A/W “GOOUT TO HUNT ”系列新品上线!'
),
array(
'href' => '/?gender=1,3',
'name' => '“轻户外” TEENTEAM ,2015 A/W “GOOUT TO HUNT ”系列新品上线!'
),
array(
'href' => '/?gender=1,3',
'name' => '“轻户外” TEENTEAM ,2015 A/W “GOOUT TO HUNT ”系列新品上线!'
),
array(
'href' => '/?gender=1,3',
'name' => '“轻户外” TEENTEAM ,2015 A/W “GOOUT TO HUNT ”系列新品上线!'
)
)
)
)
),
array(
'ads' => array(
'list' => array(
array(
'href' => '',
'src' => $imgsrc,
'name' => 'Vans联乘再次出击',
'des' => '携手印花大师Eley Kishimot'
),
array(
'href' => '',
'src' => $imgsrc,
'name' => 'Vans联乘再次出击',
'des' => '携手印花大师Eley Kishimot'
),
array(
'href' => '',
'src' => $imgsrc,
'name' => 'Vans联乘再次出击',
'des' => '携手印花大师Eley Kishimot'
),
array(
'href' => '',
'src' => $imgsrc,
'name' => 'Vans联乘再次出击',
'des' => '携手印花大师Eley Kishimot'
)
)
)
)
)
);
$this->_view->display('index', $data);
}
/**
* 品牌列表
*/
public function listAction()
{
$headerdata = array(
'gobytype' => 'gobuyboys',
'searchcate' => 'searchcateboys',
'navbars' => array(
array(
'name_cn' => '男生',
'name_en' => 'BOYS',
'link' => '',
'classname' => 'boys',
'index_main' => 0,
'subnav' => array(
array(
'name' => '男首1',
'link' => '',
'index_sub' => 0,
'thirdnav' => array(
array(
'title' => '上装',
'branditems' => array(
array(
'brandname' => '背心',
'link' => ''
),
array(
'brandname' => 'T恤',
'link' => ''
)
)
)
)
),
array(
'name' => '男首2',
'link' => '',
'index_sub' => 1,
'thirdnav' => array(
array(
'title' => '上装',
'branditems' => array(
array(
'brandname' => '背心',
'link' => ''
),
array(
'brandname' => 'T恤',
'link' => ''
)
)
)
)
),
array(
'name' => '男首3',
'link' => '',
'index_sub' => 2,
'thirdnav' => array(
array(
'title' => '上装',
'branditems' => array(
array(
'brandname' => '背心',
'link' => ''
),
array(
'brandname' => 'T恤',
'link' => ''
)
)
)
)
)
)
),
array(
'name_cn' => '女生',
'name_en' => 'GIRLS',
'link' => 'http=>//www.baidu.com',
'classname' => '',
'index_main' => 0,
'subnav' => array(
array(
'name' => '女生1',
'link' => '',
'index_sub' => 0,
'thirdnav' => array(
array(
'title' => '上装',
'branditems' => array(
array(
'brandname' => '背心',
'link' => ''
),
array(
'brandname' => 'T恤',
'link' => ''
)
)
)
)
),
array(
'name' => '女生2',
'link' => '',
'index_sub' => 1,
'thirdnav' => array(
array(
'title' => '上装',
'branditems' => array(
array(
'brandname' => '背心',
'link' => ''
),
array(
'brandname' => 'T恤',
'link' => ''
)
)
)
)
),
array(
'name' => '女生3',
'link' => '',
'index_sub' => 2,
'thirdnav' => array(
array(
'title' => '上装',
'branditems' => array(
array(
'brandname' => '背心',
'link' => ''
),
array(
'brandname' => 'T恤',
'link' => ''
)
)
)
)
)
)
)
),
'myyoho' => array(
'email' => 'hhh@126.com',
'viptype' => '普通会员',
'currentscore' => 495,
'totalscore' => 600,
'cardtype' => '银卡',
'infolist' => array(
array(
'name' => '待处理的订单',
'link' => '',
'num' => '0'
),
array(
'name' => '我的收藏',
'link' => '',
'num' => '1'
),
array(
'name' => '我的优惠券',
'link' => '',
'num' => '2'
),
array(
'name' => '我的YOHO币',
'link' => '',
'num' => '1'
),
array(
'name' => '我的退货换货',
'link' => '',
'num' => '1'
)
),
'updlink' => ''
),
'gobuy' => array(
'gobuynum' => 3
),
'breadcrumbnav' => array(
array(
'notend' => array(
'link' => 'http=>//www.baidu.com',
'name' => 'BOYS首页'
)
),
array(
'notend' => array(
'link' => 'http=>//www.baidu.com',
'name' => '上衣'
)
),
array(
'isend' => array(
'link' => 'http=>//www.baidu.com',
'name' => '衬衫'
)
)
)
);
$imgsrc = 'http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg';
$item1 = array(
'name' => '所有品牌',
'src' => $imgsrc,
'url' => ''
);
$item2 = array(
'name' => '所有品牌',
'src' => $imgsrc,
'url' => '',
'name' => 'Millefed',
'desc' => ' I.T于2006年冬季在香港推出最新品牌创始 人Shawn Stussy将滑板服、工作服、旧校 服的设计加入到 '
);
$data = array(
'brandsHomePage' => true,
'headerdata' => $headerdata,
'brands' => array(
'tabs' => array(
$item1,
$item1,
$item1,
$item1,
$item1
),
'items' => array(
$item2,
$item2,
$item2,
$item2,
$item2,
$item2,
$item2,
$item2
)
)
);
$this->_view->display('list', $data);
}
}
\ No newline at end of file
... ...
<?php
use Action\WebAction;
use Index\HomeModel;
/**
* 男首
*/
class CommonController extends WebAction
{
/**
* 男装首页 新品上架 接口数据
*
* @param int pageIndex 当前页数
* @param int pageCount 一页显示个数
* @param string flag 类型(男装/女装等,用于区分)
* @return json
*/
public function getNewArrivalAction()
{
$result = array();
do {
/* 判断是不是AJAX请求 */
if (!$this->isAjax()) {
break;
}
$pageIndex = $this->post('pageIndex');
if($pageIndex>=3){
break;
}
$imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg';
$data=array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'tip'=> "" //提示
);
$result=array(
'code'=>200,
'goods' => array(
array(
'tags' => array(
'isNew' => true,
'isYearEndPromotion' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899',
'isFew' => true
),
array(
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899',
'showColBtn' => true
),
array(
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'tags' => array(
'isNew' => true,
'isYearEndPromotion' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899',
'isFew' => true
),
array(
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899',
'showColBtn' => true
),
array(
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
)
)
);
} while (false);
$this->echoJson($result);
}
}
\ No newline at end of file
... ...
... ... @@ -322,7 +322,9 @@ class IndexController extends AbstractAction
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899',
'isFew' => true
'isFew' => true,
'skn' => 111,
'id' => 123
),
1 => array(
'tags' => array(
... ... @@ -333,7 +335,9 @@ class IndexController extends AbstractAction
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899',
'showColBtn' => true
'showColBtn' => true,
'skn' => 111,
'id' => 123
),
2 => array(
'tags' => array(
... ... @@ -728,7 +732,9 @@ class IndexController extends AbstractAction
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899',
'isFew' => true
'isFew' => true,
'skn' => 111,
'id' => 123
),
array(
'tags' => array(
... ... @@ -790,6 +796,7 @@ class IndexController extends AbstractAction
array(
'name' => '裙装',
'num' => '10',
'active' => true,
'childList' => array(
array(
'name' => '全身裙装',
... ... @@ -799,7 +806,8 @@ class IndexController extends AbstractAction
array(
'name' => '全身裙装',
'href' => 'http://adidas.yohobuy.com/?gender=1,3',
'num' => '5'
'num' => '5',
'childActive' => true
),
array(
'name' => '全身裙装',
... ...