From b806c4ad52a661a1e5f0695650ec1a7e42f01633 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 20 五月 2026 23:08:48 +0800
Subject: [PATCH] 提交
---
app/pages/index/index.vue | 38 ++++++++++++++++++++++++++------------
1 files changed, 26 insertions(+), 12 deletions(-)
diff --git a/app/pages/index/index.vue b/app/pages/index/index.vue
index 0e7914b..b9d4f09 100644
--- a/app/pages/index/index.vue
+++ b/app/pages/index/index.vue
@@ -63,7 +63,7 @@
</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>
@@ -155,7 +155,7 @@
<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>
@@ -339,7 +339,17 @@
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() {
@@ -347,14 +357,6 @@
this.getCategoryListData()
this.getActiveOrderCount()
this.getUserInfoDetail()
- },
-
- onReachBottom() {
- if (this.acceptingStatus === 0) return;
- if (this.activeTab === 'hall') {
- this.hallPage++
- this.getHallOrders()
- }
},
computed: {
@@ -394,6 +396,18 @@
},
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) {
@@ -669,7 +683,7 @@
this.orderList = this.hallPage === 1 ? list : this.orderList.concat(list)
this.hallHasMore = list.length >= this.hallPageSize
}
- }).catch((err) => {
+ }).finally(() => {
this.hallLoading = false
})
},
--
Gitblit v1.9.3