Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
million
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
million
Commits
fa260c12
Commit
fa260c12
authored
Feb 16, 2023
by
沈良进
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索页优化
parent
5582ce4c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
53 deletions
+66
-53
kkday.vue
src/components/searchdata/kkday.vue
+30
-22
Search.vue
src/pages/Search.vue
+36
-31
No files found.
src/components/searchdata/kkday.vue
View file @
fa260c12
...
...
@@ -386,7 +386,7 @@ export default {
},
created
()
{
this
.
msg
=
this
.
qMsg
;
this
.
msg
.
teamType
=
[];
//
this.msg.teamType = [];
this
.
initAreaList
();
this
.
initGoods
();
this
.
msg
.
priceRange
=
{
...
...
@@ -431,14 +431,14 @@ export default {
if
(
x
.
SubList
)
{
}
},
changeGoodTypeHandler
(
x
)
{
if
(
x
.
checked
&&
this
.
msg
.
teamType
.
indexOf
(
x
.
Id
)
==
-
1
)
{
this
.
msg
.
teamType
.
push
(
x
.
Id
);
}
else
if
(
!
x
.
checked
&&
this
.
msg
.
teamType
.
indexOf
(
x
.
Id
)
!=
-
1
)
{
let
i
=
this
.
msg
.
teamType
.
findIndex
(
item
=>
item
==
x
.
Id
);
this
.
msg
.
teamType
.
splice
(
i
,
1
);
}
},
//
changeGoodTypeHandler(x) {
//
if (x.checked && this.msg.teamType.indexOf(x.Id) == -1) {
//
this.msg.teamType.push(x.Id);
//
} else if (!x.checked && this.msg.teamType.indexOf(x.Id) != -1) {
//
let i = this.msg.teamType.findIndex(item => item == x.Id);
//
this.msg.teamType.splice(i, 1);
//
}
//
},
chosenSortHandler
(
x
)
{
this
.
sortNum
=
x
.
value
;
this
.
msg
.
orderByDate
=
this
.
sortNum
==
4
?
1
:
this
.
sortNum
==
5
?
2
:
0
;
...
...
@@ -484,20 +484,27 @@ export default {
},
changeTripDayHandler
()
{
this
.
$forceUpdate
();
this
.
msg
.
minTripDay
=
"0"
;
this
.
msg
.
maxTripDay
=
"0"
;
this
.
dayArray
.
forEach
(
x
=>
{
if
(
x
.
checked
)
{
this
.
msg
.
minPrice
=
this
.
msg
.
minPrice
>
x
.
min
?
x
.
min
:
this
.
msg
.
minPrice
;
this
.
msg
.
maxPrice
=
this
.
msg
.
maxPrice
<
x
.
max
?
x
.
max
:
this
.
msg
.
maxPrice
;
// this.msg.minTripDay = "0";
// this.msg.maxTripDay = "0";
// this.dayArray.forEach(x => {
// if (x.checked) {
// this.msg.minPrice =
// this.msg.minPrice > x.min ? x.min : this.msg.minPrice;
// this.msg.maxPrice =
// this.msg.maxPrice
<
x
.
max
?
x
.
max
:
this
.
msg
.
maxPrice
;
// }
// });
// this.msg.minTripDay =
// this.msg.minTripDay == "0" ? "" : this.msg.minTripDay;
// this.msg.maxTripDay =
// this.msg.maxTripDay == "0" ? "" : this.msg.maxTripDay;
let
arr
=
[]
this
.
dayArray
.
forEach
(
item
=>
{
if
(
item
.
checked
)
{
arr
.
push
(
item
.
id
)
}
});
this
.
msg
.
minTripDay
=
this
.
msg
.
minTripDay
==
"0"
?
""
:
this
.
msg
.
minTripDay
;
this
.
msg
.
maxTripDay
=
this
.
msg
.
maxTripDay
==
"0"
?
""
:
this
.
msg
.
maxTripDay
;
})
this
.
msg
.
dayNumList
=
arr
},
optionsFn
(
cd
)
{
return
(
...
...
@@ -554,6 +561,7 @@ export default {
});
},
goSearchHandler
()
{
this
.
msg
.
webSiteCategoryIds
=
this
.
ticked
this
.
$q
.
loading
.
show
();
this
.
DataList
=
[];
let
minTripDay
=
-
1
,
...
...
src/pages/Search.vue
View file @
fa260c12
...
...
@@ -1172,26 +1172,29 @@
},
//查询参数
qMsg
:
{
cityId
:
0
,
companyId
:
0
,
startDate
:
""
,
//开始日期
endDate
:
""
,
//结束日期
lineId
:
0
,
//线路编号
lineTeamId
:
0
,
//系列编号
//
lineId: 0, //线路编号
//
lineTeamId: 0, //系列编号
minPrice
:
""
,
//最低价格
maxPrice
:
""
,
//最高价格
minTripDay
:
""
,
//最低行程条数
maxTripDay
:
""
,
//最高行程天数
orderByDate
:
0
,
orderByPrice
:
0
,
orderBySales
:
0
,
pageIndex
:
1
,
pageSize
:
10
,
priceOrderByField
:
4
,
searchKey
:
""
,
startCityId
:
0
,
PageCount
:
0
,
TotalCount
:
0
,
// minTripDay: "", //最低行程条数
// maxTripDay: "", //最高行程天数
// orderByDate: 0,
// orderByPrice: 0,
// orderBySales: 0,
// pageIndex: 1,
// pageSize: 10,
// priceOrderByField: 4,
searchKey
:
""
,
// 搜索词
// startCityId: 0,
// PageCount: 0,
// TotalCount: 0,
dayNumList
:
[],
// 天数
webSiteCategoryIds
:
[],
// 分类Id
placeIds
:
[],
// 目的地城市Id
orderBy
:
0
,
// 排序 0默认 1价格升序 2价格降序
},
ShowType
:
0
,
//显示样式(0-豆腐格,1-列表)
//行程列表
...
...
@@ -1237,26 +1240,29 @@
//清除所有条件
clearAll
(){
let
msg
=
{
cityId
:
0
,
companyId
:
0
,
startDate
:
""
,
//开始日期
endDate
:
""
,
//结束日期
lineId
:
0
,
//线路编号
lineTeamId
:
0
,
//系列编号
//
lineId: 0, //线路编号
//
lineTeamId: 0, //系列编号
minPrice
:
""
,
//最低价格
maxPrice
:
""
,
//最高价格
minTripDay
:
""
,
//最低行程条数
maxTripDay
:
""
,
//最高行程天数
orderByDate
:
0
,
orderByPrice
:
0
,
orderBySales
:
0
,
pageIndex
:
1
,
pageSize
:
10
,
priceOrderByField
:
4
,
searchKey
:
""
,
startCityId
:
0
,
PageCount
:
0
,
TotalCount
:
0
,
// minTripDay: "", //最低行程条数
// maxTripDay: "", //最高行程天数
// orderByDate: 0,
// orderByPrice: 0,
// orderBySales: 0,
// pageIndex: 1,
// pageSize: 10,
// priceOrderByField: 4,
searchKey
:
""
,
// 搜索词
// startCityId: 0,
// PageCount: 0,
// TotalCount: 0,
dayNumList
:
[],
// 天数
webSiteCategoryIds
:
[],
// 分类Id
placeIds
:
[],
// 目的地城市Id
orderBy
:
0
,
// 排序 0默认 1价格升序 2价格降序
}
this
.
qMsg
=
msg
;
this
.
goSearchHandler
();
...
...
@@ -1361,7 +1367,6 @@
pageIndex
:
this
.
qMsg
.
pageIndex
,
pageSize
:
this
.
qMsg
.
pageSize
,
searchKey
:
this
.
qMsg
.
searchKey
,
cityId
:
this
.
qMsg
.
cityId
,
lineId
:
this
.
qMsg
.
lineId
,
lineTeamId
:
this
.
qMsg
.
lineTeamId
,
minTripDay
:
minTripDay
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment