多租户商城-商户小程序端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

250 lines
4.3 KiB

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