<template>
  <div class="member">
    <div class="member-head">
      <div class="member-head-title">开通会员尊享特权</div>
      <ul class="member-head-list">
        <li v-for="(item, index) in 4" :key="index">小标题优惠文案</li>
      </ul>
    </div>
    <ul class="member-list">
      <li v-for="(item, index) in list" :key="index">
        <div class="name">{{ item.typeName }}</div>
        <div class="desc">xxxxxxxxxxxxxxxxxxxxxxxx</div>
        <div class="flex-align-center price">
          <div class="price-left">
            <span>￥</span>
            <span>{{ item.price }}</span>
            <span>/月</span>
          </div>
          <div class="price-right">￥79.00/月</div>
        </div>
        <div class="btn">开通月卡</div>
        <div class="line">尊享权益</div>
        <div class="ul">
          <div v-for="(item, index) in 4" :key="index" class="li flex-center-between">
            <div class="">权益一</div>
            <div class="">限量</div>
          </div>
        </div>
      </li>
    </ul>
  </div>
</template>
<script setup lang="ts">
import { vipList } from '@/api/my.js';
import { ref, onMounted } from 'vue';
const list = ref([])

const getList = async () => {
  let res = await vipList();
  console.log(res.data)
  list.value = res.data;
}

onMounted(() => {
  getList()
})

</script>
<style>
body {
  /* background: #FBF4F0 !important; */
}
</style>
<style lang="scss">
.member {
  max-width: 1246px;
  margin: 0 auto;
}

.member-head {
  padding: 70px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  line-height: 1;

  .member-head-title {
    color: #8B3D22;
    font-size: 36px;
    font-weight: bold;
  }

  .member-head-list {
    display: flex;

    margin-top: 24px;

    li {
      font-size: 18px;
      margin-right: 66px;

      &:last-child {
        margin-right: 0;
      }
    }
  }
}

.member-list {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;

  li {
    width: 383px;
    padding: 24px 32px;
    background: #FFFFFF;
    border-radius: 16px;
    display: flex;
    align-items: center;
    flex-direction: column;

    .desc {
      margin: 16px 0 24px;
      font-size: 16px;
    }

    .name {
      color: #8B3D22;
      font-size: 24px;
      font-weight: bold;
    }

    .price {
      font-size: 14px;
      line-height: 1;
      align-items: flex-end;

      .price-left {
        span {
          &:nth-child(2) {
            font-size: 24px;
            font-weight: bold;
          }
        }
      }

      .price-right {
        margin-left: 20px;
      }
    }

    .btn {
      width: 100%;
      margin: 24px 0;
      color: #5A1D07;
      font-size: 16px;
      font-weight: bold;
      text-align: center;
      line-height: 50px;
      cursor: pointer;
      background: linear-gradient(270deg, #FBE8CF 0%, #F8C79D 52.05%, #FADCB9 100%);
      border-radius: 10px;
    }

    .line {
      width: 164px;
      color: #8B3D22;
      font-weight: bold;
      font-size: 14px;
      text-align: center;
      background: url('/src/assets/imgs/line@2x.png') no-repeat;
      background-size: 164px 3px;
      background-position: center center;
    }

    .ul {
      width: 100%;
      color: #8B3D22;
      font-size: 14px;

      .li {
        margin-top: 16px;
      }
    }
  }
}
</style>