| | |
| | | </view> |
| | | </view> |
| | | |
| | | <scroll-view class="order-page__body" scroll-y :style="bodyStyle"> |
| | | <scroll-view class="order-page__body" scroll-y :style="bodyStyle" @scrolltolower="handleScrollToLower"> |
| | | <view class="order-page__list"> |
| | | <view v-for="(item, index) in orders" :key="item.id" class="order-card" @click="goToOrderDetail(item, index)"> |
| | | <view class="order-card__head"> |
| | |
| | | onShow() { |
| | | this.getActiveOrderCount() |
| | | }, |
| | | onReachBottom() { |
| | | if (!this.hasMore || this.loading) return |
| | | this.page++ |
| | | this.getOrderList() |
| | | }, |
| | | watch: { |
| | | activeTab() { |
| | | this.page = 1 |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | handleScrollToLower() { |
| | | if (!this.hasMore || this.loading) return |
| | | this.page++ |
| | | this.getOrderList() |
| | | }, |
| | | searchOrder() { |
| | | this.page = 1 |
| | | this.hasMore = true |
| | |
| | | }, |
| | | getOrderList() { |
| | | if (this.loading) return |
| | | console.log({ |
| | | status: this.activeTab, |
| | | keyword: this.searchKeyword |
| | | }) |
| | | this.loading = true |
| | | this.$u.api.orderPage({ |
| | | capacity: 10, |