Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wangshusheng
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Lynnic
9 years ago
Commit
d7504bfd84d14b6193a3ba37cbcad60c91272b56
1 parent
db8f558d
ajax加载js
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
20 deletions
static/js/product/detail/desc.js
static/js/product/detail/detail.js
template/m.yohobuy.com/actions/product/detail/index.phtml
template/m.yohobuy.com/partials/product/product-description.phtml
static/js/product/detail/desc.js
View file @
d7504bf
...
...
@@ -4,7 +4,8 @@
* @date: 2015/11/18
*/
var
$
=
require
(
'jquery'
),
lazyLoad
=
require
(
'yoho.lazyload'
);
lazyLoad
=
require
(
'yoho.lazyload'
),
Swiper
=
require
(
'yoho.iswiper'
);
var
loading
=
require
(
'../../plugin/loading'
),
tip
=
require
(
'../../plugin/tip'
);
...
...
@@ -15,6 +16,9 @@ var introUrl = $('#introUrl').val(),
searching
=
false
,
end
=
false
;
var
sizeSwiper
,
refSwiper
;
function
search
()
{
if
(
searching
||
end
)
{
return
;
...
...
@@ -32,6 +36,16 @@ function search() {
lazyLoad
(
$productDesc
.
find
(
'img.lazy'
));
//尺码信息左右滑动
sizeSwiper
=
new
Swiper
(
'#size-swiper-container'
,{
slidesPerView
:
'auto'
});
//模特试穿左右滑动
refSwiper
=
new
Swiper
(
'#reference-swiper-container'
,{
slidesPerView
:
'auto'
});
searching
=
false
;
end
=
true
;
loading
.
hideLoadingMask
();
...
...
static/js/product/detail/detail.js
View file @
d7504bf
...
...
@@ -7,15 +7,14 @@
Swiper
=
require
(
'yoho.iswiper'
),
lazyLoad
=
require
(
'yoho.lazyload'
);
var
goodsSwiper
,
sizeSwiper
,
refSwiper
;
var
goodsSwiper
;
require
(
'./desc'
);
require
(
'./comments-consults'
);
lazyLoad
(
$
(
'img.lazy'
));
//顶部swiper
goodsSwiper
=
new
Swiper
(
'.banner-swiper'
,
{
lazyLoading
:
true
,
lazyLoadingInPrevNext
:
true
,
...
...
@@ -36,6 +35,7 @@ goodsSwiper = new Swiper('.banner-swiper', {
}
})();
//goods-discount下拉按钮点击事件
$
(
'.goodsDiscount .dropdown'
).
on
(
'click'
,
function
()
{
if
(
$
(
'.goodsDiscount .discount-folder'
).
is
(
':hidden'
))
{
$
(
'.goodsDiscount .first-item span'
).
removeClass
(
'icon-down'
);
...
...
@@ -50,13 +50,4 @@ $('.goodsDiscount .dropdown').on('click', function() {
}
});
sizeSwiper
=
new
Swiper
(
'#size-swiper-container'
,{
slidesPerView
:
'auto'
});
refSwiper
=
new
Swiper
(
'#reference-swiper-container'
,{
slidesPerView
:
'auto'
});
...
...
template/m.yohobuy.com/actions/product/detail/index.phtml
View file @
d7504bf
...
...
@@ -104,6 +104,8 @@
<div
id=
"productDesc"
></div>
<!--
{
{>product/product-description
}
}
-->
{
{#cartInfo
}
}
<div
class=
"cart-bar"
>
{
{#if
numInCart
}
}
...
...
template/m.yohobuy.com/partials/product/product-description.phtml
View file @
d7504bf
...
...
@@ -6,14 +6,15 @@
<span
class=
"en-title"
>
{
{enTitle
}
}</span>
</h
1
>
{
{#detail
}
}
<
ul
class=
"detail table clearfix"
>
<
div
class=
"detail table clearfix"
>
{
{#list
}
}
<div
class=
"column"
>
{
{param
}
}</div>
{
{/list
}
}
</
ul
>
</
div
>
{
{/detail
}
}
<div
class=
"desc-text"
>
{
{desc
}
}</div>
</div>
{
{/goodsDescription
}
}
{
{#sizeInfo
}
}
...
...
@@ -53,8 +54,6 @@
</div>
{
{/measurementMethod
}
}
<!--
<div
class=
"gap-block"
></div>
-->
{
{#reference
}
}
<div
class=
"size-info page-block"
>
<h
1
class=
"title"
>
...
...
@@ -86,8 +85,6 @@
</div>
{
{/reference
}
}
<!--
<div
class=
"gap-block"
></div>
-->
{
{#materials
}
}
<div
class=
"materials page-block"
>
<h
1
class=
"title"
>
...
...
@@ -119,7 +116,6 @@
</div>
</div>
{
{/washTips
}
}
<!--
<div
class=
"gap-block"
></div>
-->
{
{#productDetail
}
}
<div
class=
"product-detail page-block"
>
...
...
Please
register
or
login
to post a comment