<template>
  <view class="service">
    <view class="service-top">
      <view class="item-flex">
        <view class="title"
          >【养车】标题标题标标题标题标题标题标题标题标题标题……</view
        >
        <u-icon name="share-square" size="24" />
      </view>
      <Image src="https://cdn.uviewui.com/uview/album/1.jpg"></Image>
    </view>
    <view class="service-center">
      <view class="price">
        <view>
          <view class="price-item">
            <text class="price-text">￥</text>199
          </view>
          <view>门市价 ￥489</view>
        </view>
        <view>
          <view class="favorable">优惠推荐</view>
          <view>还剩 49 天 02 时</view>
        </view>
      </view>
      <!-- 优惠券 -->
      <view class="coupon">
        <view class="coupon-flex">
          <view class="coupon-item"> <text class="text">￥</text>5 </view>
          <view class="keep">
            <view>养车/用车品类新用户专享</view>
            <view>养车用车服务通用</view>
          </view>
        </view>
        <view>
          <view>有效期仅剩</view>
          <view>23：59：53</view>
        </view>
      </view>
      <view class="coupon">
        <view class="coupon-flex">
          <view class="coupon-item"> <text class="text">￥</text>5 </view>
          <view class="keep">
            <view>养车/用车品类新用户专享</view>
            <view>养车用车服务通用</view>
          </view>
        </view>
        <view>
          <view class="claimable">可领取</view>
        </view>
      </view>
    </view>

    <!-- 服务详情 -->
    <view class="detail">
      <text class="detail-text">服务详情</text>
    </view>

    <!-- 评价内容 -->
    <view class="Evaluate-content">
      <view class="album__avatar">
        <view class="album-img">
          <image
            src="https://cdn.uviewui.com/uview/album/1.jpg"
            mode=""
            style="width: 40px; height: 40px"
          />
          <view>
            <view class="album-text">王***青</view>
            <u-rate :value="3.7" readonly :size="14" />
          </view>
        </view>
        <view>2023.06.18</view>
      </view>
      <view class="album__content">
        <u--text
          margin="0 0 8px 0"
          text="全面的组件和便捷的工具会让您信手拈来面的组件和便捷的工具会让您信手拈来面的组件和便捷的工具会让您信手拈来，如鱼得水"
        />
        <u-album :urls="urls2"></u-album>
      </view>
      <view class="album__avatar">
        <view class="album-img">
          <image
            src="https://cdn.uviewui.com/uview/album/1.jpg"
            mode=""
            style="width: 40px; height: 40px"
          />
          <view>
            <view class="album-text">王***青</view>
            <u-rate :value="3.7" readonly :size="14" />
          </view>
        </view>
        <view>2023.06.18</view>
      </view>
      <view class="album__content">
        <u--text
          margin="0 0 8px 0"
          text="全面的组件和便捷的工具会让您信手拈来面的组件和便捷的工具会让您信手拈来面的组件和便捷的工具会让您信手拈来，如鱼得水"
        />
        <u-album :urls="urls2"></u-album>
      </view>
      <view class="album__avatar">
        <view class="album-img">
          <image
            src="https://cdn.uviewui.com/uview/album/1.jpg"
            mode=""
            style="width: 40px; height: 40px"
          />
          <view>
            <view class="album-text">王***青</view>
            <u-rate :value="3.7" readonly :size="14" />
          </view>
        </view>
        <view>2023.06.18</view>
      </view>
      <view class="album__content">
        <u--text
          margin="0 0 8px 0"
          text="全面的组件和便捷的工具会让您信手拈来面的组件和便捷的工具会让您信手拈来面的组件和便捷的工具会让您信手拈来，如鱼得水"
        />
        <u-album :urls="urls2"></u-album>
      </view>
    </view>

    <!-- 底部 -->
    <view class="service-footer">
      <view class="service-item">
        <view class="service-text">
          <u-icon name="file-text" size="24" />
          <text>店铺</text>
        </view>
        <view class="service-text">
          <u-icon name="chat" size="24" class="chat" />
          <text>立即咨询</text>
        </view>
        <view class="service-text">
          <u-icon name="heart-fill" size="24" />
          <text>收藏</text>
        </view>
      </view>
      <view class="buyNow">立即购买</view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      albumWidth: 0,
      urls2: [
        'https://cdn.uviewui.com/uview/album/1.jpg',
        'https://cdn.uviewui.com/uview/album/2.jpg',
        'https://cdn.uviewui.com/uview/album/3.jpg',
        'https://cdn.uviewui.com/uview/album/4.jpg',
        'https://cdn.uviewui.com/uview/album/5.jpg',
        'https://cdn.uviewui.com/uview/album/6.jpg',
        'https://cdn.uviewui.com/uview/album/7.jpg',
        'https://cdn.uviewui.com/uview/album/8.jpg',
        'https://cdn.uviewui.com/uview/album/9.jpg',
        'https://cdn.uviewui.com/uview/album/10.jpg',
      ],
    };
  },
};
</script>

