feat: 增加文件生成提示
parent
d99f2c58f5
commit
5549450523
|
|
@ -17,6 +17,7 @@ import {
|
||||||
import { fetchFile } from "@/apis/user";
|
import { fetchFile } from "@/apis/user";
|
||||||
import { useAbortController } from "@/hooks/useAbortController";
|
import { useAbortController } from "@/hooks/useAbortController";
|
||||||
import { useSearchParams } from "react-router-dom";
|
import { useSearchParams } from "react-router-dom";
|
||||||
|
|
||||||
import { toast } from "@/hooks/use-toast";
|
import { toast } from "@/hooks/use-toast";
|
||||||
|
|
||||||
export default function AntechamberWishList() {
|
export default function AntechamberWishList() {
|
||||||
|
|
@ -27,6 +28,10 @@ export default function AntechamberWishList() {
|
||||||
const token = searchParams.get("token") || "";
|
const token = searchParams.get("token") || "";
|
||||||
|
|
||||||
const handleNavigate = async (item: any) => {
|
const handleNavigate = async (item: any) => {
|
||||||
|
const loadingId = toast({
|
||||||
|
title:'文件生成中...',
|
||||||
|
duration: 10000,
|
||||||
|
})
|
||||||
const result = await fetchFile({
|
const result = await fetchFile({
|
||||||
params: { id: item.vId, location: item.personlocationCode },
|
params: { id: item.vId, location: item.personlocationCode },
|
||||||
options: {
|
options: {
|
||||||
|
|
@ -34,6 +39,7 @@ export default function AntechamberWishList() {
|
||||||
headers: { Authorization: `Bearer ${token}` },
|
headers: { Authorization: `Bearer ${token}` },
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
loadingId.dismiss();
|
||||||
if (result.message) {
|
if (result.message) {
|
||||||
toast({
|
toast({
|
||||||
title: result.message,
|
title: result.message,
|
||||||
|
|
@ -83,7 +89,7 @@ export default function AntechamberWishList() {
|
||||||
</DrawerClose>
|
</DrawerClose>
|
||||||
</div>
|
</div>
|
||||||
</DrawerTitle>
|
</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) => (
|
{wishList.map((item: any) => (
|
||||||
<div className="w-full bg-white" key={item.vId}>
|
<div className="w-full bg-white" key={item.vId}>
|
||||||
<div className="py-[10px] pl-[16px] pr-[13px] rounded-[8px] flex items-center">
|
<div className="py-[10px] pl-[16px] pr-[13px] rounded-[8px] flex items-center">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue