fix: ui
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 2m10s

This commit is contained in:
luo
2026-08-05 15:23:58 +08:00
parent 1891ea1e0d
commit 9f07f9d0ef
9 changed files with 122 additions and 70 deletions

View File

@@ -23,7 +23,10 @@
>
<swiper-item v-for="tab in packageTypeTabs" :key="tab.value" class="package-swiper-item">
<scroll-view v-if="activePackageType === tab.value" scroll-y class="package-scroll">
<view v-if="packageList.length === 0 && !loading" class="empty-state">
<view v-if="!packagesLoaded || (loading && packageList.length === 0)" class="loading-state">
<up-loading-icon text="加载中" size="30"></up-loading-icon>
</view>
<view v-else-if="packageList.length === 0" class="empty-state">
<image class="empty-icon" src="/static/shop.png" mode="aspectFit" alt="套餐订购"></image>
<view class="empty-title">暂无{{ activePackageType === 'formal' ? '正式套餐' : '加油包' }}</view>
<view class="empty-desc">当前资产暂无适用的套餐</view>
@@ -128,6 +131,7 @@
const currentPackage = ref(null);
const packageList = reactive([]);
const loading = ref(false);
const packagesLoaded = ref(false);
const paymentMethod = ref('alipay');
const walletBalance = ref(0);
const paySubmitting = ref(false);
@@ -191,6 +195,7 @@
const loadPackages = async (packageType = activePackageType.value) => {
const requestId = ++packageRequestId;
packagesLoaded.value = false;
loading.value = true;
packageList.splice(0, packageList.length);
try {
@@ -228,7 +233,10 @@
if (requestId !== packageRequestId) return;
console.error('加载套餐列表失败', error);
} finally {
if (requestId === packageRequestId) loading.value = false;
if (requestId === packageRequestId) {
loading.value = false;
packagesLoaded.value = true;
}
}
};
@@ -704,6 +712,13 @@
}
}
}
.loading-state {
display: flex;
align-items: center;
justify-content: center;
min-height: 400rpx;
}
}
/* Screenshot-aligned package list skin */