Showing
4 changed files
with
13 additions
and
10 deletions
@@ -74,7 +74,11 @@ const _processIndexData = (dataList) => { | @@ -74,7 +74,11 @@ const _processIndexData = (dataList) => { | ||
74 | avatar.isSwiper = true; | 74 | avatar.isSwiper = true; |
75 | } | 75 | } |
76 | 76 | ||
77 | - _.forEach(data.ext.tags, (tags) => { | 77 | + _.forEach(data.ext.tags, (tags, i) => { |
78 | + if (i >= 1) { | ||
79 | + return; | ||
80 | + } | ||
81 | + | ||
78 | avatar.tags.push({ | 82 | avatar.tags.push({ |
79 | avatarUrl: `/guang/star/detail?tag=${tags.tagName}&openby:yohobuy={"action":"go.h5","params":{"id":"","share":"","shareparam":{},"islogin":"N","type":0,"updateflag":"N","url":"http://m.yohobuy.com/guang/star/detail","param":{"tag":"${tags.tagName}"}}}`, // eslint-disable-line | 83 | avatarUrl: `/guang/star/detail?tag=${tags.tagName}&openby:yohobuy={"action":"go.h5","params":{"id":"","share":"","shareparam":{},"islogin":"N","type":0,"updateflag":"N","url":"http://m.yohobuy.com/guang/star/detail","param":{"tag":"${tags.tagName}"}}}`, // eslint-disable-line |
80 | cover: tags.cover ? (tags.cover + '?imageView2/2/w/104/h/104/q/80') : tags.cover, | 84 | cover: tags.cover ? (tags.cover + '?imageView2/2/w/104/h/104/q/80') : tags.cover, |
@@ -106,7 +110,7 @@ const _processIndexData = (dataList) => { | @@ -106,7 +110,7 @@ const _processIndexData = (dataList) => { | ||
106 | let url = `/guang/star/detail?tag=${data.tagName}&openby:yohobuy={"action":"go.h5","params":{"id":"","share":"","shareparam":{},"islogin":"N","type":0,"updateflag":"N","url":"http://m.yohobuy.com/guang/star/detail","param":{"tag":"${data.tagName}"}}}`; // eslint-disable-line | 110 | let url = `/guang/star/detail?tag=${data.tagName}&openby:yohobuy={"action":"go.h5","params":{"id":"","share":"","shareparam":{},"islogin":"N","type":0,"updateflag":"N","url":"http://m.yohobuy.com/guang/star/detail","param":{"tag":"${data.tagName}"}}}`; // eslint-disable-line |
107 | 111 | ||
108 | formatData.starAvatar.push({ | 112 | formatData.starAvatar.push({ |
109 | - noLazy: index < 5, | 113 | + // noLazy: index < 5, |
110 | url: url, | 114 | url: url, |
111 | cover: data.cover ? (data.cover + '?imageView2/2/w/180/h/180/q/80') : data.cover | 115 | cover: data.cover ? (data.cover + '?imageView2/2/w/180/h/180/q/80') : data.cover |
112 | }); | 116 | }); |
@@ -6,7 +6,6 @@ | @@ -6,7 +6,6 @@ | ||
6 | 6 | ||
7 | var $ = require('yoho-jquery'), | 7 | var $ = require('yoho-jquery'), |
8 | Swiper = require('yoho-swiper'), | 8 | Swiper = require('yoho-swiper'), |
9 | - tip = require('../plugin/tip'), | ||
10 | loading = require('../plugin/loading'), | 9 | loading = require('../plugin/loading'), |
11 | PullRefresh = require('../plugin/pull-refresh'); | 10 | PullRefresh = require('../plugin/pull-refresh'); |
12 | 11 | ||
@@ -96,10 +95,12 @@ function setIndexAction() { | @@ -96,10 +95,12 @@ function setIndexAction() { | ||
96 | 95 | ||
97 | // 明星头像 swiper 初始化 | 96 | // 明星头像 swiper 初始化 |
98 | if (bannerLen > 1) { | 97 | if (bannerLen > 1) { |
98 | + console.log(Math.floor($avatarWrap.find('.swiper-slide').length / 2)); | ||
99 | avatarSwiper = new Swiper($avatarWrap.find('.avatar-swiper')[0], { | 99 | avatarSwiper = new Swiper($avatarWrap.find('.avatar-swiper')[0], { |
100 | lazyLoading: true, | 100 | lazyLoading: true, |
101 | - lazyLoadingInPrevNext: true, | ||
102 | - loop: true, | 101 | + lazyLoadingInPrevNextAmount: 3, |
102 | + | ||
103 | + // loop: true, | ||
103 | initialSlide: 2, | 104 | initialSlide: 2, |
104 | centeredSlides: true, | 105 | centeredSlides: true, |
105 | slidesPerView: 'auto', | 106 | slidesPerView: 'auto', |
@@ -195,9 +196,6 @@ getIndexHtml = function() { | @@ -195,9 +196,6 @@ getIndexHtml = function() { | ||
195 | initAction(); | 196 | initAction(); |
196 | } | 197 | } |
197 | }) | 198 | }) |
198 | - .fail(function() { | ||
199 | - tip.show('网络断开连接了~'); | ||
200 | - }) | ||
201 | .always(function() { | 199 | .always(function() { |
202 | stopLoading = false; | 200 | stopLoading = false; |
203 | loading.hideLoadingMask(); | 201 | loading.hideLoadingMask(); |
@@ -131,12 +131,13 @@ | @@ -131,12 +131,13 @@ | ||
131 | } | 131 | } |
132 | 132 | ||
133 | .star-main { | 133 | .star-main { |
134 | - margin-top: 88px; | 134 | + margin: 88px 0; |
135 | position: absolute; | 135 | position: absolute; |
136 | left: 0; | 136 | left: 0; |
137 | top: 0; | 137 | top: 0; |
138 | bottom: 0; | 138 | bottom: 0; |
139 | right: 0; | 139 | right: 0; |
140 | + height: calc(100vh - 88px); | ||
140 | } | 141 | } |
141 | 142 | ||
142 | .avatar-swiper { | 143 | .avatar-swiper { |
-
Please register or login to post a comment