order-margin.vue 1.28 KB
<template>
  <div>
    <div class="tip" v-if="!superSell">
      需支付保证金:<span class="red">{{ earnestInfo.earnestMoneyStr || "¥0" }}</span>
      <i
        v-if="!hiddenIcon"
        class="iconfont iconquestion  icon-class"
        @click="onClick"
      ></i>
    </div>
    <div class="tip2">
      所有商品必须为国内现货,且承诺36小时内发货,交易成功后将自动退还保证金
    </div>
  </div>
</template>

<script>
export default {
  name: "OrderFee",
  props: {
    data: {
      type: Object,
      default() {
        return {};
      }
    },
    hiddenIcon: {
      type: Boolean,
      default() {
        return false;
      }
    },
    superSell: {
      type: Boolean,
      default() {
        return false;
      }
    },
    url: {
      type: String,
      default: ""
    }
  },
  data() {
    return {
      earnestInfo: this.$props.data || {}
    }
  },
  methods: {
    onClick() {
      if (this.url) {
        this.$xianyu.goXianyuNewPage({ url: this.url });
      }
    }
  }
};
</script>

<style lang="scss" scoped>
.tip {
  font-size: 28px;
  color: black;
  margin-bottom: 10px;
}

.red {
  color: #d0021b;
}

.tip2 {
  font-size: 24px;
  color: #999;
}

.icon-class {
  color: #d8d8d8;
  font-size: 26px;
  margin-left: 20px;
}
</style>