绿满眶商城微信小程序-uniapp
peng
2025-06-27 3f7acbae32700d7c3c2f883968ea33d436df5219
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<template>
  <view class="animations">
    <view class="radar">
      <view class="dot dot-1"></view>
      <view class="dot dot-2"></view>
      <view class="dot dot-3"></view>
      <view class="cover"></view>
    </view>
  </view>
</template>
 
<script>
export default {
  name: "loading-radar",
  data() {
    return {};
  },
};
</script>
 
<style lang="scss" scoped>
$size: 180rpx;
$dotSize: 4rpx;
$maincolor: #2da3f6;
 
.radar {
  position: relative;
  z-index: 1;
  height: $size;
  width: $size;
  background: -webkit-repeating-radial-gradient(
    rgba(45, 163, 246, 0) 0%,
    rgba(45, 163, 246, 0) 23%,
    rgba(45, 163, 246, 0.7) 24%,
    rgba(45, 163, 246, 0) 25%
  );
  margin: 0 auto;
  border-radius: 50%;
  border: 2rpx solid rgba(45, 163, 246, 0.7);
  overflow: hidden;
}
 
.radar::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: $dotSize;
  height: $dotSize;
  background: $maincolor;
  margin-left: -1rpx;
  margin-top: -1rpx;
  border-radius: 1rpx;
}
 
.dot {
  position: absolute;
  width: $dotSize;
  height: $dotSize;
  background: $maincolor;
  opacity: 0;
  border-radius: 50%;
  animation: breath 3s linear infinite;
  box-shadow: 0 0 2rpx 2rpx rgba(45, 163, 246, 0.5);
}
 
.dot-1 {
  top: 50rpx;
  left: 30rpx;
  animation-delay: 1s;
}
 
.dot-2 {
  top: 60rpx;
  right: 20rpx;
  animation-delay: 0.2s;
}
 
.dot-3 {
  top: 140rpx;
  right: 100rpx;
  animation-delay: 2.3s;
}
 
.cover {
  transform-origin: bottom right;
  border-right: 1rpx solid $maincolor;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0) 45%,
    $maincolor 100%
  );
  width: 50%;
  height: 50%;
  position: absolute;
  top: 0;
  left: 0;
  animation: rotation 3s linear infinite;
}
 
@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
 
  100% {
    transform: rotate(360deg);
  }
}
 
@keyframes breath {
  0% {
    opacity: 0;
  }
 
  10% {
    opacity: 1;
  }
 
  20% {
    opacity: 1;
  }
 
  40% {
    opacity: 0;
  }
 
  100% {
    opacity: 0;
  }
}
</style>