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;