ll
liukangdong
2024-10-18 e6acb39a2475e211f2c1decc45a95c868239c25f
h5/pages/staff/vehicle/sendACar.vue
@@ -96,7 +96,7 @@
      minDate: '',
      pagination: {
        page: 0,
        capacity: 10
        capacity: 6
      },
      total: 0,
      dataList: [],
@@ -109,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() {
@@ -125,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
      })
    },
@@ -167,7 +166,7 @@
    },
    initData() {
      getCarsList({
        type: 1
        type: 0
      }).then(res => {
        this.carsList = [res.data]
      })