Commit 52fe0074 authored by beisir's avatar beisir

feat: 细化头像

parent 3b4ed302
<template>
<div class="avator-swiper">
<div class="avator_left avator-swiper_item" :class="{ anileft: isAnimate }">
<div v-if="isLoop" class="avator_left avator-swiper_item" :class="{ anileft: isAnimate }">
<img :src="leftImgPath" />
</div>
<swiper ref="mySwiper" :options="swiperOptions" class="avator-swiper_container">
......@@ -14,7 +14,7 @@
<img :src="item.avatar" />
</swiper-slide>
</swiper>
<div class="avator_right avator-swiper_item">
<div v-if="isLoop" class="avator_right avator-swiper_item">
<img :src="rightImgPath" />
</div>
</div>
......@@ -38,14 +38,15 @@ export default {
},
data() {
const vm = this;
const isLoop = vm.avatorData.length < 4 ? false : true;
return {
isLoop,
isAnimate: false,
timer: null,
leftImgPath: '',
rightImgPath: '',
avatorItem: null,
swiperOptions: {
loop: true,
loop: isLoop,
initialSlide: 0,
slidesPerView: 7,
spaceBetween: 4,
......@@ -53,7 +54,7 @@ export default {
centeredSlides: false,
allowTouchMove: false,
autoplay: {
delay: 2000,
delay: 5000,
reverseDirection: true
},
on: {
......@@ -73,7 +74,7 @@ export default {
const timer = setTimeout(() => {
vm.$emit('animation-event-end', vm.avatorItem);
clearTimeout(timer);
}, 1000);
}, 1200);
},
transitionEnd: function() {
vm.isAnimate = false;
......
......@@ -91,6 +91,8 @@ export default {
.avatar {
/deep/ img {
border-radius: 50%;
border: solid @white 1px;
box-sizing: border-box;
}
}
}
......
......@@ -311,21 +311,13 @@ async function getActivityList(urlQuery, next) {
// t.endTime = '2021-09-23 19:17:20';
t = await computedTemplate(t);
t.groupBuyUserInfoList = (t.groupBuyUserInfoList || []).reverse();
// [
// {
// userTag: '团长',
// avatar: 'https://avatar.q-gp.com/14612340001/ee8991d0-1d38-11ec-b6f6-bf45b18f0626'
// },
// {
// userTag: '团长',
// avatar:
// 'https://thirdwx.qlogo.cn/mmopen/vi_32/2tyJekZCNaHnZBJicakCibFzB71ukXJRGEy6iaT44twhGLToibR9QWeyDTOjEWyVte0Zh5rrV8R9lmiazVGnia15HADA/132'
// },
// t.groupBuyUserInfoList = [
// { avatar: 'https://avatar.q-gp.com/14612340001/ee8991d0-1d38-11ec-b6f6-bf45b18f0626' },
// {
// avatar:
// 'https://thirdwx.qlogo.cn/mmopen/vi_32/LF7hK1yuMnxUAnx4YmjPyJCn0WqwVMplgTnDSBwwOib5uHP9fQazPf7xRXCUNEfI8sicf7boaCNoD2NUss2k7jFg/132'
// }
// ]; // (t.groupBuyUserInfoList || []).reverse();
// ];
store.commit('CHANGE_TITLE', t.title || '活动页');
nextFns(vm => {
topicIndex = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment