Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
xianyu-ufo-app-web
·
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
Plain Diff
Browse Files
Authored by
baoss
5 years ago
Commit
fb1e268ad690bffb4782e0f5168e231b3c3ef125
2 parents
55a5e5d3
3700ffa2
Merge branch 'develop' of git.yoho.cn:fe/xianyu-ufo-app-web into develop
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
8 deletions
apps/pages/home/channel/channel.vue
apps/pages/home/channel/components/scrollNav.vue
apps/pages/home/channel/channel.vue
View file @
fb1e268
<template>
<LayoutApp class="yohoufo-channel-page" :show-back="true" :hide-header="hideHeader" :title="title">
<div class="fixed-nav scroll-nav-wrap" v-if="isShow && navList.length">
<div class="fixed-nav scroll-nav-wrap
-fix
" v-if="isShow && navList.length">
<ScrollNav :list="navList" :current="active" @transfer="getIndex"></ScrollNav>
</div>
<Scroll
...
...
@@ -142,7 +142,7 @@ export default {
this.navHeight = get(this.$refs, 'scrollNav.offsetHeight') || 0;
this.total = this.$refs.scroll.$el.offsetHeight - this.navHeight;
this.refreshProductList(this.active);
this.getReportEle()
});
},
...
...
@@ -164,20 +164,20 @@ export default {
if(scrollHeight + scrollY > eleTop && item.template_name === 'guessLike') {
// console.log('guessLike report')
item.data.forEach((val, i) => {
this.reportYas(val.reportParams)
this.reportYas(val.reportParams)
})
}
if(scrollY < (eleTop + eleHeight) && item.template_name !== 'guessLike') {
// console.log(item.template_name)
item.data.forEach((val, i) => {
this.reportYas(val.reportParams)
this.reportYas(val.reportParams)
})
}
} else { // 默认进入时
if(eleTop < scrollHeight) { // 获取每个元素距顶部高度 小于可视区高度即曝光
// console.log(item.template_name)
item.data.forEach((val, i) => {
this.reportYas(val.reportParams)
this.reportYas(val.reportParams)
})
}
}
...
...
@@ -200,7 +200,7 @@ export default {
this.getReportEle(scrollHeight)
},
scrollHandler({ y }) {
if (this.navTop) {
let scrollY = -y;
if (scrollY >= this.navTop) {
...
...
@@ -338,6 +338,27 @@ export default {
}
}
.scroll-nav-wrap-fix {
position: relative;
&:after {
content: "";
position: absolute;
width: 100%;
height: 100px;
box-shadow: 0 0 120px 100px white !important;
z-index: -1;
}
&.fixed-nav {
width: 100%;
position: absolute;
z-index: 10;
background-color: white;
overflow: hidden;
}
}
.channel-body {
height: 100%;
position: relative;
...
...
@@ -345,7 +366,7 @@ export default {
&:before {
content: "";
width: 100%;
height:
33
0px;
height:
40
0px;
background: #08304B;
position: absolute;
top: 0;
...
...
@@ -407,7 +428,7 @@ export default {
background: #f5f5f5;
height: 64px;
font-size: 28px;
color: #
999
;
color: #
000
;
flex: 1;
border-radius: 4px;
padding: 14px 14px 14px 10px;
...
...
apps/pages/home/channel/components/scrollNav.vue
View file @
fb1e268
...
...
@@ -103,6 +103,7 @@ export default {
right: 10px;
bottom: 10px;
height: 3px;
border-radius: 1.5px;
background-color: #000;
}
}
...
...
Please
register
or
login
to post a comment