<template>
  <section class="bind-cart-wrapper">
    <article class="left">
      <div class="top">
        <!-- <span class="discount">￥{{cardInfo.costPrice | formatMoney}}</span> -->
        <span class="discount">￥{{(cardInfo.couponPrice || cardInfo.preferentialPrice || cardInfo.costPrice) | formatMoney}}</span>
        <span v-show="cardInfo.couponPrice || cardInfo.preferentialPrice" class="price">
          <del>原价￥{{cardInfo.costPrice | formatMoney}}</del>
        </span>
      </div>
      <div class="bottom">
        <img src="../../images/cme/phrase2/info.png" />
        <span>激活或购买后可学习课程</span>
      </div>
    </article>
    <article class="right">
      <span class="left" @click="download">APP购买更优惠</span>
    </article>
  </section>
</template>
<script>
export default {
  props: {
    cardInfo: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {};
  },
  methods: {
    download() {
      this.$sendBuriedData({
        component_tag: `882#88217`
      });
      setTimeout(() => {
        window.location.href =
          "https://a.app.qq.com/o/simple.jsp?pkgname=com.picahealth.yunque";
      }, 100);
    },    
  }
};
</script>
<style  lang="less" scoped>
.bind-cart-wrapper {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 100;
  width: 100%;
  display: flex;
  flex-direction: row;
  height: 60px;
  line-height: 1;
  justify-content: space-between;
  padding: 10px 15px;
  font-size: 14px;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0px -2px 10px 0px rgba(0, 0, 0, 0.1);
  .left {
    display: flex;
    flex-direction: column;
    height: 40px;
    line-height: 1;
    font-size: 12px;
    // align-items: ;
    .top {
      margin-top: 3px;
      height: 24px;
      .discount {
        color: #fb5b52;
        font-size: 18px;
        font-weight: 700;
        margin-right: 4px;
      }
      .price {
        color: #979899;
      }
    }
    .bottom {
      display: flex;
      flex-direction: row;
      img {
        width: 12px;
        height: 12px;
        margin-left: 1px;
        margin-right: 4px;
      }
      & > span {
        font-size: 12px;
        color: #979899;
      }
    }
  }
  .right {
    display: flex;
    flex-direction: row;
    span {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      width: 138px;
      font-size: 14px;
      font-weight: 700;
      text-align: center;
      &.left {
        // border: 1px solid rgba(255, 122, 75, 1);
        // border-right-style: none;
        color: #FFFFFF;
        background:linear-gradient(137deg,rgba(255,166,95,1) 0%,rgba(255,122,75,1) 100%);
        border-radius: 20px;
      }
    }
  }
}
</style>
