From cec85a91dcbb08fe4ee003dcf71cb341a9fffd7d Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 7 Jan 2025 11:20:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E9=AA=8C=E6=8A=A5=E5=91=8A=E5=AF=BC?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 +- src/api/system.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 114f40e..4a956c9 100644 --- a/.env +++ b/.env @@ -2,7 +2,7 @@ VITE_APP_TITLE=金融产品设计及数字化营销沙盘 VITE_PORT=9520 # VITE_PROXY=http://192.168.31.125:8080 VITE_PUBLIC_PATH=./ -# VITE_BASE_API=http://192.168.31.51:9000 +# VITE_BASE_API=http://192.168.31.217:9000 VITE_BASE_API=https://www.occupationlab.com VITE_I18N_LOCALE=zh-cn VITE_I18N_FALLBACK_LOCALE=zh-cn diff --git a/src/api/system.ts b/src/api/system.ts index 85084b4..4446a89 100644 --- a/src/api/system.ts +++ b/src/api/system.ts @@ -10,7 +10,11 @@ export const getDetailById = async (id: number | string): Promise => (await export const getCompetition = async (id: number | string): Promise => (await axios.post(`/competition/competition/management/getCompetition?competitionId=${id}`)).data; export const reportDetail = async (id: number | string): Promise => (await axios.get(`/occupationlab/occupationlab/achievement/reportDetail?reportId=${id}`)).data; export const exportBankExperimentReport = async (data: Record): Promise => - (await axios.post('/occupationlab/occupationlab/achievement/exportBankExperimentReport', data)).data; + ( + await axios.post('/occupationlab/occupationlab/achievement/exportBankExperimentReport', data, { + responseType: 'blob', + }) + ).data; export const updateReport = async (data: Record): Promise => (await axios.post('/occupationlab/occupationlab/achievement/updateReport', data)).data; export const editExperimentalData = async (data: Record): Promise => (await axios.post('/occupationlab/occupationlab/experimentalReport/editExperimentalData', data)).data;