// 10019 全本订阅余额不足（充值）
<template>
  <x-prompt :visible="visible" class="order-confirm-pay" @close="close">
    <div class="head">全本订购提醒</div>
    <div :class="['body', { 'book-order__wrap': !!is_first_book_order }]">
      <!-- <div
        class="book-name single-line"
        v-if="
          !showBookName && !(!is_first_book_order && !!book_order_custom_price)
        "

      >
        《{{ book_name }}》
      </div> -->
      <template v-if="is_first_book_order && !book_order_custom_price">
        <div class="fee">
          <p>
            <i class="round"></i>首订优惠:<span
              class="red"
              style="font-weight:bold;padding:0 3px;font-size: .34rem;"
              >{{ fee }}</span
            >书币<span style="color:#aaa;font-size:.26rem;text-decoration:line-through">(1399书币)</span>
          </p>
          <p>
            <i class="round"></i>余额:<span
              style="font-weight:bold;padding:0 3px;"
              >{{ user_balance }}</span
            >书币<span class="red" style="font-size:12px">（余额不足）</span>
          </p>
        </div>
      </template>
      <template v-else>
        <!-- <div
          class="fee"
          v-if="!book_order_custom_price"
          :class="{ 'is-discount': discount }"
        >
          <i class="round"></i>本书价格： <span class="red">{{ fee }}</span
          >书币
          <span class="red">（余额不足）</span>
        </div> -->
        <div class="fee" :class="{ 'is-discount': discount }">
          <p>
            <i class="round"></i>全本仅需:<span
              class="red"
              style="padding:0 5px;font-weight: bold;font-size: .34rem;"
              >{{ fee }}</span
            >书币
          </p>
          <p>
            <i class="round"></i>余额:<span
              style="color:#000;padding:0 5px;font-weight: bold;"
              >{{ user_balance }}</span
            >书币<span class="red" style="font-size:12px">（余额不足）</span>
          </p>
        </div>
        <div v-if="discount" class="discount">
          <i class="round"></i>今日特价：
          <span class="red">{{ discount_fee }}</span
          >书币({{ discount }})
        </div>
      </template>
    </div>
    <div class="confirm" @click="confirm">充值</div>
  </x-prompt>
</template>
<script>
import prompt from "../prompt.vue";
export default {
  components: { "x-prompt": prompt },
  data() {
    return {
      showBookName: !!window.options.hide_book_name
    };
  },
  methods: {
    close() {
      this.reject("close");
    }
  }
};
</script>
<style lang="scss">
/*顶级的产品只改这2处弹窗，牛逼plus*/
.order-confirm-pay {
  .wrap {
    margin: auto;
    background-color: #fff;
    width: 6.6rem;
    text-align: center;
    padding-bottom: 0.3rem;
    border-radius: 0.2rem;
    overflow: visible !important;
    position: relative !important;
    padding-bottom: 0 !important;
    .confirm {
      border-radius: 0.6rem;
      margin-bottom: 0.3rem;
    }
    .head {
      height: 0.6rem;
      line-height: 0.6rem;
      font-size: 0.32rem;
      padding-top: 0.8rem;
      border-bottom: 0;
      font-weight: bold;
    }
    .fee {
      text-align: left;
      height: auto!important;
      font-size: 0.3rem;
      color: #666;
      display: inline-block;
      margin: 0 auto;
      font-weight: normal;
      line-height: 1;
      margin-bottom: 0.2rem;
      >p{
        height:.68rem;
        line-height:.68rem;
      }
    }
    .body {
      padding: 0.1rem 0 0.2rem;
    }
    &::after {
      position: absolute;
      width: 1.34rem;
      height: 1.34rem;
      content: "";
      display: block;
      background-image: url("https://cdn-novel.bookkks.com/h5/2022-10-14-reader-tips.png");
      background-size: cover;
      top: -0.68rem;
      left: 50%;
      margin-left: -0.68rem;
    }
    .round {
      background: #0094ff;
      border-radius: 100%;
      width: 0.1rem;
      height: 0.1rem;
      display: inline-block;
      vertical-align: middle;
      margin-right: 0.1rem;
    }
  }

  .book-order__wrap {
    .book-name {
      text-align: center;
      color: #333;
      font-size: 0.28rem;
      margin-bottom: 0.1rem;
    }

    .fee {
      span.red {
        font-size: 0.24rem;
        font-weight: normal;
      }
    }

    .first-order {
      height: auto;
      text-align: left;
      font-size: 0.28rem;
      line-height: 1;
      margin-bottom: 0.4rem;
      padding-left: 1.2rem;

      span {
        font-size: 0.36rem;
        color: #666;
      }

      i {
        font-weight: normal;
        font-style: normal;
        font-size: 0.26rem;
        color: #333;
        text-decoration: line-through;
      }
    }
  }
}
</style>
