From 26c1abfdbd155d19107d6c6f431229c1ab378b1a Mon Sep 17 00:00:00 2001 From: LiuJiaNan <15703339975@163.com> Date: Tue, 18 Nov 2025 16:43:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96HiddenInfo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/HiddenInfo/gwj/index.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/components/HiddenInfo/gwj/index.js b/components/HiddenInfo/gwj/index.js index 0a3e661..5873f65 100644 --- a/components/HiddenInfo/gwj/index.js +++ b/components/HiddenInfo/gwj/index.js @@ -46,13 +46,7 @@ function HiddenInfo(props) { const query = useGetUrlQuery(); const { loading: downloadFileLoading, downloadFile } = useDownloadFile(); - const getData = async () => { - request(`/hidden/hidden/${id || query[idKey]}`, "get").then((res) => { - setInfo(res.data); - setLoading(false); - onGetData?.(res.data); - }); - + const getFileData = async (info) => { const hiddenImageFiles = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["3"], eqForeignKey: hiddenId || query[hiddenIdKey] }); setHiddenImageFiles(hiddenImageFiles); const hiddenVideoFiles = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["102"], eqForeignKey: hiddenId || query[hiddenIdKey] }); @@ -78,6 +72,15 @@ function HiddenInfo(props) { const acceptImageFiles = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["5"], eqForeignKey: hiddenId || query[hiddenIdKey] }); setAcceptImageFiles(acceptImageFiles); } + } + + const getData = async () => { + request(`/hidden/hidden/${id || query[idKey]}`, "get").then((res) => { + setInfo(res.data); + getFileData(res.data); + setLoading(false); + onGetData?.(res.data); + }); }; useEffect(() => { getData();