index.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. <template>
  2. <view class="loading_box mask flex-center" @touchmove.stop.prevent="HandlePageMove">
  3. <!-- 点动画 -->
  4. <view v-if="false" class="dot_box theOuterRotation">
  5. <view v-for="item in 4" class="dot_item"></view>
  6. </view>
  7. <!-- 进度条动画 -->
  8. <view v-if="false" class="progress_box">
  9. <view class="progress_item progress_roll_center"></view>
  10. </view>
  11. Loading....
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. name: 'Index',
  17. data() {
  18. return {}
  19. },
  20. onPageScroll(e) {
  21. return false
  22. },
  23. mounted() {
  24. // #ifdef H5
  25. // #endif
  26. },
  27. methods: {
  28. HandlePageMove() {
  29. return false
  30. }
  31. }
  32. }
  33. </script>
  34. <style lang="scss"
  35. scoped
  36. >
  37. .mask {
  38. width: 100vw;
  39. height: 100vh;
  40. background: rgba(0, 0, 0, 0.5);
  41. color: #fff;
  42. }
  43. .flex-center {
  44. display: flex;
  45. align-items: center;
  46. justify-content: center;
  47. flex-direction: column;
  48. }
  49. .loading_box {
  50. width: 100vw;
  51. height: 100vh;
  52. position: fixed;
  53. top: 0;
  54. bottom: 0;
  55. z-index: 9999;
  56. /** 点动画*/
  57. .theOuterRotation {
  58. animation: rotate 2s ease-in-out .5s infinite normal;
  59. }
  60. .dot_box {
  61. width: 80rpx;
  62. height: 80rpx;
  63. //background: #fff;
  64. border-radius: 20rpx;
  65. margin: 20rpx 0;
  66. position: relative;
  67. // 原始dot
  68. .dot_item {
  69. width: 30rpx;
  70. height: 30rpx;
  71. background: #fff;
  72. border-radius: 50%;
  73. position: absolute;
  74. transition: all .6s;
  75. box-shadow: 0 0 2rpx #b4b4b4;
  76. &:nth-child(1) {
  77. top: 0;
  78. left: 0;
  79. }
  80. &:nth-child(2) {
  81. top: 0;
  82. right: 0;
  83. }
  84. &:nth-child(3) {
  85. bottom: 0;
  86. right: 0;
  87. }
  88. &:nth-child(4) {
  89. bottom: 0;
  90. left: 0;
  91. }
  92. }
  93. // 单双放大动画
  94. .dot_scale {
  95. &:nth-child(1) {
  96. top: 0;
  97. left: 0;
  98. animation: magnify 2s ease-in-out 0s infinite alternate;
  99. }
  100. &:nth-child(2) {
  101. top: 0;
  102. right: 0;
  103. animation: magnify 2s ease-in-out 1s infinite alternate;
  104. }
  105. &:nth-child(3) {
  106. bottom: 0;
  107. right: 0;
  108. animation: magnify 2s ease-in-out 0s infinite alternate;
  109. }
  110. &:nth-child(4) {
  111. bottom: 0;
  112. left: 0;
  113. animation: magnify 2s ease-in-out 1s infinite alternate;
  114. }
  115. }
  116. // 单点移动动画
  117. .dot_move {
  118. &:nth-child(1) {
  119. z-index: 2;
  120. animation: moveDot 2s ease-in-out 0s infinite normal;
  121. }
  122. }
  123. // 单偶放大
  124. @keyframes magnify {
  125. 0% {
  126. transform: scale(1);
  127. background: rgba(0, 255, 228, 0.82);
  128. }
  129. 25% {
  130. background: #32b5cc;
  131. }
  132. 50% {
  133. transform: scale(1.4);
  134. background: #73e34e;
  135. }
  136. 75% {
  137. background: #0ec469;
  138. }
  139. 100% {
  140. transform: scale(1);
  141. background: #868686;
  142. }
  143. }
  144. // 移动单点
  145. @keyframes moveDot {
  146. 0% {
  147. top: 0;
  148. left: 0;
  149. background: #d0f598;
  150. }
  151. 25% {
  152. top: 0;
  153. left: 100%;
  154. transform: translateX(-100%);
  155. background: #f5e298;
  156. }
  157. 50% {
  158. top: 100%;
  159. left: 100%;
  160. transform: translate(-100%, -100%);
  161. background: #6bea91;
  162. }
  163. 75% {
  164. top: 100%;
  165. left: 0;
  166. transform: translateY(-100%);
  167. background: #e84c7a;
  168. }
  169. 100% {
  170. top: 0;
  171. left: 0;
  172. }
  173. }
  174. @keyframes rotate {
  175. 0% {
  176. transform: rotate(0deg);
  177. }
  178. 100% {
  179. transform: rotate(360deg);
  180. }
  181. }
  182. }
  183. /** 进度条动画*/
  184. .progress_box {
  185. width: 300rpx;
  186. height: 25rpx;
  187. margin: 20rpx 0;
  188. border-radius: 25rpx;
  189. background-color: #fff;
  190. position: relative;
  191. overflow: hidden;
  192. .progress_item {
  193. width: 0%;
  194. height: 100%;
  195. background: #f68686;
  196. border-radius: 25rpx;
  197. }
  198. .progress_roll {
  199. animation: roll 1s ease-in-out 0s infinite alternate-reverse;
  200. }
  201. .progress_roll_center {
  202. width: 5%;
  203. transition: all .6s;
  204. margin: 0 auto;
  205. animation: roll 1s cubic-bezier(.15, .2, .05, .4) 0s infinite alternate-reverse;
  206. }
  207. }
  208. @keyframes roll {
  209. from {
  210. width: 5%;
  211. }
  212. to {
  213. width: 100%;
  214. }
  215. }
  216. }
  217. </style>