feat: 文件下载/上传

This commit is contained in:
bietiaop
2025-02-03 19:56:33 +08:00
parent af6e88c6f7
commit 6a7717e2a4
9 changed files with 565 additions and 72 deletions

View File

@@ -45,6 +45,10 @@ serverRequest.interceptors.request.use((config) => {
})
serverRequest.interceptors.response.use((response) => {
// 如果是流式传输的文件
if (response.headers['content-type'] === 'application/octet-stream') {
return response
}
if (response.data.code !== 0) {
if (response.data.message === 'Unauthorized') {
const token = localStorage.getItem(key.token)