diff --git a/app/bill/[type]/page.jsx b/app/bill/[type]/page.jsx
index 18f8931..1768d00 100644
--- a/app/bill/[type]/page.jsx
+++ b/app/bill/[type]/page.jsx
@@ -5,9 +5,9 @@ import { Toast } from "antd-mobile";
import { generateSignature } from "@/utils/crypto";
import webviewBaseRequest from "@/utils/webviewBaseRequest";
-//todo:增加空数据展示图
export default function BillDetail({ params }) {
const [data, setData] = useState([]);
+ const [isFetching, setIsFetching] = useState(true);
useEffect(() => {
const getData = async () => {
let type;
@@ -58,11 +58,14 @@ export default function BillDetail({ params }) {
return;
}
setData(temData.data.list);
+ setIsFetching(false);
} catch (error) {
console.error(error);
}
};
- getData();
+ setTimeout(() => {
+ getData();
+ }, 500);
}, []);
const RenderItem = ({ item }) => {
@@ -82,6 +85,14 @@ export default function BillDetail({ params }) {
);
};
+ if (isFetching) {
+ return (
+
+ );
+ }
+
return (