From 9500e8c448c9335395e8e11a02e996115388851b Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Thu, 5 Sep 2024 08:56:44 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=88=A0=E9=99=A4=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/stores/Hotel.js | 4 ---- web/src/views/hotel/Detail.jsx | 5 +---- web/src/views/hotel/List.jsx | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/web/src/stores/Hotel.js b/web/src/stores/Hotel.js index d902f48..a54fc3c 100644 --- a/web/src/stores/Hotel.js +++ b/web/src/stores/Hotel.js @@ -40,8 +40,6 @@ const useHotelStore = create(devtools((set, get) => ({ formValues.dataRange[1].format('YYYY-MM-DD') ) - console.info(resultArray) - set(() => ({ hotelList: resultArray })) @@ -56,8 +54,6 @@ const useHotelStore = create(devtools((set, get) => ({ roomCount ) - console.info(resultArray) - set(() => ({ roomList: resultArray })) diff --git a/web/src/views/hotel/Detail.jsx b/web/src/views/hotel/Detail.jsx index c56ba6a..2408ae9 100644 --- a/web/src/views/hotel/Detail.jsx +++ b/web/src/views/hotel/Detail.jsx @@ -28,6 +28,7 @@ function Detail() { // http://localhost:5175/hotel/416980/2024-09-10/2024-09-11 if (isEmpty(hotelId) || isEmpty(checkin) || isEmpty(checkout)) { console.info('criteria is null') + setLoading(false) } else { searchForm.setFieldsValue({ dataRange: [dayjs(checkin), dayjs(checkout)], @@ -61,10 +62,7 @@ function Detail() { price: plan.Price } setHotelQuotation(forHtJson) - showModal() - - console.info('stringify: ' + JSON.stringify(forHtJson)) document.getElementById('forHtJson').value = JSON.stringify(forHtJson) } @@ -97,7 +95,6 @@ function Detail() { form={searchForm} layout='inline' onFinish={handelFormFinish} - onFinishFailed={() => console.info('onFinishFailed')} autoComplete='off' > { const checkoutDateString = searchParams.get('checkout') useEffect(() => { - console.info(searchForm) + // 测试酒店:Hotel Skypark Kingstown Dongdaemun // http://localhost:5175/hotel/list?hotel=s&checkin=2024-8-20&checkout=2024-8-21 if (isEmpty(hotelName) || isEmpty(checkinDateString) || isEmpty(checkoutDateString)) { console.info('criteria is null')