<template>
  <!-- 展示：背景 头像 店名 介绍 -->
  <view class="dec-shopFront">
    <view class="type" :class="arg.styleArg">
      <image
        class="image"
        mode="widthFix"
        :src="decImgDomain(arg.bgImg, 'temp-bg.png')"
      />
      <view class="wrap">
        <view class="logo">
          <image
            class="img"
            v-if="arg.logoImg"
            :src="decImgDomain(arg.logoImg, 'temp-user.jpg')"
            mode="aspectFit"
          />
        </view>
        <view class="info">
          <text class="name dec-truncate">{{ arg.shopName }}</text>
          <text class="intro dec-truncate">{{ arg.intro }}</text>
        </view>
      </view>
    </view>
  </view>
</template>
<script>
export default {
  inject: ["decAxios", "decImgDomain"],
  props: {
    tab: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  data() {
    return {
      arg: null,
    };
  },
  created() {
    // 动态获取店铺的logo-非动态获取头像arg.logoImg
    this.arg = this.tab.arg;
  },
};
</script>
