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)