<style lang="scss" scoped>
.service {
  min-height: 100vh;
}

.service-top {
  margin: 20rpx;

  .item-flex {
    display: flex;

    .title {
      font-size: 18px;
      font-weight: bold;
      margin: 20rpx;
    }
  }

  Image {
    width: 100%;
    height: 200px;
  }
}

.service-center {
  margin: 20rpx;

  .price {
    height: 120rpx;
    padding: 15rpx 30rpx;
    display: flex;
    margin: 20rpx 0;
    color: #fff;
    font-size: 24rpx;
    font-weight: normal;
    box-sizing: border-box;
    border-radius: 20rpx 20rpx 0 0;
    background-color: #6c9fc3;
    justify-content: space-between;

    .price-item {
      font-size: 44rpx;
      margin-bottom: 6rpx;

      .price-text {
        font-size: 24rpx;
      }
    }

    .favorable {
      font-size: 22px;
      margin-bottom: 6rpx;
    }
  }
}

// 优惠券
.coupon {
  height: 140rpx;
  display: flex;
  font-size: 32rpx;
  color: #f2110d;
  line-height: 1.5;
  border-radius: 10rpx;
  margin: 30rpx 0 20rpx 0;
  padding: 20rpx 10rpx;
  box-sizing: border-box;
  background-color: #faeaea;
  border: 2rpx solid #eb8b8b;
  justify-content: space-between;

  .coupon-flex {
    display: flex;
    .coupon-item {
      font-size: 36px;
      margin-right: 20rpx;
      .text {
        font-size: 36rpx;
      }
    }
  }
  .claimable {
    width: 160rpx;
    height: 70rpx;
    color: #fff;
    text-align: center;
    line-height: 70rpx;
    margin-top: 15rpx;
    border-radius: 70rpx;
    background-color: #eda180;
  }
}
// 服务详情
.detail {
  margin: 20rpx;
  .detail-text {
    font-size: 16px;
    font-weight: bold;
  }
}

// 评价内容
.Evaluate-content {
  margin: 20rpx;
  .album__avatar {
    margin: 40rpx 0;
    display: flex;
    font-size: 28rpx;
    color: rgb(127, 129, 130);
    margin-bottom: 20rpx;
    justify-content: space-between;
    .album-img {
      display: flex;
      .album-text {
        color: #333;
        margin-bottom: 12rpx;
      }
    }
  }
}
// 底部
.service-footer {
  height: 60px;
  padding: 10rpx;
  position: fixed;
  left: 0;
  bottom: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  background-color: #fff;
  border-top: 1px solid #eb8b8b;
  box-sizing: border-box;
  .service-item {
    display: flex;
    margin-top: 10rpx;
    margin-left: 20rpx;
    font-size: 14px;
    .service-text {
      margin-right: 30rpx;
      .chat {
        margin-left: 70rpx;
      }
    }
  }
  .buyNow {
    width: 200px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    border-radius: 40px;
    margin-top: 12rpx;
    margin-right: 16rpx;
    background-color: #f0d318;
  }
}
</style>
