| | |
| | | </view> |
| | | </view> |
| | | |
| | | <scroll-view class="hall-page__body" scroll-y :style="bodyStyle"> |
| | | <scroll-view class="hall-page__body" scroll-y :style="bodyStyle" @scrolltolower="handleScrollToLower"> |
| | | <view class="hall-page__verified" v-if="!hasApprovedOfficial"> |
| | | <image src="/static/image/default_unverified@2x.png" mode="widthFix"></image> |
| | | <button @click="toDriverCertification">去认证</button> |
| | |
| | | <text class="order-card__action-text">联系</text> |
| | | </view> |
| | | </view> |
| | | <button class="order-card__button order-card__button--code" hover-class="order-card__button--hover" @click.stop="handleShowPickupCode(item)">存件码</button> |
| | | <button class="order-card__button order-card__button--code" hover-class="order-card__button--hover" @click.stop="handleShowPickupCode(item)" v-if="item.takeShopId">存件码</button> |
| | | </template> |
| | | <button v-else class="order-card__button" hover-class="order-card__button--hover" @click.stop="handleGrabOrder(item)">立即抢单</button> |
| | | </view> |
| | |
| | | this.scrollHeight = Math.max(windowHeight - this.headerHeight, 0) |
| | | if (this.userInfo.auditStatus === 99) return; |
| | | this.acceptingStatus = this.userInfo.acceptingStatus || 0 |
| | | this.loadOrdersByTab(this.activeTab) |
| | | this.$u.api.centerInfo().then(res => { |
| | | if (res.code === 200) { |
| | | this.acceptingStatus = res.data.acceptingStatus |
| | | if (res.data.acceptingStatus === 1) { |
| | | this.loadOrdersByTab(this.activeTab) |
| | | } |
| | | } |
| | | }) |
| | | uni.$on('jiedanSuccess', () => { |
| | | this.loadOrdersByTab(this.activeTab) |
| | | }) |
| | | }, |
| | | |
| | | onShow() { |
| | |
| | | this.getCategoryListData() |
| | | this.getActiveOrderCount() |
| | | this.getUserInfoDetail() |
| | | }, |
| | | |
| | | onReachBottom() { |
| | | if (this.acceptingStatus === 0) return; |
| | | if (this.activeTab === 'hall') { |
| | | this.hallPage++ |
| | | this.getHallOrders() |
| | | } |
| | | }, |
| | | |
| | | computed: { |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | handleScrollToLower() { |
| | | if (this.acceptingStatus === 0) return; |
| | | this.hallPage++ |
| | | if (this.activeTab === 'hall') { |
| | | console.log('hall') |
| | | this.getHallOrders() |
| | | } else if (this.activeTab === 'pickup') { |
| | | this.getPickupOrders() |
| | | } else if (this.activeTab === 'delivering') { |
| | | this.getDeliveringOrders() |
| | | } |
| | | }, |
| | | getUserInfoDetail() { |
| | | this.$u.api.verifyDetail().then(res => { |
| | | if (res.code === 200) { |
| | |
| | | this.orderList = this.hallPage === 1 ? list : this.orderList.concat(list) |
| | | this.hallHasMore = list.length >= this.hallPageSize |
| | | } |
| | | }).catch((err) => { |
| | | }).finally(() => { |
| | | this.hallLoading = false |
| | | }) |
| | | }, |