<template>
  <view class="container">
    <!-- 优惠券的可用和失效 -->
    <view class="use">
      <u-tabs
        :list="list2"
        lineWidth="70"
        lineColor="#347caf"
        :scrollable="false"
        :activeStyle="{
          color: '#347caf',
          fontWeight: 'bold',
          transform: 'scale(1.05)',
        }"
        :inactiveStyle="{
          color: '#b7b6b8',
          transform: 'scale(1)',
        }"
        itemStyle="padding-left: 90rpx; padding-right: 80rpx; height: 120rpx;"
      />
    </view>

    <!-- 优惠券可用 -->
    <view class="couponUse">
      <view class="useLeft">
        <view>满500减100元</view>
        <text>2320-07-02 ~ 202-08-03</text>
      </view>
      <view class="useRight">
        <view class="text">2<text>折</text></view>
        <view>折扣</view>
        <view class="gouUse">去使用</view>
      </view>
    </view>
    <!-- 优惠券失效 -->
    <view class="couponDisUse couponUse">
      <view class="useLeft">
        <view>满500减100元</view>
        <text>2320-07-02 ~ 202-08-03</text>
      </view>
      <view class="useRight">
        <view class="text">2<text>折</text></view>
        <view>折扣</view>
        <view class="gouUse">去使用</view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      list: [
        {
          id: 0,
          name: '通用',
        },
        {
          id: 1,
          name: '满减',
        },
        {
          id: 2,
          name: '折扣',
        },
        {
          id: 3,
          name: '赠送',
        },
      ],
      list2: [
        {
          name: '可用',
        },
        {
          name: '失效',
        },
      ],
      current: 1,
    };
  },
  methods: {
    sectionChange() {},
  },
};
</script>

<style lang="scss" scoped>
.container {
  height: 100vh;
  background-color: #efefef;
  .use {
    padding: 0 140rpx;
  }

  /* 优惠券可用 */
  .couponUse {
    margin: 20rpx 30rpx;
    height: 200rpx;
    display: flex;
    background-color: #fff;
    box-sizing: border-box;
    .useLeft {
      width: 380rpx;
      padding: 20rpx;
      > view {
        font-size: 40rpx;
        margin: 20rpx;
        color: #333;
      }
      > text {
        font-size: 28rpx;
        color: #5f5f5f;
      }
    }
    .useRight {
      height: 100%;
      padding: 10rpx;
      color: #fff;
      text-align: center;
      box-sizing: border-box;
      width: calc(100% - 380rpx);
      background-color: #347caf;
      .text {
        font-size: 50rpx;
        > text {
          margin-left: 5rpx;
          font-size: 24rpx;
        }
      }
      .gouUse {
        width: 180rpx;
        height: 60rpx;
        line-height: 60rpx;
        color: #347caf;
        margin: 16rpx 0 0 60rpx;
        background-color: #fff;
      }
    }
  }
  .couponDisUse {
    .useRight {
      background-color: #cecece;
      .gouUse {
        color: #cecece;
      }
    }
  }
}
</style>
