wike-loading-page.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <template>
  2. <view>
  3. <!-- #ifdef H5 -->
  4. <!-- <view class="loading-wrap" v-if="isLoading">
  5. <u-loading-page :loading="isLoading" loading-text="正在加载" icon-size="35" color="#9e9e9e" loadingColor="#9e9e9e"></u-loading-page>
  6. </view> -->
  7. <view class="loading-wrap" v-show="isLoading">
  8. <!-- <view class="ue-page-loading"></view> -->
  9. <image class="loading-image" src="/static/images/loading.gif"></image>
  10. <!-- <u-loading-icon textSize="19" :vertical="true" size="42" mode="semicircle"></u-loading-icon> -->
  11. </view>
  12. <!-- #endif -->
  13. <!-- #ifdef MP-WEIXIN -->
  14. <!-- <view class="loading-wrap" v-if="appInfo.examine_mode == 1 || isLoading">
  15. <u-loading-page :loading="appInfo.examine_mode == 1 || isLoading" loading-text="正在加载" icon-size="35" color="#9e9e9e" loadingColor="#9e9e9e"></u-loading-page>
  16. </view> -->
  17. <view class="loading-wrap" v-if="appInfo.examine_mode == 1 || isLoading">
  18. <!-- <view class="ue-page-loading"></view> -->
  19. <image class="loading-image" src="/static/images/loading.gif"></image>
  20. <!-- <u-loading-icon textSize="19" :vertical="true" size="42" ></u-loading-icon> -->
  21. </view>
  22. <!-- #endif -->
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import {
  28. mapMutations,
  29. mapActions,
  30. mapState,
  31. mapGetters
  32. } from 'vuex';
  33. export default {
  34. name:"wike-loading-page",
  35. data() {
  36. return {
  37. };
  38. },
  39. props: {
  40. isLoading: {
  41. type: Boolean,
  42. default: true
  43. }
  44. },
  45. computed: {
  46. ...mapGetters(['appInfo'])
  47. },
  48. mounted : async function() {
  49. // // #ifdef MP-WEIXIN || MP-KUAISHOU
  50. // let init = await this.appInit()
  51. // if(init.examine_mode == 1){
  52. // this.$Router.replaceAll('/pages/wx/wx')
  53. // }
  54. // // #endif
  55. },
  56. methods: {
  57. ...mapActions(['appInit']),
  58. }
  59. }
  60. </script>
  61. <style>
  62. /* .loading-wrap {
  63. width: 100vw;
  64. height: 100%;
  65. position: fixed;
  66. top: 0;
  67. left: 0;
  68. z-index: 99999;
  69. } */
  70. // 加载
  71. .loading-wrap {
  72. width: 100vw;
  73. height: 100%;
  74. position: fixed;
  75. top: 0;
  76. left: 0;
  77. display: -webkit-flex;
  78. display: flex;
  79. -webkit-justify-content: center;
  80. justify-content: center;
  81. -webkit-align-items: center;
  82. align-items: center;
  83. z-index: 9999;
  84. background: #fff;
  85. }
  86. .loading-image{
  87. width: 600rpx;
  88. height: 400rpx;
  89. }
  90. .loading {
  91. width: 180rpx;
  92. height: 180rpx;
  93. position: relative;
  94. }
  95. .loading-bg {
  96. width: 180rpx;
  97. height: 180rpx;
  98. position: absolute;
  99. top: 0;
  100. left: 0;
  101. z-index: 0;
  102. }
  103. .loading-rotateing {
  104. position: absolute;
  105. top: 0;
  106. left: 0;
  107. z-index: 1;
  108. width: 180rpx;
  109. height: 180rpx;
  110. -webkit-animation: rotating 600ms linear 0ms reverse infinite;
  111. animation: rotating 600ms linear 0ms reverse infinite;
  112. }
  113. @-webkit-keyframes rotating {
  114. from {
  115. -webkit-transform: rotate(0);
  116. transform: rotate(0);
  117. }
  118. to {
  119. -webkit-transform: rotate(-360deg);
  120. transform: rotate(-360deg);
  121. }
  122. }
  123. @keyframes rotating {
  124. from {
  125. -webkit-transform: rotate(0);
  126. transform: rotate(0);
  127. }
  128. to {
  129. -webkit-transform: rotate(-360deg);
  130. transform: rotate(-360deg);
  131. }
  132. }
  133. /* 加载样式2 */
  134. .ue-page-loading {
  135. position: absolute;
  136. top: calc(50% - 1.25em);
  137. left: calc(50% - 1.25em);
  138. width: 2.5em;
  139. height: 2.5em;
  140. -webkit-transform: rotate(165deg);
  141. transform: rotate(165deg);
  142. z-index: 10;
  143. }
  144. .ue-page-loading:before,
  145. .ue-page-loading:after {
  146. content: '';
  147. position: absolute;
  148. top: 50%;
  149. left: 50%;
  150. display: block;
  151. width: .5em;
  152. height: .5em;
  153. border-radius: .25em;
  154. -webkit-transform: translate(-50%, -50%);
  155. transform: translate(-50%, -50%)
  156. }
  157. .ue-page-loading:before {
  158. -webkit-animation: before 2s infinite;
  159. animation: before 2s infinite
  160. }
  161. .ue-page-loading:after {
  162. -webkit-animation: after 2s infinite;
  163. animation: after 2s infinite
  164. }
  165. @keyframes before {
  166. 0% {
  167. width: .5em;
  168. -webkit-box-shadow: 1em -.5em rgba(225, 20, 98, .75), -1em .5em rgba(111, 202, 220, .75);
  169. box-shadow: 1em -.5em rgba(225, 20, 98, .75), -1em .5em rgba(111, 202, 220, .75)
  170. }
  171. 35% {
  172. width: 2.5em;
  173. -webkit-box-shadow: 0 -.5em rgba(225, 20, 98, .75), 0 .5em rgba(111, 202, 220, .75);
  174. box-shadow: 0 -.5em rgba(225, 20, 98, .75), 0 .5em rgba(111, 202, 220, .75)
  175. }
  176. 70% {
  177. width: .5em;
  178. -webkit-box-shadow: -1em -.5em rgba(225, 20, 98, .75), 1em .5em rgba(111, 202, 220, .75);
  179. box-shadow: -1em -.5em rgba(225, 20, 98, .75), 1em .5em rgba(111, 202, 220, .75)
  180. }
  181. 100% {
  182. -webkit-box-shadow: 1em -.5em rgba(225, 20, 98, .75), -1em .5em rgba(111, 202, 220, .75);
  183. box-shadow: 1em -.5em rgba(225, 20, 98, .75), -1em .5em rgba(111, 202, 220, .75)
  184. }
  185. }
  186. @keyframes after {
  187. 0% {
  188. height: .5em;
  189. -webkit-box-shadow: .5em 1em rgba(61, 184, 143, .75), -.5em -1em rgba(233, 169, 32, .75);
  190. box-shadow: .5em 1em rgba(61, 184, 143, .75), -.5em -1em rgba(233, 169, 32, .75)
  191. }
  192. 35% {
  193. height: 2.5em;
  194. -webkit-box-shadow: .5em 0 rgba(61, 184, 143, .75), -.5em 0 rgba(233, 169, 32, .75);
  195. box-shadow: .5em 0 rgba(61, 184, 143, .75), -.5em 0 rgba(233, 169, 32, .75)
  196. }
  197. 70% {
  198. height: .5em;
  199. -webkit-box-shadow: .5em -1em rgba(61, 184, 143, .75), -.5em 1em rgba(233, 169, 32, .75);
  200. box-shadow: .5em -1em rgba(61, 184, 143, .75), -.5em 1em rgba(233, 169, 32, .75)
  201. }
  202. 100% {
  203. -webkit-box-shadow: .5em 1em rgba(61, 184, 143, .75), -.5em -1em rgba(233, 169, 32, .75);
  204. box-shadow: .5em 1em rgba(61, 184, 143, .75), -.5em -1em rgba(233, 169, 32, .75)
  205. }
  206. }
  207. </style>