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
fd021984
Commit
fd021984
authored
Aug 12, 2024
by
刘玉宏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.platform.xinhuaapp.com/pengjiani/groupPurchase-miniapp
parents
4f691bbe
6313c6be
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
13 deletions
+28
-13
DepartureDate.vue
src/Components/assistingAgriculture/index/DepartureDate.vue
+15
-6
RuralTravel.vue
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
+13
-7
No files found.
src/Components/assistingAgriculture/index/DepartureDate.vue
View file @
fd021984
...
@@ -6,21 +6,25 @@
...
@@ -6,21 +6,25 @@
v-for=
"(item, index) in dataList"
v-for=
"(item, index) in dataList"
:key=
"index"
:key=
"index"
:class=
"
{ active: selectedItem === index }"
:class=
"
{ active: selectedItem === index }"
@tap="selectItem(index)"
@tap="selectItem(index
, item
)"
>
>
{{
item
}}
{{
item
}}
</li>
</li>
<wd-calendar
use-default-slot
v-model=
"value"
@
confirm=
"handleConfirm4"
>
<li>
选择日期
</li>
<li>
选择日期
</li>
</wd-calendar>
</ul>
</ul>
</view>
</view>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
{
defineProps
,
onMounted
}
from
'vue'
;
import
{
defineProps
,
onMounted
}
from
'vue'
;
import
{
getStartDate
,
getTour
}
from
'@/api/assistingAgriculture/village'
;
import
{
getStartDate
}
from
'@/api/assistingAgriculture/village'
;
const
items
=
reactive
([
'日期不限'
,
'今天'
,
'明天'
,
'一周内'
,
'一月内'
,
'本周末'
,
'七夕节'
]);
const
selectedItem
=
ref
(
null
);
const
selectedItem
=
ref
(
null
);
const
emit
=
defineEmits
([
'dataParams'
]);
const
dataList
=
ref
([]);
const
dataList
=
ref
([]);
const
value
=
ref
(
''
);
const
formatValue
=
ref
(
''
);
const
params
=
{
const
params
=
{
current
:
1
,
current
:
1
,
size
:
10
,
size
:
10
,
...
@@ -34,15 +38,20 @@ const props = defineProps({
...
@@ -34,15 +38,20 @@ const props = defineProps({
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
getStartDateList
();
getStartDateList
();
});
});
const
selectItem
=
(
selectItem
)
=>
{
const
selectItem
=
(
index
,
item
)
=>
{
selectedItem
.
value
=
selectItem
;
selectedItem
.
value
=
index
;
emit
(
'dataParams'
,
item
);
};
};
// 查询
景点
// 查询
出发日期
const
getStartDateList
=
()
=>
{
const
getStartDateList
=
()
=>
{
getStartDate
(
params
).
then
((
res
)
=>
{
getStartDate
(
params
).
then
((
res
)
=>
{
dataList
.
value
=
res
.
data
;
dataList
.
value
=
res
.
data
;
console
.
log
(
Object
.
keys
(
dataList
.
value
,
232
));
});
});
};
};
function
handleConfirm4
({
value
})
{
formatValue
.
value
=
new
Date
(
value
).
toString
();
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
View file @
fd021984
...
@@ -111,9 +111,9 @@
...
@@ -111,9 +111,9 @@
</view>
</view>
</view>
</view>
<Sort
v-show=
"rotate"
@
sortParams=
"sortParams"
/>
<Sort
v-show=
"rotate"
@
sortParams=
"sortParams"
/>
<DepartureDate
v-show=
"rotate2"
/>
<DepartureDate
v-show=
"rotate2"
@
dataParams=
"dataParams"
/>
<ScenicSpots
v-show=
"rotate3"
@
placeParams=
"placeParams"
/>
<ScenicSpots
v-show=
"rotate3"
@
placeParams=
"placeParams"
/>
<Screen
v-show=
"rotate4"
/>
<Screen
v-show=
"rotate4"
@
screenParams=
"screenParams"
/>
</view>
</view>
<view
class=
"list-card"
>
<view
class=
"list-card"
>
<view
<view
...
@@ -173,6 +173,7 @@ const cardList = ref([]);
...
@@ -173,6 +173,7 @@ const cardList = ref([]);
const
popularRouterData
=
ref
([]);
const
popularRouterData
=
ref
([]);
const
sortType
=
ref
(
null
);
const
sortType
=
ref
(
null
);
const
attractionId
=
ref
(
null
);
const
attractionId
=
ref
(
null
);
const
dateType
=
ref
(
null
);
const
locationFiltering
=
(
index
)
=>
{
const
locationFiltering
=
(
index
)
=>
{
switch
(
index
)
{
switch
(
index
)
{
case
0
:
case
0
:
...
@@ -203,6 +204,7 @@ const locationFiltering = (index) => {
...
@@ -203,6 +204,7 @@ const locationFiltering = (index) => {
if
(
index
===
0
)
{
if
(
index
===
0
)
{
sortType
.
value
=
null
;
sortType
.
value
=
null
;
attractionId
.
value
=
null
;
attractionId
.
value
=
null
;
dateType
.
value
=
null
;
}
}
};
};
// 查询热门路线
// 查询热门路线
...
@@ -214,15 +216,20 @@ const getPopular = () => {
...
@@ -214,15 +216,20 @@ const getPopular = () => {
popularRouterData
.
value
=
res
.
data
.
records
;
popularRouterData
.
value
=
res
.
data
.
records
;
});
});
};
};
// 智能排序
const
sortParams
=
(
sortMode
)
=>
{
const
sortParams
=
(
sortMode
)
=>
{
sortType
.
value
=
sortMode
;
sortType
.
value
=
sortMode
;
console
.
log
(
sortType
.
value
,
211
);
getProd
();
getProd
();
};
};
// 出发日期
const
dataParams
=
(
item
)
=>
{
console
.
log
(
item
,
333
);
dateType
.
value
=
item
;
getProd
();
};
// 景点
const
placeParams
=
(
id
)
=>
{
const
placeParams
=
(
id
)
=>
{
console
.
log
(
id
,
444
);
attractionId
.
value
=
id
;
attractionId
.
value
=
id
;
console
.
log
(
attractionId
.
value
,
211
);
getProd
();
getProd
();
};
};
// 查询列表
// 查询列表
...
@@ -232,14 +239,13 @@ const getProd = () => {
...
@@ -232,14 +239,13 @@ const getProd = () => {
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
}),
...(
attractionId
.
value
!==
null
&&
{
attractionId
:
attractionId
.
value
.
id
}),
...(
dateType
.
value
!==
null
&&
{
dateType
:
dateType
.
value
}),
};
};
console
.
log
(
params
,
222
);
getProdList
(
params
).
then
((
res
)
=>
{
getProdList
(
params
).
then
((
res
)
=>
{
res
.
data
.
records
.
forEach
((
item
)
=>
{
res
.
data
.
records
.
forEach
((
item
)
=>
{
item
.
img
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
pic
;
item
.
img
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
pic
;
});
});
cardList
.
value
=
res
.
data
.
records
;
cardList
.
value
=
res
.
data
.
records
;
console
.
log
(
res
,
222
);
});
});
};
};
function
toRouteDetails
()
{
function
toRouteDetails
()
{
...
...
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