Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
whb
9 years ago
Commit
460becb8f53e4d07e91c373cec300fb018cceacb
2 parents
335136ab
462ead61
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy.git
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
10 deletions
web-static/js/product/product.js
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index1.php
web-static/js/product/product.js
View file @
460becb
...
...
@@ -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'
});
}
);
}
};
//鼠标放在颜色列表上效果
...
...
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index1.php
View file @
460becb
...
...
@@ -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
);
...
...
Please
register
or
login
to post a comment