<template>
  <div class="subtotal">
    <div class="subtotal_left">
      <p class="subtotal_left_top">
        小计：<span>￥</span><span>{{ couponLimitInfo.totalAmt }}</span>
      </p>
      <p class="subtotal_left_bottom">
        <span v-if="couponLimitInfo.totalAmt === '0.00'">快去购买心仪商品立享优惠吧！</span>
        <span v-else>
          再买<span>{{ couponLimitInfo.needAmt }}</span
          >即可享受的优惠</span
        >
      </p>
    </div>
    <cr-button shape="circle" type="info" class="subtotal_right" @click="toCart"
      >去购物车</cr-button
    >
  </div>
</template>
<script>
export default {
  props: {
    couponLimitInfo: Object
  },
  data() {
    return {};
  },
  methods: {
    toCart() {
      this.$router.push('/shopcart');
    }
  }
};
</script>

<style lang="less" scoped>
.subtotal {
  width: 100%;
  height: 60px;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 2;
  align-items: center;
  background-color: #fff;
  border-top: 1px solid #ededed;
  display: flex;
  justify-content: space-between;
  &_left {
    padding-left: 10px;
    &_top {
      font-size: 12px;
      color: #333333;
      padding-bottom: 6px;
      span {
        font-weight: 500;
        color: #ec1500;
        &:nth-child(2) {
          font-size: 14px;
        }
      }
    }
    &_bottom {
      color: #999999;
      font-size: 12px;
    }
  }
  &_right {
    margin-right: 10px;
    background: linear-gradient(270deg, #ff5d00 0%, #ff1900 100%);
    color: #fff;
    border-radius: 20px;
    border: 0;
    width: 130px;
    height: 40px;
    font-size: 14px;
  }
}
</style>
