This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 空状态提示 -->
|
||||
<view v-if="packageList.length === 0 && !loading" class="empty-state">
|
||||
<view v-if="!historyLoaded || (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/asset-package-history.png" mode="aspectFit" alt="资产套餐历史"></image>
|
||||
<view class="empty-title">暂无套餐记录</view>
|
||||
<view class="empty-desc">当前账号下暂无套餐历史信息</view>
|
||||
@@ -69,6 +72,7 @@
|
||||
|
||||
let packageList = reactive([]);
|
||||
let loading = ref(false);
|
||||
let historyLoaded = ref(false);
|
||||
let noMore = ref(false);
|
||||
let page = ref(1);
|
||||
const pageSize = 10;
|
||||
@@ -161,6 +165,7 @@
|
||||
console.error('加载套餐历史失败', e);
|
||||
}
|
||||
loading.value = false;
|
||||
historyLoaded.value = true;
|
||||
};
|
||||
|
||||
const loadMore = () => {
|
||||
@@ -176,6 +181,13 @@
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
.loading-state {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 500rpx;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
Reference in New Issue
Block a user