From b806c4ad52a661a1e5f0695650ec1a7e42f01633 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 20 五月 2026 23:08:48 +0800
Subject: [PATCH] 提交
---
small-program/shop/pages/Invoice-application/Invoice-application.vue | 43 ++++++++++++++++++++++++++-----------------
1 files changed, 26 insertions(+), 17 deletions(-)
diff --git a/small-program/shop/pages/Invoice-application/Invoice-application.vue b/small-program/shop/pages/Invoice-application/Invoice-application.vue
index dab88de..9fde05f 100644
--- a/small-program/shop/pages/Invoice-application/Invoice-application.vue
+++ b/small-program/shop/pages/Invoice-application/Invoice-application.vue
@@ -13,13 +13,13 @@
</view>
</view>
- <scroll-view scroll-y class="page-scroll">
+ <scroll-view scroll-y class="page-scroll" @scrolltolower="handleScrollTolower">
<view v-if="currentTab === 'apply'" class="card-list">
<view v-for="item in applyList" :key="item.id" class="invoice-card apply-card">
<view class="order-no">
<text>璁㈠崟缂栧彿锛歿{ item.code }}</text>
- <view class="mode-tag city-tag" v-if="item.type === 1">寮傚湴瀛樺彇</view>
- <view class="mode-tag local-tag" v-else>灏卞湴瀛樺彇</view>
+ <view class="mode-tag city-tag" v-if="item.type === 1">鍚屽煄瀵勯��</view>
+ <view class="mode-tag local-tag" v-else>灏卞湴瀵勫瓨</view>
</view>
<view class="address-group">
<view class="address-row">
@@ -58,7 +58,7 @@
<text class="price-label">瀹炰粯娆撅細</text>
<text class="price-value">楼{{((item.estimatedAmount || 0)/100).toFixed(2) }}</text>
</view>
- <view class="action-btn primary-btn" @tap="goInvoiceRequest(item)">鐢宠寮�绁�</view>
+ <!-- <view class="action-btn primary-btn" @tap="goInvoiceRequest(item)">鐢宠寮�绁�</view> -->
</view>
</view>
</view>
@@ -185,14 +185,14 @@
onLoad() {
this.getApplyList()
},
- onReachBottom() {
- if (this.currentTab === 'apply') {
- this.getApplyList()
- } else if (this.currentTab === 'history') {
- this.getHistoryList()
- }
- },
methods: {
+ handleScrollTolower() {
+ if (this.currentTab === 'apply') {
+ this.getApplyList()
+ } else if (this.currentTab === 'history') {
+ this.getHistoryList()
+ }
+ },
async getApplyList() {
if (!this.isRequest) return
const res = await this.$u.api.myOrderPage({
@@ -212,7 +212,8 @@
})
this.applyList = [...this.applyList, ...list]
this.page++
- if (res.data.total <= this.applyList.length) {
+ console.log(res.data.total, this.applyList.length)
+ if (this.applyList.length >= res.data.total) {
this.isRequest = false
}
}
@@ -235,16 +236,23 @@
})
this.historyList = [...this.historyList, ...list]
this.historyPage++
- if (res.data.total <= this.historyList.length) {
+ if (this.historyList.length >= res.data.total) {
this.historyIsRequest = false
}
}
},
handleSearch() {
- this.historyPage = 1
- this.historyList = []
- this.historyIsRequest = true
- this.getHistoryList()
+ if (this.currentTab === 'apply') {
+ this.page = 1
+ this.applyList = []
+ this.isRequest = true
+ this.getApplyList()
+ } else if (this.currentTab === 'history') {
+ this.historyPage = 1
+ this.historyList = []
+ this.historyIsRequest = true
+ this.getHistoryList()
+ }
},
getTabIcon(tab) {
return this.currentTab === tab.value ? tab.activeIcon : tab.icon;
@@ -301,6 +309,7 @@
.mode-tag {
width: 112rpx;
height: 38rpx;
+ line-height: 38rpx;
border-radius: 8rpx;
display: flex;
align-items: baseline;
--
Gitblit v1.9.3