Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
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
ccbikai
10 years ago
Commit
da1516ee48d33495d87e98a98fa14840f3e121ed
1 parent
2bb0d324
首页头部swiper 圆点修改
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
35 deletions
static/js/product/newsale/discount.js
static/js/product/newsale/newarrival.js
static/sass/home/_banner-top.scss
static/js/product/newsale/discount.js
View file @
da1516e
var
$
=
require
(
'yoho.zepto'
),
Swiper
=
require
(
'yoho.iswiper'
),
lazyLoad
=
require
(
'yoho.zeptolazyload'
);
lazyLoad
=
require
(
'yoho.zeptolazyload'
),
tip
=
require
(
'../../plugin/tip'
);
var
$curNav
,
$navList
=
$
(
'#discount-nav'
),
...
...
@@ -14,7 +15,32 @@ var swiper,
loadMoreH
=
$
(
'#load-more'
).
height
(),
loading
=
false
,
page
=
0
,
pd
=
""
;
pd
=
''
;
/**
* 根据用户的选择获取商品折扣值
* @param int index
* @return string
*/
function
getSalePdByChoose
(
index
)
{
var
pd
=
'0.1,0.3'
;
switch
(
index
)
{
case
0
:
pd
=
'0.1,0.3'
;
break
;
case
1
:
pd
=
'0.4,0.6'
;
break
;
case
2
:
pd
=
'0.7,0.9'
;
break
;
case
3
:
pd
=
'0.1,0.9'
;
break
;
}
return
pd
;
}
// slide 个数大于 1 时,使用 swiper ,否则只显示单张图片
if
(
$
(
'.swiper-container .swiper-slide'
).
length
>
1
)
{
...
...
@@ -57,7 +83,7 @@ $(window).scroll(function () {
return
;
}
loading
=
true
;
// num = $goodList.children('.good-info').length;
$
.
ajax
({
type
:
'GET'
,
...
...
@@ -76,8 +102,8 @@ $(window).scroll(function () {
$goodList
.
append
(
data
);
//lazyLoad
//lazyLoad($goodList.children('.good-info:gt(' + (num - 1) + ')').find('img.lazy'));
// lazyLoad
// lazyLoad($goodList.children('.good-info:gt(' + (num - 1) + ')').find('img.lazy'));
lazyLoad
(
$
(
'.good-info'
).
find
(
'img.lazy'
));
loading
=
false
;
...
...
@@ -91,28 +117,3 @@ $(window).scroll(function () {
}
});
/**
* 根据用户的选择获取商品折扣值
*
* @param int index
* @return string
*/
function
getSalePdByChoose
(
index
)
{
var
pd
=
"0.1,0.3"
;
switch
(
index
)
{
case
0
:
pd
=
"0.1,0.3"
;
break
;
case
1
:
pd
=
"0.4,0.6"
;
break
;
case
2
:
pd
=
"0.7,0.9"
;
break
;
case
3
:
pd
=
"0.1,0.9"
;
break
;
}
return
pd
;
}
\ No newline at end of file
...
...
static/js/product/newsale/newarrival.js
View file @
da1516e
...
...
@@ -56,8 +56,8 @@ $(window).scroll(function () {
return
;
}
loading
=
true
;
//num = $goodList.children('.good-info').length;
// num = $goodList.children('.good-info').length;
$
.
ajax
({
type
:
'GET'
,
url
:
'/product/newsale/selectNewSale'
,
...
...
@@ -73,8 +73,8 @@ $(window).scroll(function () {
$goodList
.
append
(
data
);
//lazyLoad
//lazyLoad($goodList.children('.good-info:gt(' + (num - 1) + ')').find('img.lazy'));
// lazyLoad
// lazyLoad($goodList.children('.good-info:gt(' + (num - 1) + ')').find('img.lazy'));
lazyLoad
(
$
(
'.good-info'
).
find
(
'img.lazy'
));
loading
=
false
;
...
...
static/sass/home/_banner-top.scss
View file @
da1516e
...
...
@@ -17,7 +17,7 @@
margin
:
0
(
9rem
/
$pxConvertRem
);
border-radius
:
50%
;
}
span
.swiper-
active-switch
{
span
.swiper-
pagination-bullet-active
{
opacity
:
1
;
}
}
...
...
Please
register
or
login
to post a comment