ticket-detail.vue 4.87 KB
<script setup></script>

<template>
  <div>
    <!-- top -->
    <div class="container top">
      <img class="cover_img" />
      <div class="info">
        <div class="title">2024年亚洲舞蹈大赛无锡站</div>
        <div class="time">时间:2024.05.02 周六 — 2024.05.08 周一</div>
        <div class="address">地址:无锡太湖博览中心</div>
        <!-- 时间 -->
        <div class="select_item_box">
          <div class="label">时间</div>
          <div class="select_item">
            <div
              v-for="(it, index) in 4"
              :key="index"
              :class="[false ? 'tagActive' : 'tag']"
            >
              2024.05.02 周六
            </div>
          </div>
        </div>
        <!-- 场次 -->
        <div class="select_item_box">
          <div class="label">场次</div>
          <div class="select_item">
            <div :class="[true ? 'tagDisabled' : false ? 'tagActive' : 'tag']">
              日场
            </div>
            <div :class="[true ? 'tagDisabled' : false ? 'tagActive' : 'tag']">
              日场
            </div>
          </div>
        </div>
        <!-- 场馆 -->
        <div class="select_item_box">
          <div class="label">场馆</div>
          <div class="select_item">
            <div
              v-for="(it, index) in 2"
              :key="index"
              :class="[true ? 'tagDisabled' : false ? 'tagActive' : 'tag']"
            >
              B6
            </div>
          </div>
        </div>
        <!-- 票档 -->
        <div class="select_item_box">
          <div class="label">票档</div>
          <div class="select_item">
            <div
              v-for="(it, index) in 3"
              :key="index"
              :class="[true ? 'tagDisabled' : false ? 'tagActive' : 'tag']"
            >
              200.00元
            </div>
          </div>
        </div>
        <!-- button -->
        <div class="btn">选座购票</div>
      </div>
    </div>

    <!-- bottom -->
    <div class="container bottom">
      <div class="title">活动介绍</div>
      <div class="rich_content" v-html="'123123123123123123'"></div>

      <div class="title" style="margin-top: 30px">购票须知</div>
      <div class="rich_content" v-html="'123123123123123123'"></div>
    </div>
  </div>
</template>

<style scoped lang="scss">
.container {
  width: 1200px;
  margin: 0 auto;
  background-color: #fff;
  box-shadow: 0px 0px 46px 0px rgba(1, 16, 64, 0.08);
  border-radius: 8px;
  box-sizing: border-box;
  font-family: SourceHanSansCN, SourceHanSansCN;
  padding-bottom: 20px;
}

.top {
  display: flex;
  padding: 19px;
  margin-top: 26px;
  .cover_img {
    width: 390px;
    height: 517px;
    object-fit: fill;
    margin-right: 36px;
  }

  .info {
    padding-top: 12px;
    .title {
      font-weight: bold;
      font-size: 28px;
      color: #000000;
      line-height: 42px;
      margin-bottom: 34px;
    }
    .time {
      font-weight: 500;
      font-size: 16px;
      color: #4a4a4a;
      line-height: 24px;
      margin-bottom: 16px;
    }
    .address {
      font-weight: 500;
      font-size: 16px;
      color: #4a4a4a;
      line-height: 24px;
      margin-bottom: 33px;
    }

    .select_item_box {
      display: flex;
      margin-bottom: 30px;
      &:last-child {
        margin-bottom: 0;
      }
      .label {
        font-weight: 600;
        font-size: 16px;
        color: #000;
        line-height: 24px;
        margin-right: 12px;
        flex-shrink: 0;
      }

      .select_item {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        .tag {
          padding: 12px 18px;
          background: #eeeeee;
          border-radius: 4px;
          border: 1px solid #29343c;
          font-size: 14px;
          color: #4a4a4a;
          cursor: pointer;
        }
        .tagActive {
          padding: 12px 18px;
          background: #fff;
          border-radius: 4px;
          border: 1px solid #493ceb;
          font-size: 14px;
          color: #493ceb;
          cursor: pointer;
        }
        .tagDisabled {
          padding: 12px 18px;
          background: #878787;
          border-radius: 4px;
          border: 1px solid #29343c;
          font-size: 14px;
          color: #4a4a4a;
          cursor: no-drop;
        }
      }
    }
    .btn {
      width: 175px;
      height: 40px;
      background: linear-gradient(270deg, #493ceb 0%, #8623fc 100%);
      border-radius: 20px;
      line-height: 40px;
      text-align: center;
      font-weight: 500;
      font-size: 16px;
      color: #ffffff;
      cursor: pointer;
    }
  }
}

.bottom {
  padding: 50px;
  margin-top: 30px;
  .title {
    padding: 20px 30px;
    background: linear-gradient(270deg, #493ceb 0%, #8623fc 100%);
    font-weight: bold;
    font-size: 20px;
    color: #ffffff;
    line-height: 30px;
    margin-bottom: 30px;
  }
  .rich_content {
    margin-top: 30px;
  }
}
</style>