From fd61a030af048f25ced5096e731dcbd2bdf6fdbb Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期四, 26 九月 2024 15:58:58 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override
---
north-glass-erp/northglass-erp/src/utils/request.js | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/utils/request.js b/north-glass-erp/northglass-erp/src/utils/request.js
index 60efe7c..9bcaeab 100644
--- a/north-glass-erp/northglass-erp/src/utils/request.js
+++ b/north-glass-erp/northglass-erp/src/utils/request.js
@@ -1,10 +1,10 @@
import axios from 'axios'
-import config from '../../config';
+import config from '../../config'
import useUserInfoStore from '@/stores/userInfo'
const userStore=useUserInfoStore()
const request = axios.create({
baseURL: `http://${config.serverUrl}`, // 娉ㄦ剰锛侊紒 杩欓噷鏄叏灞�缁熶竴鍔犱笂浜� 鍚庣鎺ュ彛鍓嶇紑 鍓嶇紑锛屽悗绔繀椤昏繘琛岃法鍩熼厤缃紒
- timeout: 5000
+ timeout: 10000
})
//
@@ -30,8 +30,10 @@
let res = response.data
//浼犻�掓姤閿欎俊鎭紝鎶婃姤閿欎俊鎭紶閫掑埌pinia涓�
userStore.setResponseCode(parseInt(res.code),res.msg)
- if(res.code!=='200'){
- return Promise.reject(res.code)
+ if(res.code!=='200' ){
+ if(response.config.responseType !== 'blob'){
+ return Promise.reject(res.code)
+ }
}
// 濡傛灉鏄繑鍥炵殑鏂囦欢
--
Gitblit v1.8.0