From 4a27fc56573ce6b07ef3e8886ba165d600ca932e Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Wed, 20 Nov 2024 10:51:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E6=94=B6=E5=8F=96=E9=82=AE=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/AuthApp.jsx | 8 ++++++++ src/views/accounts/GeneratePayment.jsx | 20 ++++++++++++-------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/views/AuthApp.jsx b/src/views/AuthApp.jsx index 168520b..2ab35e2 100644 --- a/src/views/AuthApp.jsx +++ b/src/views/AuthApp.jsx @@ -23,6 +23,7 @@ import AppLogo from '@/assets/highlights_travel_300_300.png' import '@/assets/App.css' import 'react-chat-elements/dist/main.css' import EmailFetch from './Conversations/Online/Components/EmailFetch' +import { getEmailFetchAction } from '@/actions/EmailActions' function AuthApp() { const navigate = useNavigate() @@ -52,12 +53,19 @@ function AuthApp() { loadPageSpy(loginUser.username) connectWebsocket(loginUser.userId) fetchInitialData(loginUser) + startEmailInterval(loginUser.userId) } return () => { disconnectWebsocket() } }, []) + const startEmailInterval = (userId) => { + setInterval(() => { + getEmailFetchAction({opi_sn: userId}) + }, 1000*60) + } + const uploadLog = () => { if (window.$pageSpy) { window.$pageSpy.triggerPlugins('onOfflineLog', 'upload') diff --git a/src/views/accounts/GeneratePayment.jsx b/src/views/accounts/GeneratePayment.jsx index 19fb6ba..cf2187e 100644 --- a/src/views/accounts/GeneratePayment.jsx +++ b/src/views/accounts/GeneratePayment.jsx @@ -46,14 +46,18 @@ function GeneratePayment() { }) }) // .finally(() => setLoading(false)) - .catch((reason) => { - // notification.error({ - // message: "查询出错", - // description: reason.message, - // placement: "top", - // duration: 60, - // }); - }) + // .catch(() => { + // }) + } else { + generateForm.setFieldsValue({ + notifyEmail: getPrimaryEmail(), + description: 'Tracking Code: \r\nTravel Advisor: \r\nContent: \r\n', + langauge: 'US', + orderType: '227001', + currency: 'USD', + amount: 1, + userId: loginUser.userId, + }) } }, [currentOrder])