header.vue 1.54 KB
<template>
  <div class="detail-header-wrapper">
    <div class="count-down-wrapper" v-if="statusDetail.status === 0">
      <p class="status">{{ statusDetail.statuStr }}</p>
      <count-down
        class="count-down"
        :leftTime="statusDetail.leftTime"
        :isShowIcon="false"
      />
      <p class="status-desc">{{ statusDetail.detailDesc }}</p>
    </div>
    <div class="status-info" v-else>
      <p class="status">{{ statusDetail.statuStr }}</p>
      <p class="status-desc">{{ statusDetail.detailDesc }}</p>
    </div>
  </div>
</template>

<script>
import { createNamespacedHelpers } from "vuex";
import CountDown from "../../components/count-down";

const { mapGetters } = createNamespacedHelpers("order/orderDetail");

export default {
  components: {
    CountDown
  },
  computed: {
    ...mapGetters(["statusDetail"])
  }
};
</script>

<style lang="scss" scoped>
.detail-header-wrapper {
  letter-spacing: 0;
  margin-top: 10px;
  margin-bottom: 40px;

  .count-down-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 24px;

    .status {
      font-size: 36px;
    }

    .count-down {
      font-weight: bold;
      font-size: 72px;
    }

    .status-desc {
      color: #999;
      margin-top: 20px;
    }
  }

  .status-info {
    margin-bottom: 40px;

    .status {
      font-size: 68px;
      color: #000;
      letter-spacing: 0.82px;
      line-height: 82px;
      font-weight: bold;
    }

    .status-desc {
      color: #999;
      letter-spacing: 0;
      margin-top: 30px;
    }
  }
}
</style>