123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235 |
- <!-- <template>
- <view>
-
- <view class="loading" v-if="is_loading">
-
- <image class="load_img" :src="waimai ? '../../../static/loading/loading2.gif' : '../../static/loading/loading2.gif'" mode=""></image>
-
- </view>
-
- </view>
- </template> -->
- <template>
- <view class="" v-if="is_loading">
- <view class="loader">
-
- </view>
- </view>
- </template>
- <script>
- export default {
- props: ["waimai"],
- data() {
- return {
-
- }
- },
- methods:{
- switch_loading(){
- this.$store.commit("switch_loading")
- }
- },
-
- computed:{
- is_loading(){
- return this.$store.state.user.loading
- }
- }
- }
- </script>
- <style scoped>
- .loading{position: fixed;top: 0;left: 0;bottom: 0;right: 0;display: flex;align-items: center;justify-content: space-around;z-index: 1001;background: transparent;}
- .load_img{width: 640rpx;height: 490rpx;}
-
- .loader,
- .loader:before,
- .loader:after {
- -webkit-animation: load1 1s infinite ease-in-out;
- animation: load1 1s infinite ease-in-out;
- width: 1em;
- height: 3em;
- }
- .loader {
- color: #FF8080;
- background: #FF8080;
- text-indent: -9999em;
- margin: 88px auto;
- position: fixed;
- font-size: 16upx;
- -webkit-transform: translateZ(0);
- -ms-transform: translateZ(0);
- transform: translateZ(0);
- -webkit-animation-delay: -0.16s;
- animation-delay: -0.16s;
- top: 30%;left: 0;bottom: 0;right: 0;
- }
- .loader:before,
- .loader:after {
- position: absolute;
- top: 0;
- content: '';
- }
- .loader:before {
- left: -1.5em;
- -webkit-animation-delay: -0.32s;
- animation-delay: -0.32s;
- background: #FF9999;
- color: #FF9999;
- }
- .loader:after {
- left: 1.5em;
- background: #FE6666;
- color: #FE6666;
- }
- @-webkit-keyframes load1 {
- 0%,
- 80%,
- 100% {
- box-shadow: 0 0;
- height: 2em;
- }
- 40% {
- box-shadow: 0 -2em;
- height: 3em;
- }
- }
- @keyframes load1 {
- 0%,
- 80%,
- 100% {
- box-shadow: 0 0;
- height: 2em;
- }
- 40% {
- box-shadow: 0 -2em;
- height: 3em;
- }
- }
-
-
-
-
- </style>
|