index.vue 2.51 KB
<template>
  <div class="wrap">
    <div class="container-panel">
      <img class="header-panel" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/expandedGold/model_4/rob.png" />
      <div class="service-item" v-for="(item, index) in serviceList" :key="index">
        <div class="service-title">{{ item.packageName }}</div>
        <div class="service-time">
          1
          <text>元</text>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      serviceList: [
        {
          cardName: 'card',
          createdBy: null,
          createdDate: null,
          deletedFlag: null,
          id: null,
          isChecked: 1,
          merchantId: 44210895,
          packageCode: 'PC0005',
          packageName: '盗抢全损无忧(嘀加)',
          packageServicePeriod: null,
          planId: null,
          servicePeriod: '1,2,3',
          templateFlag: null,
          updatedBy: null,
          updatedDate: null
        },
        {
          cardName: null,
          createdBy: null,
          createdDate: null,
          deletedFlag: null,
          id: null,
          isChecked: 1,
          merchantId: 44210895,
          packageCode: 'PC0006',
          packageName: '轮胎无忧(嘀加)',
          packageServicePeriod: null,
          planId: null,
          servicePeriod: '1',
          templateFlag: null,
          updatedBy: null,
          updatedDate: null
        }
      ]
    }
  }
}
</script>
<style scoped lang="scss">
.wrap {
  padding: 0px 8px;
  margin-bottom: 41px;

  .container-panel {
    background: #ffffff;
    border-radius: 12px;
    padding: 39px 10px 16px;
    position: relative;

    .header-panel {
      position: absolute;
      top: -15px;
      left: 50%;
      transform: translateX(-50%);
      width: 246.5px;
      height: 41px;
    }

    .service-item {
      height: 49px;
      background-image: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/expandedGold/model_4/rob_b.png');
      background-size: 100% 100%;
      border-radius: 4px;
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      padding: 0px 28.5px 0px 16px;

      &:first-child {
        margin-top: 0px;
      }

      .service-title {
        flex: 1;
        font-size: 14px;
        color: #5a3c36;
      }

      .service-time {
        text-align: center;
        font-size: 26px;
        color: #fe455d;

        span {
          font-size: 12px;
          color: #fe455d;
        }
      }
    }
  }
}
</style>