buyer-product.vue 1.64 KB
<template>
  <div class="product-info">
    <div class="product-wrapper">
      <div class="good-image">
        <ImageFormat :src="data.goodImg" :width="180" :height="180"></ImageFormat>
      </div>
      <div class="product-price">
        <div class="red">¥{{data.goodPrice}}</div>
        <div class="product-name">{{data.productName}}</div>
        <div class="price"><span class='icon-ufo'></span> {{data.colorName}},{{data.sizeName}}</div>
      </div>
    </div>
    <div v-if="!getLogin" class="no-login-tip">完成“有货”登录授权后将显示商品优惠及运费信息,请先完成登录查看最终支付金额</div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex';

export default {
  name: 'OrderProductInfo',
  props: {
    data: {
      type: Object,
      default() {
        return {};
      }
    }
  },
  computed: {
    ...mapGetters(['getLogin'])
  }
};
</script>

<style lang="scss" scoped>

.product-info {
  display: flex;
  flex-direction: column;
}

.good-image {
  width: 180px;
  height: 180px;
  display: inline-block;
  overflow: hidden;
    img {
      width: 100%;
      height: 100%;
      display: block;
    }
}

.product-price {
  display: inline-block;
  vertical-align: top;
  height: 100%;
  width: 450px;
  margin-left: 20px;
}

.price {
  font-weight: bold;
  font-size: 24px;
}

.tip {
  font-size: 28px;
  margin-top: 24px;
}

.product-name {
  font-size: 24px;
  color: #999;
  display: inline-block;
  margin-bottom: 24px;
  line-height: 36px;
}

.no-login-tip {
  color: #d0021b;
}

.red {
  color: #d0021b;
  font-size: 28px;
  margin-bottom: 12px;
  font-weight: bold;
  @include num
}

</style>