From 74cd6300b672ccd11f529a20a335c0f7393f87ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 31 Dec 2019 11:58:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 618793657..d65601ac1 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -10,7 +10,7 @@ const $ = window.$; const opens ="79e33abd4b6588941ab7622aed1e67e8"; let timestamp; let checkSubmitFlg = false; - +let message501=false; broadcastChannelOnmessage('refreshPage', () => { window.location.reload() }) @@ -225,13 +225,19 @@ export function initAxiosInterceptors(props) { } if (response.data.status === 501) { - notification.open({ - message:"提示", - description:response.data.message || '访问异常,请求不合理', - style: { - zIndex: 99999999 - } - }) + if(message501===false){ + message501=true + notification.open({ + message:"提示", + description:response.data.message || '访问异常,请求不合理', + style: { + zIndex: 99999999 + } + }) + } + window.setTimeout(function () { + message501=false + }, 2000); }