From 397c886aea56acfb613ac726c4c863e06a70c93c Mon Sep 17 00:00:00 2001 From: Lei OT Date: Wed, 23 Apr 2025 13:54:18 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=B8=89=E5=B3=A1:=20=E9=A2=84?= =?UTF-8?q?=E8=AE=A2=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/search/SearchForm.jsx | 11 ++++++++--- src/stores/HotelCruise.js | 7 ++++++- src/views/Cruise.jsx | 4 ++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/components/search/SearchForm.jsx b/src/components/search/SearchForm.jsx index b551f67..d395c47 100644 --- a/src/components/search/SearchForm.jsx +++ b/src/components/search/SearchForm.jsx @@ -186,6 +186,11 @@ export default observer((props) => { transform: (value) => value?.value || '', default: '', }, + 'cruiseBookType': { + key: 'cruiseBookType', + transform: (value) => value?.value || '', + default: '', + }, 'hotelBookType': { key: 'hotelBookType', transform: (value) => value?.value || '', @@ -544,10 +549,10 @@ function getFields(props) { item( 'cruiseBookType', 99, - + , diff --git a/src/stores/HotelCruise.js b/src/stores/HotelCruise.js index 567f981..9ee9a23 100644 --- a/src/stores/HotelCruise.js +++ b/src/stores/HotelCruise.js @@ -65,9 +65,11 @@ const paramKeyMapped = { 'DateDiff2': { key: 'CompareDateEnd' }, 'keyword': { key: 'ProductName' }, 'cruiseDirection': { key: 'Direction' }, + 'cruiseBookType': { key: 'BookingType' }, 'hotelStar': { key: 'Star' }, 'hotelRecommandRate': { key: 'RecommendedLevel' }, 'hotelBookType': { key: 'BookingType' }, + 'country': { key: 'Country' }, 'countryArea': { key: 'Area', transform: (val) => (val === 'china' ? '1' : val === 'foreign' ? '0' : '-1') }, }; @@ -81,7 +83,10 @@ class HotelCruise { this.cruise.loading = true; this.cruise.dataSource = []; const _queryParam = objectMapper(param, paramKeyMapped); - const queryParam = omit({ ...this.searchValuesToSub, ..._queryParam }, ['DepartmentList', 'orderStatus', 'keyword', 'Date1', 'Date2', 'DateDiff1', 'DateDiff2', 'cruiseDirection']); + const queryParam = omit({ ...this.searchValuesToSub, ..._queryParam }, [ + 'DepartmentList', 'orderStatus', 'keyword', 'Date1', 'Date2', 'DateDiff1', 'DateDiff2', + 'cruiseDirection', 'cruiseBookType', 'country' + ]); queryParam.Compare = isEmpty(param.DateDiff1) ? '' : '1'; const res = await fetchCruiseData(queryParam); const resCP = diff --git a/src/views/Cruise.jsx b/src/views/Cruise.jsx index 679f5d9..e6e1ec1 100644 --- a/src/views/Cruise.jsx +++ b/src/views/Cruise.jsx @@ -83,9 +83,9 @@ export default observer((props) => { // 'countryArea', shows: [ 'DepartmentList', 'orderStatus', 'dates', 'keyword', 'cruiseDirection', 'agency', - // 'cruiseBookType', 'country', 'roomsRange', 'personRange' + 'cruiseBookType', 'country', // 'roomsRange', 'personRange' ], - sort: { keyword: 101, agency: 103, cruiseDirection: 102, country: 104 }, + sort: { keyword: 101, agency: 110, cruiseDirection: 102, country: 104 }, fieldProps: { keyword: { placeholder: '产品名', col: 4 }, DepartmentList: { show_all: true, mode: 'multiple' },