feat: 增加文件生成提示

master
xjs 2025-05-20 14:15:18 +08:00
parent d99f2c58f5
commit 5549450523
1 changed files with 7 additions and 1 deletions

View File

@ -17,6 +17,7 @@ import {
import { fetchFile } from "@/apis/user";
import { useAbortController } from "@/hooks/useAbortController";
import { useSearchParams } from "react-router-dom";
import { toast } from "@/hooks/use-toast";
export default function AntechamberWishList() {
@ -27,6 +28,10 @@ export default function AntechamberWishList() {
const token = searchParams.get("token") || "";
const handleNavigate = async (item: any) => {
const loadingId = toast({
title:'文件生成中...',
duration: 10000,
})
const result = await fetchFile({
params: { id: item.vId, location: item.personlocationCode },
options: {
@ -34,6 +39,7 @@ export default function AntechamberWishList() {
headers: { Authorization: `Bearer ${token}` },
},
});
loadingId.dismiss();
if (result.message) {
toast({
title: result.message,
@ -83,7 +89,7 @@ export default function AntechamberWishList() {
</DrawerClose>
</div>
</DrawerTitle>
<div className="grid gap-[12px] px-[15px] pb-[15px] bg-[#F4F6FA] pt-[16px]">
<div className="grid gap-[12px] px-[15px] pb-[15px] bg-[#F4F6FA] pt-[16px] max-h-[50vh] overflow-y-auto">
{wishList.map((item: any) => (
<div className="w-full bg-white" key={item.vId}>
<div className="py-[10px] pl-[16px] pr-[13px] rounded-[8px] flex items-center">