jiangping
2024-10-21 c5a0ff2661fe362dddbe88c6a28d19c48c24c39b
h5/pages/staff/vehicle/sendACar.vue
@@ -47,8 +47,12 @@
          </view>
        </view>
      </view>
      <view v-if="dataList.length === 0"  style="text-align: center;">
        <image src="@/static/empty.png" style="width: 320rpx;margin: 120rpx auto 0" mode="widthFix" />
      <view v-if="dataList.length === 0" style="text-align: center">
        <image
          src="@/static/empty.png"
          style="width: 320rpx; margin: 120rpx auto 0"
          mode="widthFix"
        />
        <view class="placeholder9 fs24">暂无数据</view>
      </view>
    </view>
@@ -92,7 +96,7 @@
      minDate: '',
      pagination: {
        page: 0,
        capacity: 10
        capacity: 6
      },
      total: 0,
      dataList: [],
@@ -105,9 +109,12 @@
    this.initData()
  },
  onReachBottom() {
    if (this.total > 10) {
      console.log('onReachBottom');
    if (this.total > this.dataList.length) {
      this.getList()
    }
    }else {
         this.showToast('暂无更多数据')
      }
  },
  methods: {
    getList() {
@@ -121,11 +128,7 @@
        ...pagination,
        model: { ...param }
      }).then(res => {
        if (pagination.page === 1) {
          this.dataList = res.data.records
        } else {
          this.dataList = [...list, ...res.data.records]
        }
        this.dataList = [...this.dataList, ...res.data.records]
        this.total = res.data.total
      })
    },
@@ -163,7 +166,7 @@
    },
    initData() {
      getCarsList({
        type: 1
        type: 0
      }).then(res => {
        this.carsList = [res.data]
      })
@@ -229,7 +232,7 @@
      text {
        &:nth-child(1) {
          font-size: 32rpx;
          font-weight: 500;
          font-weight: 600;
          color: #222222;
        }
        &:nth-child(2) {