Authored by whb

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

... ... @@ -76,8 +76,6 @@ exports.init = function(num) {
productList.addHandler('MouseEnter', function(event) {
var itemMr = 10, //list的右边距
itemMb = 35, //list的下边距
ulStr = '',
... ... @@ -90,11 +88,6 @@ exports.init = function(num) {
wrapperPt, //鼠标移入时弹层的上内边距
containerPt; //商品列表容器的上内边距
$goodInfoMain.html('');
$goodSelectColor.html('');
$goodItemWrapper.css({
display: 'none'
});
$.ajax({
type: 'POST',
url: '/product/list/getProductPic',
... ... @@ -104,6 +97,11 @@ exports.init = function(num) {
}
}).then(function(data) {
//setTimeout(function () {
removeHtmlFn();
ulStr = createColorList(data).colorListStr; //ajax请求的颜色列表
ulNum = createColorList(data).ulNum;//ajax请求的颜色的数量
... ... @@ -114,8 +112,9 @@ exports.init = function(num) {
wrapperPt = $goodItemWrapper.css('paddingTop');
containerPt = $goodsContainer.css('paddingTop');
//wrapperWidth = 10 + (15 + 50) * ulNum + event.targetWidth;
wrapperWidth = $goodItemWrapper.width();
wrapperWidth = 10 + (15 + 50) * ulNum + event.targetWidth;
//wrapperWidth = $goodItemWrapper.width();
wrapperX = (event.targetX - 1) * (event.targetWidth + itemMr) - (parseInt(wrapperPl) + 1);
wrapperY = (event.targetY - 1) *
... ... @@ -135,16 +134,21 @@ exports.init = function(num) {
display: 'inline-block'
});
//}, 1000);
});
});
$goodItemWrapper.mouseleave(function() {
removeHtmlFn();
});
function removeHtmlFn() {
$goodInfoMain.html('');
$goodSelectColor.html('');
$goodItemWrapper.css({
display: 'none'
});
});
}
};
//鼠标放在颜色列表上效果
... ...
... ... @@ -1550,6 +1550,31 @@ class Index1Controller extends AbstractAction
'url' => 'http://item.yohobuy.com/product/pro_187471_252595/NIKEAIRMAX90ESSENTIAL537384126.html',
'src' => 'http://img12.static.yhbimg.com/goodsimg/2015/09/24/09/028738fa8afcf5031733bcdfa83e397f0f.jpg?imageMogr2/thumbnail/75x100/extent/75x100/background/d2hpdGU=/position/center/quality/90'
),
array(
'coverImg' => 'http://img12.static.yhbimg.com/goodsimg/2015/09/24/09/028738fa8afcf5031733bcdfa83e397f0f.jpg?imageMogr2/thumbnail/75x100/extent/75x100/background/d2hpdGU=/position/center/quality/90',
'url' => 'http://item.yohobuy.com/product/pro_187471_252595/NIKEAIRMAX90ESSENTIAL537384126.html',
'src' => 'http://img12.static.yhbimg.com/goodsimg/2015/09/24/09/028738fa8afcf5031733bcdfa83e397f0f.jpg?imageMogr2/thumbnail/75x100/extent/75x100/background/d2hpdGU=/position/center/quality/90'
),
array(
'coverImg' => 'http://img12.static.yhbimg.com/goodsimg/2015/09/24/09/028738fa8afcf5031733bcdfa83e397f0f.jpg?imageMogr2/thumbnail/75x100/extent/75x100/background/d2hpdGU=/position/center/quality/90',
'url' => 'http://item.yohobuy.com/product/pro_187471_252595/NIKEAIRMAX90ESSENTIAL537384126.html',
'src' => 'http://img12.static.yhbimg.com/goodsimg/2015/09/24/09/028738fa8afcf5031733bcdfa83e397f0f.jpg?imageMogr2/thumbnail/75x100/extent/75x100/background/d2hpdGU=/position/center/quality/90'
),
array(
'coverImg' => 'http://img12.static.yhbimg.com/goodsimg/2015/09/24/09/028738fa8afcf5031733bcdfa83e397f0f.jpg?imageMogr2/thumbnail/75x100/extent/75x100/background/d2hpdGU=/position/center/quality/90',
'url' => 'http://item.yohobuy.com/product/pro_187471_252595/NIKEAIRMAX90ESSENTIAL537384126.html',
'src' => 'http://img12.static.yhbimg.com/goodsimg/2015/09/24/09/028738fa8afcf5031733bcdfa83e397f0f.jpg?imageMogr2/thumbnail/75x100/extent/75x100/background/d2hpdGU=/position/center/quality/90'
),
array(
'coverImg' => 'http://img12.static.yhbimg.com/goodsimg/2015/09/24/09/028738fa8afcf5031733bcdfa83e397f0f.jpg?imageMogr2/thumbnail/75x100/extent/75x100/background/d2hpdGU=/position/center/quality/90',
'url' => 'http://item.yohobuy.com/product/pro_187471_252595/NIKEAIRMAX90ESSENTIAL537384126.html',
'src' => 'http://img12.static.yhbimg.com/goodsimg/2015/09/24/09/028738fa8afcf5031733bcdfa83e397f0f.jpg?imageMogr2/thumbnail/75x100/extent/75x100/background/d2hpdGU=/position/center/quality/90'
),
array(
'coverImg' => 'http://img12.static.yhbimg.com/goodsimg/2015/09/24/09/028738fa8afcf5031733bcdfa83e397f0f.jpg?imageMogr2/thumbnail/75x100/extent/75x100/background/d2hpdGU=/position/center/quality/90',
'url' => 'http://item.yohobuy.com/product/pro_187471_252595/NIKEAIRMAX90ESSENTIAL537384126.html',
'src' => 'http://img12.static.yhbimg.com/goodsimg/2015/09/24/09/028738fa8afcf5031733bcdfa83e397f0f.jpg?imageMogr2/thumbnail/75x100/extent/75x100/background/d2hpdGU=/position/center/quality/90'
)
);
$this->echoJson($data);
... ...