Commit 52fe0074 authored by beisir's avatar beisir

feat: 细化头像

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