Authored by ccbikai

头像链接修改

... ... @@ -12,7 +12,7 @@
<ul class="clearfix swiper-wrapper">
{{# starAvatar}}
<li class="swiper-slide">
<span class="rank-avatar" data-url="{{url}}" data-avatar="{{image cover 180 180}}"></span>
<a class="rank-avatar" href='{{url}}' data-avatar="{{image cover 180 180}}"></a>
</li>
{{/ starAvatar}}
</ul>
... ...
... ... @@ -245,9 +245,7 @@ function setIndexAction() {
// 明星头像点击居中显示或跳转
$('.avatar-swiper li').on('click', function() {
if ($(this).hasClass('swiper-slide-active')) {
location.href = $(this).find('span').data('url');
} else {
if (!$(this).hasClass('swiper-slide-active')) {
avatarKey = $(this).index();
if (avatarKey >= (2 * bannerLen + 1)) {
... ... @@ -260,6 +258,8 @@ function setIndexAction() {
avatarSwiperClone && avatarSwiperClone.slideTo(avatarKey, 0);
avatarSwiper.slideTo(avatarKey, 0);
}
return false;
}
});
... ...
... ... @@ -361,6 +361,9 @@
}
.rank-avatar {
display: block;
width: 100%;
height: 100%;
background-image: resolve("guang/star/user-avatar.png");
background-repeat: no-repeat;
background-size: contain;
... ...