<template>
    <div class="peripheralService">
      <div class="peripheralBody">
         <van-tabs :active="active" @change="onChange">
           <van-tab title="全部" :name="0"></van-tab>
           <van-tab title="干洗" :name="1"></van-tab>
           <van-tab title="维修" :name="2"></van-tab>
           <van-tab title="保洁" :name="3"></van-tab>
           <van-tab title="精装水" :name="4"></van-tab>
           <van-tab title="医疗" :name="5"></van-tab>
         </van-tabs>
        <div class="peripheralBox">
          <div class="peripheralItem" v-for="item in peripheralList" @tap="toDetail(item)">
            <div class="peripheralItemRow1">
              <span class="peripheralName">{{item.name}}</span>
              <span class="periTag">{{item.type}}</span>
            </div>
            <div class="peripheralItemRow2">入驻时间：2021-03-21</div>
          </div>
        </div>
      </div>
    </div>
</template>

<script>
export default {
  name: "peripheralService",
  data(){
    return{
      active: 0,
      peripheralList:[
        {name:'福奈特洗衣店(基金PARK店)',type:'干洗'},
        {name:'印彩图文广告(金融街店)',type:'打印'},
      ]
    }
  },
  methods:{
    onChange(e) {
      console.log(e)
    },
    toDetail(item) {
      uni.navigateTo({
        url:'/pages/subPackages/peripheralService/detail'
      })
    }
  }
}
</script>

<style lang="scss">
    .peripheralService{
      .peripheralBody{
        background: white;
        margin-top: 24rpx;
        padding: 32rpx;
        box-sizing: border-box;
        height: 1424rpx;
        .peripheralBox{
          margin-top: 8rpx;
          .peripheralItem{
            width: 686rpx;
            height: 172rpx;
            box-sizing: border-box;
            border-radius: 16rpx;
            background: #F5F7FA;
            padding: 32rpx;
            margin-top: 24rpx;
            .peripheralItemRow1{
              display: flex;
              justify-content: space-between;
              .peripheralName{
                color:#222222;
                font-size: 32rpx;
                font-weight: 600;
              }
              .periTag{
                display: flex;
                align-items: center;
                justify-content: center;
                width: 92rpx;
                height: 48rpx;
                background: rgba(3, 101, 249, 0.20);
                color: rgba(3, 101, 249, 1);
                border-radius: 8rpx;
                font-size: 24rpx;
              }
            }
            .peripheralItemRow2{
              color: #888888;
              font-size: 28rpx;
              margin-top: 20rpx;
            }
          }
        }
      }
    }
</style>
