From d36878f17d11eea50773b41d26001ea38dc61f6a Mon Sep 17 00:00:00 2001 From: MaxtuneLee Date: Sat, 6 Apr 2024 00:54:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=8B=E8=BD=BD=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=B6=88=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/registerDetail/index.tsx | 12 ++++++------ src/pages/reviewApprover/index.tsx | 2 +- src/pages/reviewJudge/index.tsx | 2 +- src/pages/workDetail/index.tsx | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/pages/registerDetail/index.tsx b/src/pages/registerDetail/index.tsx index 3b48be2..730c77e 100644 --- a/src/pages/registerDetail/index.tsx +++ b/src/pages/registerDetail/index.tsx @@ -2,7 +2,7 @@ import { CloudDownloadOutlined } from '@ant-design/icons' import { Button, Empty, message, notification, Skeleton, Space } from 'antd' import React, { Fragment, useLayoutEffect, useState } from 'react' import { useNavigate, useParams } from 'react-router-dom' -import { downloadCertificate} from '../../api/public' +import { downloadCertificate } from '../../api/public' import { getCompetitionInfo, getCompetitionSignInfo, getTeamInfo, getWorkInfo } from '../../api/user' import TopBar from '../../components/TopBar' import './index.scss' @@ -197,16 +197,16 @@ function RegisterDetail() { * @param url 文件url */ const downloadFile = async (url: string) => { - const loadingKey='downloading' + const loadingKey = 'downloading' message.loading({ content: '正在下载文件', - duration: 30, + duration: 300000, key: 'downloading', }) const res = await downloadCertificate(url) console.log(res.data); - - const response=res.data + + const response = res.data if (response.success) { const file = await fetch(response.data.url) const fileBlob = await file.blob() @@ -220,7 +220,7 @@ function RegisterDetail() { document.body.removeChild(a) URL.revokeObjectURL(urlvalue) message.success({ - content: '😁下载完成!' + content: '😁下载完成!' }) } else { message.error({ diff --git a/src/pages/reviewApprover/index.tsx b/src/pages/reviewApprover/index.tsx index 489bf74..c4a5dc0 100644 --- a/src/pages/reviewApprover/index.tsx +++ b/src/pages/reviewApprover/index.tsx @@ -53,7 +53,7 @@ const ReviewApprover: React.FC = (props) => { const loadingKey = 'downloading' message.loading({ content: '正在下载文件', - duration: 30, + duration: 300000, key: 'downloading', }) const res = await downloadCertificate(url) diff --git a/src/pages/reviewJudge/index.tsx b/src/pages/reviewJudge/index.tsx index 951c347..4c93c50 100644 --- a/src/pages/reviewJudge/index.tsx +++ b/src/pages/reviewJudge/index.tsx @@ -46,7 +46,7 @@ const ReviewJudge: React.FC = (props) => { const loadingKey = 'downloading' message.loading({ content: '正在下载文件', - duration: 30, + duration: 300000, key: 'downloading', }) const res = await downloadCertificate(url) diff --git a/src/pages/workDetail/index.tsx b/src/pages/workDetail/index.tsx index 292d516..c48f665 100644 --- a/src/pages/workDetail/index.tsx +++ b/src/pages/workDetail/index.tsx @@ -90,7 +90,7 @@ function WorkDetail() { const loadingKey = 'downloading' message.loading({ content: '正在下载文件', - duration: 30, + duration: 300000, key: 'downloading', }) const res = await downloadCertificate(url)