|
@@ -31,7 +31,11 @@ function codePreviewApi(data: any): AxiosPromise {
|
|
|
function codeDownloadApi(data: any) {
|
|
|
const url = import.meta.env.VITE_APP_BASE_API + api.codeDownload + `?t=${new Date().getTime()}`
|
|
|
try {
|
|
|
- const response = axios.post(url, data)
|
|
|
+ const response = axios.post(url, data, {
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/zip'
|
|
|
+ }
|
|
|
+ })
|
|
|
return response // 提取数据
|
|
|
} catch (error) {
|
|
|
console.error('Error downloading code:', error)
|