From 85ceeb8648399af0715e351282a67c4706781aa9 Mon Sep 17 00:00:00 2001 From: tianlinzhong <673359306@qq.com> Date: Tue, 8 Feb 2022 19:51:24 +0800 Subject: [PATCH 1/2] fixed Web UI Notification 404 Error --- web/src/components/MyEMS/Notification/Notification.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/components/MyEMS/Notification/Notification.js b/web/src/components/MyEMS/Notification/Notification.js index 1b8ad793..3da0f9c3 100644 --- a/web/src/components/MyEMS/Notification/Notification.js +++ b/web/src/components/MyEMS/Notification/Notification.js @@ -62,9 +62,9 @@ const Notification = ({ setRedirect, setRedirectUrl, t }) => { let isResponseOK = false; if (!fetchSuccess) { - fetch(APIBaseURL + '/webmessages' + - '/from/' + startDatetime.format('YYYY-MM-DD') + - '/to/' + endDatetime.format('YYYY-MM-DD'), { + fetch(APIBaseURL + '/webmessages?' + + 'startdatetime=' + startDatetime.format('YYYY-MM-DDTHH:mm:ss') + + '&enddatetime=' + endDatetime.format('YYYY-MM-DDTHH:mm:ss'), { method: 'GET', headers: { "Content-type": "application/json", From 79c76e341998410f17b3593505bbfe0f2de888ba Mon Sep 17 00:00:00 2001 From: "13621160019@163.com" <13621160019@163.com> Date: Wed, 9 Feb 2022 10:44:33 +0800 Subject: [PATCH 2/2] fixed issue of Notification in Web UI --- web/src/components/MyEMS/Notification/Notification.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/components/MyEMS/Notification/Notification.js b/web/src/components/MyEMS/Notification/Notification.js index 3da0f9c3..ca8223a8 100644 --- a/web/src/components/MyEMS/Notification/Notification.js +++ b/web/src/components/MyEMS/Notification/Notification.js @@ -34,7 +34,7 @@ import { APIBaseURL } from '../../../config'; const Notification = ({ setRedirect, setRedirectUrl, t }) => { let current_moment = moment(); - const [startDatetime, setStartDatetime] = useState(current_moment.clone().subtract(1, 'months')); + const [startDatetime, setStartDatetime] = useState(current_moment.clone().subtract(6, 'months')); const [endDatetime, setEndDatetime] = useState(current_moment); const [fetchSuccess, setFetchSuccess] = useState(false);