Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
groupPurchase-miniapp
Project
Project
Details
Activity
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
彭佳妮(贵阳日报)
groupPurchase-miniapp
Commits
6176d44f
Commit
6176d44f
authored
Aug 12, 2024
by
张娇(东信)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
乡村旅居筛选传参
parent
bf88562b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
ScenicSpots.vue
src/Components/assistingAgriculture/index/ScenicSpots.vue
+3
-4
RuralTravel.vue
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
+10
-1
No files found.
src/Components/assistingAgriculture/index/ScenicSpots.vue
View file @
6176d44f
<
template
>
<
template
>
<view
class=
"sort"
:style=
"
{ width: width }">
<view
class=
"sort"
:style=
"
{ width: width }">
<view
class=
"date"
>
景点
</view>
<ul
class=
"ul"
>
<ul
class=
"ul"
>
<li
<li
v-for=
"(item, index) in placeList"
v-for=
"(item, index) in placeList"
:key=
"index"
:key=
"index"
:class=
"
{ active: selectedItem === index }"
:class=
"
{ active: selectedItem === index }"
@tap="selectItem(index)"
@tap="selectItem(index
, item
)"
>
>
{{
item
.
attractionName
}}
{{
item
.
attractionName
}}
</li>
</li>
...
@@ -18,7 +17,7 @@
...
@@ -18,7 +17,7 @@
import
{
defineProps
,
onMounted
}
from
'vue'
;
import
{
defineProps
,
onMounted
}
from
'vue'
;
import
{
getTour
}
from
'@/api/assistingAgriculture/village'
;
import
{
getTour
}
from
'@/api/assistingAgriculture/village'
;
const
placeList
=
ref
([]);
const
placeList
=
ref
([]);
const
emit
=
defineEmits
([
'
sort
Params'
]);
const
emit
=
defineEmits
([
'
place
Params'
]);
const
selectedItem
=
ref
(
null
);
const
selectedItem
=
ref
(
null
);
const
props
=
defineProps
({
const
props
=
defineProps
({
width
:
{
width
:
{
...
@@ -31,7 +30,7 @@ onMounted(async () => {
...
@@ -31,7 +30,7 @@ onMounted(async () => {
});
});
const
selectItem
=
(
index
,
item
)
=>
{
const
selectItem
=
(
index
,
item
)
=>
{
selectedItem
.
value
=
index
;
selectedItem
.
value
=
index
;
emit
(
'
sort
Params'
,
item
);
emit
(
'
place
Params'
,
item
);
};
};
// 查询景点
// 查询景点
const
getTourList
=
()
=>
{
const
getTourList
=
()
=>
{
...
...
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
View file @
6176d44f
...
@@ -112,7 +112,7 @@
...
@@ -112,7 +112,7 @@
</view>
</view>
<Sort
v-show=
"rotate"
@
sortParams=
"sortParams"
/>
<Sort
v-show=
"rotate"
@
sortParams=
"sortParams"
/>
<DepartureDate
v-show=
"rotate2"
/>
<DepartureDate
v-show=
"rotate2"
/>
<ScenicSpots
v-show=
"rotate3"
/>
<ScenicSpots
v-show=
"rotate3"
@
placeParams=
"placeParams"
/>
<Screen
v-show=
"rotate4"
/>
<Screen
v-show=
"rotate4"
/>
</view>
</view>
<view
class=
"list-card"
>
<view
class=
"list-card"
>
...
@@ -172,6 +172,7 @@ const rotate4 = ref(false);
...
@@ -172,6 +172,7 @@ const rotate4 = ref(false);
const
cardList
=
ref
([]);
const
cardList
=
ref
([]);
const
popularRouterData
=
ref
([]);
const
popularRouterData
=
ref
([]);
const
sortType
=
ref
(
null
);
const
sortType
=
ref
(
null
);
const
attractionId
=
ref
(
null
);
const
locationFiltering
=
(
index
)
=>
{
const
locationFiltering
=
(
index
)
=>
{
switch
(
index
)
{
switch
(
index
)
{
case
0
:
case
0
:
...
@@ -201,6 +202,7 @@ const locationFiltering = (index) => {
...
@@ -201,6 +202,7 @@ const locationFiltering = (index) => {
}
}
if
(
index
===
0
)
{
if
(
index
===
0
)
{
sortType
.
value
=
null
;
sortType
.
value
=
null
;
attractionId
.
value
=
null
;
}
}
};
};
// 查询热门路线
// 查询热门路线
...
@@ -217,12 +219,19 @@ const sortParams = (sortMode) => {
...
@@ -217,12 +219,19 @@ const sortParams = (sortMode) => {
console
.
log
(
sortType
.
value
,
211
);
console
.
log
(
sortType
.
value
,
211
);
getProd
();
getProd
();
};
};
const
placeParams
=
(
id
)
=>
{
console
.
log
(
id
,
444
);
attractionId
.
value
=
id
;
console
.
log
(
attractionId
.
value
,
211
);
getProd
();
};
// 查询列表
// 查询列表
const
getProd
=
()
=>
{
const
getProd
=
()
=>
{
const
params
=
{
const
params
=
{
current
:
1
,
current
:
1
,
size
:
10
,
size
:
10
,
...(
sortType
.
value
!==
null
&&
{
sortType
:
sortType
.
value
.
sortMode
}),
...(
sortType
.
value
!==
null
&&
{
sortType
:
sortType
.
value
.
sortMode
}),
...(
attractionId
.
value
!==
null
&&
{
attractionId
:
attractionId
.
value
.
id
}),
};
};
console
.
log
(
params
,
222
);
console
.
log
(
params
,
222
);
getProdList
(
params
).
then
((
res
)
=>
{
getProdList
(
params
).
then
((
res
)
=>
{
...
...
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