channel ui fix review by lea.guo
Showing
2 changed files
with
30 additions
and
8 deletions
1 | <template> | 1 | <template> |
2 | <LayoutApp class="yohoufo-channel-page" :show-back="true" :hide-header="hideHeader" :title="title"> | 2 | <LayoutApp class="yohoufo-channel-page" :show-back="true" :hide-header="hideHeader" :title="title"> |
3 | - <div class="fixed-nav scroll-nav-wrap" v-if="isShow && navList.length"> | 3 | + <div class="fixed-nav scroll-nav-wrap-fix" v-if="isShow && navList.length"> |
4 | <ScrollNav :list="navList" :current="active" @transfer="getIndex"></ScrollNav> | 4 | <ScrollNav :list="navList" :current="active" @transfer="getIndex"></ScrollNav> |
5 | </div> | 5 | </div> |
6 | <Scroll | 6 | <Scroll |
@@ -142,7 +142,7 @@ export default { | @@ -142,7 +142,7 @@ export default { | ||
142 | this.navHeight = get(this.$refs, 'scrollNav.offsetHeight') || 0; | 142 | this.navHeight = get(this.$refs, 'scrollNav.offsetHeight') || 0; |
143 | this.total = this.$refs.scroll.$el.offsetHeight - this.navHeight; | 143 | this.total = this.$refs.scroll.$el.offsetHeight - this.navHeight; |
144 | this.refreshProductList(this.active); | 144 | this.refreshProductList(this.active); |
145 | - | 145 | + |
146 | this.getReportEle() | 146 | this.getReportEle() |
147 | }); | 147 | }); |
148 | }, | 148 | }, |
@@ -164,20 +164,20 @@ export default { | @@ -164,20 +164,20 @@ export default { | ||
164 | if(scrollHeight + scrollY > eleTop && item.template_name === 'guessLike') { | 164 | if(scrollHeight + scrollY > eleTop && item.template_name === 'guessLike') { |
165 | // console.log('guessLike report') | 165 | // console.log('guessLike report') |
166 | item.data.forEach((val, i) => { | 166 | item.data.forEach((val, i) => { |
167 | - this.reportYas(val.reportParams) | 167 | + this.reportYas(val.reportParams) |
168 | }) | 168 | }) |
169 | } | 169 | } |
170 | if(scrollY < (eleTop + eleHeight) && item.template_name !== 'guessLike') { | 170 | if(scrollY < (eleTop + eleHeight) && item.template_name !== 'guessLike') { |
171 | // console.log(item.template_name) | 171 | // console.log(item.template_name) |
172 | item.data.forEach((val, i) => { | 172 | item.data.forEach((val, i) => { |
173 | - this.reportYas(val.reportParams) | 173 | + this.reportYas(val.reportParams) |
174 | }) | 174 | }) |
175 | } | 175 | } |
176 | } else { // 默认进入时 | 176 | } else { // 默认进入时 |
177 | if(eleTop < scrollHeight) { // 获取每个元素距顶部高度 小于可视区高度即曝光 | 177 | if(eleTop < scrollHeight) { // 获取每个元素距顶部高度 小于可视区高度即曝光 |
178 | // console.log(item.template_name) | 178 | // console.log(item.template_name) |
179 | item.data.forEach((val, i) => { | 179 | item.data.forEach((val, i) => { |
180 | - this.reportYas(val.reportParams) | 180 | + this.reportYas(val.reportParams) |
181 | }) | 181 | }) |
182 | } | 182 | } |
183 | } | 183 | } |
@@ -200,7 +200,7 @@ export default { | @@ -200,7 +200,7 @@ export default { | ||
200 | this.getReportEle(scrollHeight) | 200 | this.getReportEle(scrollHeight) |
201 | }, | 201 | }, |
202 | scrollHandler({ y }) { | 202 | scrollHandler({ y }) { |
203 | - | 203 | + |
204 | if (this.navTop) { | 204 | if (this.navTop) { |
205 | let scrollY = -y; | 205 | let scrollY = -y; |
206 | if (scrollY >= this.navTop) { | 206 | if (scrollY >= this.navTop) { |
@@ -338,6 +338,27 @@ export default { | @@ -338,6 +338,27 @@ export default { | ||
338 | } | 338 | } |
339 | } | 339 | } |
340 | 340 | ||
341 | +.scroll-nav-wrap-fix { | ||
342 | + position: relative; | ||
343 | + | ||
344 | + &:after { | ||
345 | + content: ""; | ||
346 | + position: absolute; | ||
347 | + width: 100%; | ||
348 | + height: 100px; | ||
349 | + box-shadow: 0 0 120px 100px white !important; | ||
350 | + z-index: -1; | ||
351 | + } | ||
352 | + | ||
353 | + &.fixed-nav { | ||
354 | + width: 100%; | ||
355 | + position: absolute; | ||
356 | + z-index: 10; | ||
357 | + background-color: white; | ||
358 | + overflow: hidden; | ||
359 | + } | ||
360 | +} | ||
361 | + | ||
341 | .channel-body { | 362 | .channel-body { |
342 | height: 100%; | 363 | height: 100%; |
343 | position: relative; | 364 | position: relative; |
@@ -345,7 +366,7 @@ export default { | @@ -345,7 +366,7 @@ export default { | ||
345 | &:before { | 366 | &:before { |
346 | content: ""; | 367 | content: ""; |
347 | width: 100%; | 368 | width: 100%; |
348 | - height: 330px; | 369 | + height: 400px; |
349 | background: #08304B; | 370 | background: #08304B; |
350 | position: absolute; | 371 | position: absolute; |
351 | top: 0; | 372 | top: 0; |
@@ -407,7 +428,7 @@ export default { | @@ -407,7 +428,7 @@ export default { | ||
407 | background: #f5f5f5; | 428 | background: #f5f5f5; |
408 | height: 64px; | 429 | height: 64px; |
409 | font-size: 28px; | 430 | font-size: 28px; |
410 | - color: #999; | 431 | + color: #000; |
411 | flex: 1; | 432 | flex: 1; |
412 | border-radius: 4px; | 433 | border-radius: 4px; |
413 | padding: 14px 14px 14px 10px; | 434 | padding: 14px 14px 14px 10px; |
-
Please register or login to post a comment