This commit is contained in:
@@ -13,15 +13,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<swiper
|
|
||||||
class="order-swiper"
|
|
||||||
:current="filterIndex"
|
|
||||||
:circular="false"
|
|
||||||
:acceleration="true"
|
|
||||||
@change="onFilterSwiperChange"
|
|
||||||
>
|
|
||||||
<swiper-item v-for="(item, index) in filterOptions" :key="item.value ?? 'all'" class="order-swiper-item">
|
|
||||||
<scroll-view v-if="filterIndex === index" scroll-y class="scroll-container" @scrolltolower="loadMore">
|
|
||||||
<view v-if="!ordersLoaded || (loading && orderList.length === 0)" class="loading-state">
|
<view v-if="!ordersLoaded || (loading && orderList.length === 0)" class="loading-state">
|
||||||
<up-loading-icon text="加载中" size="30"></up-loading-icon>
|
<up-loading-icon text="加载中" size="30"></up-loading-icon>
|
||||||
</view>
|
</view>
|
||||||
@@ -74,9 +65,6 @@
|
|||||||
<text v-else>上拉加载更多</text>
|
<text v-else>上拉加载更多</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
|
||||||
</swiper-item>
|
|
||||||
</swiper>
|
|
||||||
|
|
||||||
<RenewalPaymentPopup ref="renewalPopupRef" :identifier="userStore.state.identifier"
|
<RenewalPaymentPopup ref="renewalPopupRef" :identifier="userStore.state.identifier"
|
||||||
paymentRefreshTarget="order-list" @completed="resetOrderListAndLoad" />
|
paymentRefreshTarget="order-list" @completed="resetOrderListAndLoad" />
|
||||||
@@ -85,7 +73,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, computed, onMounted } from 'vue';
|
import { ref, reactive, computed, onMounted } from 'vue';
|
||||||
import { onShow } from '@dcloudio/uni-app';
|
import { onReachBottom, onShow } from '@dcloudio/uni-app';
|
||||||
import { orderApi } from '@/api/index.js';
|
import { orderApi } from '@/api/index.js';
|
||||||
import RenewalPaymentPopup from '@/components/RenewalPaymentPopup.vue';
|
import RenewalPaymentPopup from '@/components/RenewalPaymentPopup.vue';
|
||||||
import { useUserStore } from '@/store/index.js';
|
import { useUserStore } from '@/store/index.js';
|
||||||
@@ -153,13 +141,6 @@
|
|||||||
resetOrderListAndLoad();
|
resetOrderListAndLoad();
|
||||||
};
|
};
|
||||||
|
|
||||||
const onFilterSwiperChange = (event) => {
|
|
||||||
const nextIndex = Number(event?.detail?.current);
|
|
||||||
if (Number.isInteger(nextIndex) && nextIndex >= 0 && nextIndex < filterOptions.length) {
|
|
||||||
onFilterChange(nextIndex);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const loadOrderList = async (append = false) => {
|
const loadOrderList = async (append = false) => {
|
||||||
if (loading.value || (append && noMore.value)) return;
|
if (loading.value || (append && noMore.value)) return;
|
||||||
|
|
||||||
@@ -259,23 +240,24 @@
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
loadOrderList();
|
loadOrderList();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onReachBottom(() => {
|
||||||
|
loadMore();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.container {
|
.container {
|
||||||
position: fixed;
|
|
||||||
top: var(--window-top);
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
gap: 0;
|
||||||
background: var(--bg-secondary);
|
background: var(--bg-secondary);
|
||||||
max-width: 750rpx;
|
max-width: 750rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-top: 0;
|
min-height: 100vh;
|
||||||
|
padding: 0 0 48rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.filter-tabs {
|
.filter-tabs {
|
||||||
@@ -590,31 +572,6 @@
|
|||||||
z-index: 0;
|
z-index: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-swiper,
|
|
||||||
.order-swiper-item {
|
|
||||||
width: 100%;
|
|
||||||
min-height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.order-swiper {
|
|
||||||
/* 固定页面提供确定高度,轮播填充 Tab 下方的全部可用空间。 */
|
|
||||||
flex: 1 1 0;
|
|
||||||
height: auto;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.order-swiper-item {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scroll-container {
|
|
||||||
flex: none;
|
|
||||||
height: 100%;
|
|
||||||
min-height: 0;
|
|
||||||
width: 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.order-list {
|
.order-list {
|
||||||
padding: 20rpx 24rpx 48rpx;
|
padding: 20rpx 24rpx 48rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|||||||
@@ -14,8 +14,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="package-scroll-area">
|
<view class="package-content">
|
||||||
<scroll-view scroll-y class="package-scroll">
|
|
||||||
<view v-if="!packagesLoaded || (loading && packageList.length === 0)" class="loading-state">
|
<view v-if="!packagesLoaded || (loading && packageList.length === 0)" class="loading-state">
|
||||||
<up-loading-icon text="加载中" size="30"></up-loading-icon>
|
<up-loading-icon text="加载中" size="30"></up-loading-icon>
|
||||||
</view>
|
</view>
|
||||||
@@ -47,7 +46,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -709,30 +707,17 @@
|
|||||||
|
|
||||||
/* Screenshot-aligned package list skin */
|
/* Screenshot-aligned package list skin */
|
||||||
.container {
|
.container {
|
||||||
position: fixed;
|
|
||||||
/* Keep the page below the platform navigation bar on every screen size. */
|
|
||||||
top: var(--window-top);
|
|
||||||
right: 0;
|
|
||||||
bottom: var(--window-bottom);
|
|
||||||
left: 0;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 18rpx;
|
|
||||||
padding: 20rpx 24rpx 48rpx;
|
padding: 20rpx 24rpx 48rpx;
|
||||||
height: auto;
|
min-height: 100vh;
|
||||||
min-height: 0;
|
|
||||||
background: #f8f9fb;
|
background: #f8f9fb;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-section {
|
.tab-section {
|
||||||
flex: 1;
|
|
||||||
height: 100%;
|
|
||||||
min-height: 0;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-header {
|
.tab-header {
|
||||||
@@ -836,18 +821,8 @@
|
|||||||
z-index: 0;
|
z-index: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.package-scroll-area {
|
.package-content {
|
||||||
flex: 1 1 0;
|
|
||||||
min-height: 0;
|
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.package-scroll {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
min-height: 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.package-list {
|
.package-list {
|
||||||
|
|||||||
Reference in New Issue
Block a user