<template>
  <view class="user-content-box">
    <view class="content-top">
      <view class="top-left">“</view>
      <view class="top-right">
        <image  class="right-img"   mode="aspectFill" src="/static/img/index/like.png" ></image>
        <view class="right-text sys-color-white sys-weight-400">108喜欢</view>
      </view>
    </view>
    <view class="user-signature sys-color-white sys-weight-400">崇尚自由，热爱生活，足以!</view>
    <view class="user-tag">
      <view class="tag-item" v-for="i in 5">
        <image  class="tag-img"   mode="aspectFill" src="/static/img/index/tag-img.png" ></image>
        <view class="tag-text sys-color-gray-3 sys-weight-400">认识朋友</view>
      </view>
    </view>
    <view class="user-wire"></view>
    <view class="gift-box" @touchmove.stop="stopTouche" @touchend.stop="stopTouche"  @touchstart.stop="stopTouche">
      <view class="gift-title">
        <view class="gift-title-left sys-weight-600">心动礼物</view>
        <view class="gift-title-right">
          <view class="gift-right-text sys-color-white sys-weight-400">全部</view>
          <image  class="gift-right-img"   mode="aspectFill" src="/static/img/index/right.png" ></image>
        </view>
      </view>
      <view class="gift-list" id="gift-list" >
        <view class="gift-item" v-for="giftItem in giftList">
          <image  class="gift-item-img"  :class="{'gift-item-img-gray':giftItem.num<=0}"  mode="aspectFill" :src="giftItem.url" ></image>
          <view class="gift-num sys-color-white" v-if="giftItem.num>0">
            <text>X</text>
            <text>{{giftItem.num}}</text>
          </view>
          <view class="gift-but sys-background-yellow sys-color-black sys-weight-500" v-else>点亮</view>
        </view>
      </view>

    </view>

    <view class="dynamic-list">
      <dynamic-item ></dynamic-item>

    </view>

  </view>
</template>

<script>
import ImgOne from "@/pages/common/img/img-one";
import ImgTwo from "@/pages/common/img/img-two";
import ImgThree from "@/pages/common/img/img-three";
import DynamicItem from "@/pages/common/dynamic/dynamic-items";
export default {
  name: "user-content",
  components: {DynamicItem, ImgThree, ImgTwo, ImgOne},
  props: {},
  data() {
    return {
      giftList:[
        {'num':1,'url':'/static/img/temporary/gift1.png'},
        {'num':0,'url':'/static/img/temporary/gift2.png'},
        {'num':0,'url':'/static/img/temporary/gift3.png'},
        {'num':1,'url':'/static/img/temporary/gift1.png'},
        {'num':0,'url':'/static/img/temporary/gift2.png'},
        {'num':0,'url':'/static/img/temporary/gift3.png'},
      ],

    }
  },
  watch: {},
  mounted() {

  },
  methods: {
    stopTouche(){
      // console.log('滑动事件阻止触发')
      return false
    },

  }
}
</script>

<style scoped lang="scss">
.user-content-box{
  background: #333333;
  padding: 40rpx 28rpx;
  .content-top{
    display: flex;
    justify-content: space-between;
    .top-left{
      font-size: 48rpx;
      color: rgba(255,255,255,0.3);
    }
    .top-right{
      display: flex;
      justify-content: center;
      .right-img{
        width: 36rpx;
        height: 36rpx;
        margin-right: 6rpx;
      }
      .right-text{
        font-size:26rpx ;
      }

    }
  }
  .user-signature{
    font-size: 32rpx;
  }
  .user-tag{
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 62rpx;
    .tag-item{
      margin-top: 26rpx;
      margin-right: 20rpx;
      border-radius: 200rpx;
      background: rgba(255,255,255,0.4);
      display: flex;
      justify-content: center;
      padding: 6rpx 12rpx;
      .tag-img{
        width: 32rpx;
        height: 32rpx;
        margin-right: 8rpx;
      }
      .tag-text{
        font-size: 28rpx;
        height: 32rpx;
        line-height: 32rpx;
      }
    }
  }
  .user-wire{
    height: 2rpx;
    border-radius: 200rpx;
    opacity: 0.2;
    background-color: #4D4C4C;
  }
  .gift-box{
      margin-top: 64rpx;
    .gift-title{
      height: 56rpx;
      display: flex;
      justify-content: space-between;
      .gift-title-left{
        font-size: 40rpx;
        line-height: 56rpx;
        height: 56rpx;
        color: rgba(255,255,255,0.4);
      }
      .gift-title-right{
        display: flex;
        justify-content: center;
        .gift-right-text{
          font-size: 24rpx;
          margin-right: 8rpx;
        }
        .gift-right-img{
          margin-top: 4rpx;
          height: 24rpx;
          width: 24rpx;
        }

      }
    }
    .gift-list{
      margin-top: 32rpx;
      display: flex;
      justify-content: flex-start;
      overflow-y: scroll;
      .gift-item{
        border-radius: 16rpx;
        background: #3D3D3D;
        width: 198rpx;
        height: 232rpx;
        margin-right: 14rpx;
        .gift-but{
          margin-left: 43rpx;
          width: 112rpx;
          height: 44rpx;
          line-height: 44rpx;
          font-size:28rpx ;
          border-radius: 200rpx;
          text-align: center;
        }
        .gift-num{
          text-align: center;
          font-size: 20rpx;
          height: 28rpx;
          line-height: 28rpx;
          text:first-child{
            font-size: 16rpx;
          }
          text:last-child{
            font-size: 30rpx;
          }
        }
        .gift-item-img{
          margin: 32rpx 49rpx 28rpx 49rpx;
          width: 100rpx;
          height: 100rpx;
        }
        .gift-item-img-gray{
          filter: grayscale(100%);
        }
      }
      .gift-item:last-child{
        margin-right: 0;
      }

    }

  }
  .dynamic-list{
    margin-top: 44rpx;

  }
}

</style>
