From 3b9477e4179ac9fca90a1abeb2cf544155d832bc Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期五, 20 八月 2021 14:27:54 +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