Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
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
陈峰
8 years ago
Commit
e2270b790864c595ca5acbc1559074e2d6e715f7
1 parent
f7dbacc6
去除alloytouch
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
65 deletions
public/js/channel/home.page.js
public/scss/channel/_banner-top.css
public/js/channel/home.page.js
View file @
e2270b7
...
...
@@ -6,6 +6,7 @@
//加载css
require
(
"layout/_loading.css"
)
require
(
"layout/_utils.css"
)
require
(
"layout/_swiper.css"
)
require
(
"common/_filter.css"
)
require
(
"common/_good.css"
)
...
...
@@ -55,7 +56,6 @@ require("channel/_vip-only.css")
var
$
=
require
(
'yoho-jquery'
),
Swiper
=
require
(
'yoho-swiper'
),
alloytouch
=
require
(
'alloytouch'
),
lazyLoad
=
require
(
'yoho-jquery-lazyload'
),
fastclick
=
require
(
'yoho-fastclick'
),
noticeScroll
=
require
(
'../plugin/notice-scroll'
),
...
...
@@ -152,57 +152,17 @@ highlight($subNav);
// 头部banner轮播
if
(
$
(
'.banner-alloy'
).
find
(
'img'
).
size
()
>
1
)
{
new
alloytouch
({
touch
:
".banner-alloy"
,
//反馈触摸的dom
vertical
:
false
,
//不必需,默认是true代表监听竖直方向touch
target
:
$
(
'.alloy-wrapper'
)[
0
],
//运动的对象
property
:
"translateY"
,
//被运动的属性
change
:
function
(){
},
//不必需,属性改变的回调。alloytouch.css版本不支持该事件
touchStart
:
function
(
value
){
},
touchMove
:
function
(
value
){
},
touchEnd
:
function
(
evt
,
v
,
index
){
var
step_v
=
index
*
this
.
step
*
-
1
;
var
dx
=
v
-
step_v
;
console
.
log
(
v
)
if
(
Math
.
abs
(
dx
)
<
30
)
{
this
.
go
(
step_v
);
}
else
if
(
dx
>
0
)
{
this
.
go
(
step_v
+
this
.
step
);
}
else
{
this
.
go
(
step_v
-
this
.
step
);
}
return
false
;
},
animationEnd
:
function
(
v
,
page
){
var
i
=
0
,
len
=
items
.
length
;
for
(;
i
<
len
;
i
++
)
{
if
(
i
===
page
)
{
items
[
i
].
classList
.
add
(
"active"
);
}
else
{
items
[
i
].
classList
.
remove
(
"active"
);
}
}
}
//运动结束
})
// new Swiper('.banner-swiper', {
// lazyLoading: true,
// lazyLoadingInPrevNext: true,
// loop: true,
// autoplay: 3000,
// autoplayDisableOnInteraction: false,
// paginationClickable: true,
// slideElement: 'li',
// pagination: '.banner-top .pagination-inner'
// });
if
(
$
(
'.swiper-wrapper'
).
find
(
'li'
).
size
()
>
1
)
{
new
Swiper
(
'.banner-swiper'
,
{
lazyLoading
:
true
,
lazyLoadingInPrevNext
:
true
,
loop
:
true
,
autoplay
:
3000
,
autoplayDisableOnInteraction
:
false
,
paginationClickable
:
true
,
slideElement
:
'li'
,
pagination
:
'.banner-top .pagination-inner'
});
}
// 店铺推荐人数和收藏初始查询
...
...
public/scss/channel/_banner-top.css
View file @
e2270b7
...
...
@@ -55,16 +55,3 @@
}
}
}
.banner-alloy
{
width
:
100%
;
overflow
:
hidden
;
position
:
relative
;
max-height
:
312px
;
.alloy-wrapper
{
position
:
relative
;
max-height
:
312px
;
img
{
display
:
initial
;
}
}
}
...
...
Please
register
or
login
to post a comment