|
|
|
|
@ -14,18 +14,27 @@
|
|
|
|
|
:key="index"
|
|
|
|
|
:style="{ 'transform': `translate(calc(${area.w * item.x / 100}px - 50%),calc(${area.h * item.y / 100}px - 50%))` }"
|
|
|
|
|
@click="$u.throttle(() => toDetail(item))">
|
|
|
|
|
<div class="box" :class="{ 'box--active': item.has_answer > 0 }" :style="{ 'transform': `rotate(${item.d}deg)` }">
|
|
|
|
|
<img :style="{ 'transform': `rotate(${-item.d}deg)` }" :src="item.image ? item.image.url : ''" alt="">
|
|
|
|
|
<div class="pointer__horn" :class="{ 'pointer__horn--active': item.has_answer > 0 }" :style="{ 'transform': `translate(-3rpx, calc(-50% - 4rpx)) rotate(${item.d}deg)` }"></div>
|
|
|
|
|
|
|
|
|
|
<div class="box" :style="{ 'transform': transformBox(item.d) }">
|
|
|
|
|
<div class="box__image" :class="{ 'box--active': item.has_answer > 0 }">
|
|
|
|
|
<img :src="item.image ? item.image.url : ''" alt="">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="text"
|
|
|
|
|
:class="{ 'text--active': item.has_answer > 0 }"
|
|
|
|
|
:style="{
|
|
|
|
|
'transform': translateText(item.d)
|
|
|
|
|
}">
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
<div class="box__text" :class="{ 'box__text--active': item.has_answer > 0 }" :style="{ 'transform': (item.d > 100 || item.d < -100) ? 'translate(-50rpx, 136rpx)' : '' }">{{ item.name }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- <div class="box" :class="{ 'box--active': item.has_answer > 0 }" :style="{ 'transform': `rotate(${item.d}deg)` }">-->
|
|
|
|
|
<!-- <img :style="{ 'transform': `rotate(${-item.d}deg)` }" :src="item.image ? item.image.url : ''" alt="">-->
|
|
|
|
|
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
|
|
|
|
|
<!-- <div class="text"-->
|
|
|
|
|
<!-- :class="{ 'text--active': item.has_answer > 0 }"-->
|
|
|
|
|
<!-- :style="{-->
|
|
|
|
|
<!-- 'transform': translateText(item.d)-->
|
|
|
|
|
<!-- }">-->
|
|
|
|
|
<!-- {{ item.name }}-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@ -129,7 +138,7 @@ export default {
|
|
|
|
|
this.done = res.point_answer_total || 0
|
|
|
|
|
this.pointers = res.points?.map((i, index) => {
|
|
|
|
|
return {
|
|
|
|
|
d: convertToEquivalentAngle(60 * index + 1),
|
|
|
|
|
d: convertToEquivalentAngle(70 * index + 1),
|
|
|
|
|
...i
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
@ -137,6 +146,21 @@ export default {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
transformBox () {
|
|
|
|
|
return function (deg) {
|
|
|
|
|
if (deg) {
|
|
|
|
|
if ((deg % 360) > -90 && (deg % 360) < 90) {
|
|
|
|
|
return `translate(calc(${Math.floor(Math.sin(Math.PI / 180 * deg) * 80)}rpx - 48rpx), calc(${-1 * Math.floor(Math.cos(Math.PI / 180 * deg) * 80)}rpx - 48rpx))`
|
|
|
|
|
} else {
|
|
|
|
|
return `translate(calc(${Math.floor(Math.sin(Math.PI / 180 * deg) * 80)}rpx - 48rpx), calc(${-1 * Math.floor(Math.cos(Math.PI / 180 * deg) * 80)}rpx - 48rpx))`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
return 'translate(0, 0)'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
translateText () {
|
|
|
|
|
return function (deg) {
|
|
|
|
|
if (deg) {
|
|
|
|
|
@ -190,35 +214,57 @@ export default {
|
|
|
|
|
padding: 20rpx 0;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.pointer {
|
|
|
|
|
width: 16rpx;
|
|
|
|
|
height: 16rpx;
|
|
|
|
|
border-radius: 100%;
|
|
|
|
|
background: #fff;
|
|
|
|
|
transform-origin: center;
|
|
|
|
|
border: 3rpx solid #C52A34;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
& .text {
|
|
|
|
|
&__horn {
|
|
|
|
|
width: 20rpx;
|
|
|
|
|
height: 26rpx;
|
|
|
|
|
clip-path: polygon(20% 0, 80% 0%, 50% 100%, 20% 0);
|
|
|
|
|
background: #F5D8AD;
|
|
|
|
|
filter: drop-shadow(2rpx 4rpx 2rpx #90D2CF);
|
|
|
|
|
transform-origin: 50% 100%;
|
|
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
&--active {
|
|
|
|
|
background: #C52A34;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
& .box {
|
|
|
|
|
transform-origin: 0 0;
|
|
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
&__text {
|
|
|
|
|
width: 200rpx;
|
|
|
|
|
word-break: break-word;
|
|
|
|
|
background: #F5D8AD;
|
|
|
|
|
border-radius: 6rpx;
|
|
|
|
|
word-break: keep-all;
|
|
|
|
|
filter: drop-shadow(2rpx 4rpx 2rpx #90D2CF);
|
|
|
|
|
color: #C52A34;
|
|
|
|
|
font-size: 20rpx;
|
|
|
|
|
zoom: .85;
|
|
|
|
|
text-align: center;
|
|
|
|
|
transform-origin: 50% 0;
|
|
|
|
|
transform: translate(-50rpx,-100%);
|
|
|
|
|
|
|
|
|
|
padding: 12rpx 10rpx;
|
|
|
|
|
padding: 10rpx 8rpx;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
|
|
|
|
|
&--active {
|
|
|
|
|
background: #b93736;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
& .box {
|
|
|
|
|
&__image {
|
|
|
|
|
width: 116rpx;
|
|
|
|
|
height: 116rpx;
|
|
|
|
|
border-radius: 100%;
|
|
|
|
|
@ -227,35 +273,19 @@ export default {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
filter: drop-shadow(2rpx 4rpx 2rpx #90D2CF);
|
|
|
|
|
transform-origin: 50% calc(100% + 26rpx + 5rpx);
|
|
|
|
|
|
|
|
|
|
// overflow: hidden;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: calc(-116rpx - 26rpx);
|
|
|
|
|
left: -50rpx;
|
|
|
|
|
filter: drop-shadow(2rpx 4rpx 4rpx #90D2CF);
|
|
|
|
|
|
|
|
|
|
&--active {
|
|
|
|
|
border-color: #b93736;
|
|
|
|
|
}
|
|
|
|
|
& > img {
|
|
|
|
|
width: 106rpx;
|
|
|
|
|
height: 106rpx;
|
|
|
|
|
border-radius: 100%;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
&::after {
|
|
|
|
|
content: '';
|
|
|
|
|
height: 26rpx;
|
|
|
|
|
width: 22rpx;
|
|
|
|
|
background: #F5D8AD;
|
|
|
|
|
clip-path: polygon(0 0, 100% 0, 50% 100%,0 0);
|
|
|
|
|
|
|
|
|
|
transform: translate(-50% , 100%);
|
|
|
|
|
position: absolute;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
left: 50%;
|
|
|
|
|
}
|
|
|
|
|
&--active {
|
|
|
|
|
border-color: #b93736;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&--active::before {
|
|
|
|
|
content: '已打卡';
|
|
|
|
|
font-size: 20rpx;
|
|
|
|
|
@ -276,6 +306,91 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//.pointer {
|
|
|
|
|
// width: 16rpx;
|
|
|
|
|
// height: 16rpx;
|
|
|
|
|
// border-radius: 100%;
|
|
|
|
|
// background: #fff;
|
|
|
|
|
// border: 3rpx solid #C52A34;
|
|
|
|
|
// display: inline-block;
|
|
|
|
|
//
|
|
|
|
|
// position: relative;
|
|
|
|
|
//
|
|
|
|
|
// & .text {
|
|
|
|
|
// background: #F5D8AD;
|
|
|
|
|
// border-radius: 6rpx;
|
|
|
|
|
// word-break: keep-all;
|
|
|
|
|
// filter: drop-shadow(2rpx 4rpx 2rpx #90D2CF);
|
|
|
|
|
// color: #C52A34;
|
|
|
|
|
// font-size: 20rpx;
|
|
|
|
|
// text-align: center;
|
|
|
|
|
// transform-origin: 50% 0;
|
|
|
|
|
//
|
|
|
|
|
// padding: 12rpx 10rpx;
|
|
|
|
|
// position: absolute;
|
|
|
|
|
//
|
|
|
|
|
// &--active {
|
|
|
|
|
// background: #b93736;
|
|
|
|
|
// color: #fff;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// & .box {
|
|
|
|
|
// width: 116rpx;
|
|
|
|
|
// height: 116rpx;
|
|
|
|
|
// border-radius: 100%;
|
|
|
|
|
// box-sizing: border-box;
|
|
|
|
|
// border: 5rpx #F5D8AD solid;
|
|
|
|
|
// display: flex;
|
|
|
|
|
// justify-content: center;
|
|
|
|
|
// align-items: center;
|
|
|
|
|
// filter: drop-shadow(2rpx 4rpx 2rpx #90D2CF);
|
|
|
|
|
// transform-origin: 50% calc(100% + 26rpx + 5rpx);
|
|
|
|
|
//
|
|
|
|
|
// position: absolute;
|
|
|
|
|
// top: calc(-116rpx - 26rpx);
|
|
|
|
|
// left: -50rpx;
|
|
|
|
|
//
|
|
|
|
|
// &--active {
|
|
|
|
|
// border-color: #b93736;
|
|
|
|
|
// }
|
|
|
|
|
// & > img {
|
|
|
|
|
// width: 106rpx;
|
|
|
|
|
// height: 106rpx;
|
|
|
|
|
// border-radius: 100%;
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// &::after {
|
|
|
|
|
// content: '';
|
|
|
|
|
// height: 26rpx;
|
|
|
|
|
// width: 22rpx;
|
|
|
|
|
// background: #F5D8AD;
|
|
|
|
|
// clip-path: polygon(0 0, 100% 0, 50% 100%,0 0);
|
|
|
|
|
//
|
|
|
|
|
// transform: translate(-50% , 100%);
|
|
|
|
|
// position: absolute;
|
|
|
|
|
// bottom: 0;
|
|
|
|
|
// left: 50%;
|
|
|
|
|
// }
|
|
|
|
|
// &--active::before {
|
|
|
|
|
// content: '已打卡';
|
|
|
|
|
// font-size: 20rpx;
|
|
|
|
|
// color: #fff;
|
|
|
|
|
// background: #b93736;
|
|
|
|
|
// border-radius: 30rpx;
|
|
|
|
|
// zoom: .8;
|
|
|
|
|
// clip-path: circle(84rpx at 84% 178%);
|
|
|
|
|
//
|
|
|
|
|
// padding: 6rpx 14rpx 5rpx 122rpx;
|
|
|
|
|
// z-index: 2;
|
|
|
|
|
// position: absolute;
|
|
|
|
|
// top: -1rpx;
|
|
|
|
|
// left: -96rpx;
|
|
|
|
|
// }
|
|
|
|
|
// &--active::after {
|
|
|
|
|
// background: #b93736;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|