From 1e1e5f612f252d66b0d0386cf52873bb1f3f7d7b Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期五, 01 九月 2023 16:10:37 +0800 Subject: [PATCH] 系统维护+系统监控器+调试工具的app 增加 --- src/scripts/httpRequest.ts | 22 ++++------------------ 1 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/scripts/httpRequest.ts b/src/scripts/httpRequest.ts index 66c2d6b..a4f3cb4 100644 --- a/src/scripts/httpRequest.ts +++ b/src/scripts/httpRequest.ts @@ -55,7 +55,6 @@ res => { /* //瀵瑰搷搴旀暟鎹仛浜涗簨 */ if (res.data && res.statusText !== 'OK' && res.status !== 200) { - console.log('鍚浣犲鐩稿簲鏁版嵁鍋氫簡浜涗簨', res) Notification({ title: '', message: res.data.message, @@ -77,6 +76,7 @@ // } else { // window.sessionStorage.setItem('policeCameravideoIsLoginTimeout', JSON.stringify(true)) // } + return res.data ? res.data : {} /* //return res.data ? res.data : {}; */ @@ -95,6 +95,9 @@ case 401: errJson.status = error.response.status errJson.message = '鏈巿鏉冿紝璇烽噸鏂扮櫥褰�(401)' + window.parent.postMessage({ + msg: "logout" + }, '*') // console.log("鏍囧織浣嶏細",AuthData.isLoginout) // if (!AuthData.isLoginout) { // Notification({ @@ -151,23 +154,6 @@ errJson.message = `杩炴帴鍑洪敊(${error.response.status})!` } - if (errJson.status >= 400 && errJson.status < 500) { - // 璺宠浆閿欒椤甸潰 - // router.push({ - // path: "/error", - // query: errJson - // }); - } else { - // 鏈嶅姟鍣ㄩ敊璇��鍑虹郴缁燂紝寮圭獥鎻愮ず - // Message({ - // showClose: true, - // message: errJson.message, - // type: "error" - // }); - // router.push({ - // path: "/login" - // }); - } } else { errJson.message = '杩炴帴鏈嶅姟鍣ㄥけ璐�!' Notification({ -- Gitblit v1.8.0