<template>
  <div class="loadings" v-if="shopLogo">
    <div class="img flex">
      <image :src="shopLogo" alt="" mode="aspectFill"></image>
      <van-loading color="black" size="60px" />
    </div>
  </div>
</template>

<script>
import { DFSImg } from "@/utils/index";
const app = getApp();
export default {
  props: {
    toHide: {
      type: Boolean,
      default: true
    }
  },
  data() {
    return {};
  },
  computed: {
    shopLogo() {
      let logoUrl = app.globalData && app.globalData.shopInfo && app.globalData.shopInfo.logoUrl;
      return logoUrl?DFSImg(logoUrl):"";
    },
  },
  created() { },
  mounted() { }
};
</script>

<style lang="scss" scoped>
.loadings {
  position: fixed;
  background: #fafafa;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3000;
  .img{
    width: 50px;
    height: 50px;
    position: relative;
    padding: 2px;
    margin: 60% auto 0;
    justify-content: center;
    align-items: center;
    image{
      width: 50px;
      height: 50px;
      border-radius: 50%;
      position: relative;
      z-index: 1;
    }
  }
  ._van-loading{
    position: absolute;
  }
  .van-loading {
    position: absolute;
    top: -2px;
    left: -2px;

    .van-loading__spinner {
      display: block;
      margin: 0 auto;
      color: #333 !important;
    }
  }
}
</style>