<template>
  <scroll-view
    class="scroll-Y"
    id="slideview"
    scroll-y
    lower-threshold="50"
    scroll-top="0"
    scroll-left="0"
    scroll-with-animation="false"
    enable-back-to-top="false"
    @scrolltolower="bindscrolltolower"
  >
    <div>
      <!--    <wx-points-commit ref="wxPointsCommit"></wx-points-commit>-->

      <!-- <authorize ref="authorize"></authorize> -->
      <div
        class="choice_card"
        v-for="(item, index) in list"
        :key="index"
        @click="toDetail(item.id)"
      >
        <div
          class="choice_card_index choice_card_index1"
          style="font-size: 30px; margin: 0 12px"
        >
          <div style="margin-left: 6px">
            {{ item.orderNo + '-' + item.vehicleNo }}
          </div>
          <div style="color: red; margin-right: 6px">
            {{ item.actualPayFee | currency }}
          </div>
        </div>

        <div class="choice_card_index choice_card_index2">
          {{ item.parkName }}
        </div>
        <div class="choice_card_index choice_card_index3">
          <div>入场时间 : {{ item.enterTime }}</div>
          <div style="margin-right: 20px">
            <van-icon name="arrow" />
          </div>
        </div>
        <div
          class="choice_card_index choice_card_index3"
          style="padding-bottom: 20px"
        >
          <div>停车时长 : {{ item.serviceMin | parkingTime }}</div>
          <div style="margin-right: 20px">
              {{ item.refundStatus !== 'NO_REFUND' ? '已退款' : {'PAID': '支付成功', 'FAILED': '支付失败'}[item.paymentStatus || 'FAIED'] }}
            <!-- {{ ['支付成功', '支付失败', '已退款'][] item.refundStatus | orderStatus }} -->
          </div>
        </div>
      </div>
      <div class="notice-info">
<!--        <div>{{ list.length === 4 ? '查看更多' : '没有更多数据了' }}</div>-->
        <!-- 为确保用户可以执行下滑动作，设置单次响应的数据量为4 -->
        <div
        >{{ numberOfElements ? '查看更多' : '没有更多数据了' }}
        </div>
<!--        <uni-icons-->
<!--          v-if="list.length === 4"-->
<!--          type="arrowdown"-->
<!--          size="14"-->
<!--          color="##b5b3b3"-->
<!--        ></uni-icons>-->
        <van-icon v-if="numberOfElements" name="arrow-down" />
      </div>
    </div>
  </scroll-view>
</template>

<script>
import parkingFeeListJs from '../../mixins/parkingFeeList'
export default {
  mixins:[parkingFeeListJs]
}
</script>

<style lang="less" scoped>
.scroll-Y {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #f2f2f2;
}

.wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.parkingFeeList-item {
  background: #fff;
  display: flex;
  flex-direction: column;
  margin-top: 8px;

  .item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 36px;
    box-sizing: border-box;

    span {
      font-size: 16px;
    }
  }

  .item-bottom {
    border-top: 1px solid #f2f2f2;
    display: flex;
    flex-direction: column;
    padding: 0px 36px;
    box-sizing: border-box;
    padding-top: 8px;

    div {
      display: flex;
      flex-direction: column;
    }

    span {
      color: #999;
      font-size: 14px;
      margin-bottom: 10px;
    }
  }
}

.choice_card {
  width: 92%;
  margin-left: 4%;
  margin-top: 30px;
  margin-bottom: 30px;
  border-radius: 20px;
  background-color: #fff;
  position: relative;

  .choice_card_index {
    margin-left: 18px;
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 28px;
  }

  .choice_card_index1 {
    border-bottom: 1px solid #f2f2f2;
    display: flex;
    align-items: center;
    padding-top: 22px;
    padding-bottom: 22px;
    justify-content: space-between;
  }

  .choice_card_index2 {
    padding-top: 20px;
    color: #808080;
  }

  .choice_card_index3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #808080;
  }

  .choice_card_index4 {
    color: #808080;
    padding-bottom: 20px;
  }
}

.notice-info {
  text-align: center;
  color: #b5b3b3;
  padding-bottom: 30px;

  div {
    margin-bottom: -7px;
  }
}
</style>
