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
9fc608eb
Commit
9fc608eb
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
2b11bf80
bf88562b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
16 deletions
+49
-16
DepartureDate.vue
src/Components/assistingAgriculture/index/DepartureDate.vue
+17
-2
ScenicSpots.vue
src/Components/assistingAgriculture/index/ScenicSpots.vue
+2
-2
Sort.vue
src/Components/assistingAgriculture/index/Sort.vue
+6
-6
village.js
src/api/assistingAgriculture/village.js
+9
-1
RuralTravel.vue
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
+15
-5
No files found.
src/Components/assistingAgriculture/index/DepartureDate.vue
View file @
9fc608eb
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<view
class=
"date"
>
出发日期
</view>
<view
class=
"date"
>
出发日期
</view>
<ul
class=
"ul"
>
<ul
class=
"ul"
>
<li
<li
v-for=
"(item, index) in
items
"
v-for=
"(item, index) in
dataList
"
:key=
"index"
:key=
"index"
:class=
"
{ active: selectedItem === index }"
:class=
"
{ active: selectedItem === index }"
@tap="selectItem(index)"
@tap="selectItem(index)"
...
@@ -16,18 +16,33 @@
...
@@ -16,18 +16,33 @@
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
{
defineProps
}
from
'vue'
;
import
{
defineProps
,
onMounted
}
from
'vue'
;
import
{
getStartDate
,
getTour
}
from
'@/api/assistingAgriculture/village'
;
const
items
=
reactive
([
'日期不限'
,
'今天'
,
'明天'
,
'一周内'
,
'一月内'
,
'本周末'
,
'七夕节'
]);
const
items
=
reactive
([
'日期不限'
,
'今天'
,
'明天'
,
'一周内'
,
'一月内'
,
'本周末'
,
'七夕节'
]);
const
selectedItem
=
ref
(
null
);
const
selectedItem
=
ref
(
null
);
const
dataList
=
ref
([]);
const
params
=
{
current
:
1
,
size
:
10
,
};
const
props
=
defineProps
({
const
props
=
defineProps
({
width
:
{
width
:
{
type
:
String
,
type
:
String
,
default
:
'100%'
,
default
:
'100%'
,
},
},
});
});
onMounted
(
async
()
=>
{
getStartDateList
();
});
const
selectItem
=
(
selectItem
)
=>
{
const
selectItem
=
(
selectItem
)
=>
{
selectedItem
.
value
=
selectItem
;
selectedItem
.
value
=
selectItem
;
};
};
// 查询景点
const
getStartDateList
=
()
=>
{
getStartDate
(
params
).
then
((
res
)
=>
{
dataList
.
value
=
res
.
data
;
});
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/Components/assistingAgriculture/index/ScenicSpots.vue
View file @
9fc608eb
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
:class=
"
{ active: selectedItem === index }"
:class=
"
{ active: selectedItem === index }"
@tap="selectItem(index)"
@tap="selectItem(index)"
>
>
{{
item
.
brief
}}
{{
item
.
attractionName
}}
</li>
</li>
</ul>
</ul>
</view>
</view>
...
@@ -35,7 +35,7 @@ const selectItem = (index, item) => {
...
@@ -35,7 +35,7 @@ const selectItem = (index, item) => {
};
};
// 查询景点
// 查询景点
const
getTourList
=
()
=>
{
const
getTourList
=
()
=>
{
getTour
(
{
prodId
:
0
}
).
then
((
res
)
=>
{
getTour
().
then
((
res
)
=>
{
placeList
.
value
=
res
.
data
;
placeList
.
value
=
res
.
data
;
});
});
};
};
...
...
src/Components/assistingAgriculture/index/Sort.vue
View file @
9fc608eb
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
v-for=
"(item, index) in items"
v-for=
"(item, index) in items"
:key=
"index"
:key=
"index"
:class=
"
{ active: selectedItem === index }"
:class=
"
{ active: selectedItem === index }"
@tap="selectItem(index)"
@tap="selectItem(index
, item
)"
>
>
{{
item
.
name
}}
{{
item
.
name
}}
</li>
</li>
...
@@ -16,11 +16,11 @@
...
@@ -16,11 +16,11 @@
<
script
setup
>
<
script
setup
>
import
{
defineProps
}
from
'vue'
;
import
{
defineProps
}
from
'vue'
;
const
items
=
ref
([
const
items
=
ref
([
{
name
:
'距离优先'
,
sortMode
l
:
1
},
{
name
:
'距离优先'
,
sortMode
:
1
},
{
name
:
'好评优先'
,
sortMode
l
:
2
},
{
name
:
'好评优先'
,
sortMode
:
2
},
{
name
:
'销量优先'
,
sortMode
l
:
3
},
{
name
:
'销量优先'
,
sortMode
:
3
},
{
name
:
'低价优先'
,
sortMode
l
:
4
},
{
name
:
'低价优先'
,
sortMode
:
4
},
{
name
:
'高价优先'
,
sortMode
l
:
5
},
{
name
:
'高价优先'
,
sortMode
:
5
},
]);
]);
const
emit
=
defineEmits
([
'sortParams'
]);
const
emit
=
defineEmits
([
'sortParams'
]);
const
selectedItem
=
ref
(
null
);
const
selectedItem
=
ref
(
null
);
...
...
src/api/assistingAgriculture/village.js
View file @
9fc608eb
...
@@ -3,7 +3,7 @@ import { request } from '../../utils/request';
...
@@ -3,7 +3,7 @@ import { request } from '../../utils/request';
// 查询景点
// 查询景点
export
function
getTour
(
data
)
{
export
function
getTour
(
data
)
{
return
request
({
return
request
({
url
:
`/sgyrdd/znprod/
tour
/list`
,
url
:
`/sgyrdd/znprod/
attraction
/list`
,
method
:
'GET'
,
method
:
'GET'
,
data
,
data
,
});
});
...
@@ -24,3 +24,11 @@ export function getProdList(data) {
...
@@ -24,3 +24,11 @@ export function getProdList(data) {
data
,
data
,
});
});
}
}
// 查询出发日期
export
function
getStartDate
(
data
)
{
return
request
({
url
:
`/sgyrdd/prod/startDate/page`
,
method
:
'GET'
,
data
,
});
}
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
View file @
9fc608eb
...
@@ -171,10 +171,6 @@ const rotate3 = ref(false);
...
@@ -171,10 +171,6 @@ const rotate3 = ref(false);
const
rotate4
=
ref
(
false
);
const
rotate4
=
ref
(
false
);
const
cardList
=
ref
([]);
const
cardList
=
ref
([]);
const
popularRouterData
=
ref
([]);
const
popularRouterData
=
ref
([]);
const
params
=
ref
({
current
:
1
,
size
:
10
,
});
const
sortType
=
ref
(
null
);
const
sortType
=
ref
(
null
);
const
locationFiltering
=
(
index
)
=>
{
const
locationFiltering
=
(
index
)
=>
{
switch
(
index
)
{
switch
(
index
)
{
...
@@ -203,6 +199,9 @@ const locationFiltering = (index) => {
...
@@ -203,6 +199,9 @@ const locationFiltering = (index) => {
rotate3
.
value
=
false
;
rotate3
.
value
=
false
;
break
;
break
;
}
}
if
(
index
===
0
)
{
sortType
.
value
=
null
;
}
};
};
// 查询热门路线
// 查询热门路线
const
getPopular
=
()
=>
{
const
getPopular
=
()
=>
{
...
@@ -213,9 +212,20 @@ const getPopular = () => {
...
@@ -213,9 +212,20 @@ const getPopular = () => {
popularRouterData
.
value
=
res
.
data
.
records
;
popularRouterData
.
value
=
res
.
data
.
records
;
});
});
};
};
const
sortParams
=
(
sortMode
)
=>
{
sortType
.
value
=
sortMode
;
console
.
log
(
sortType
.
value
,
211
);
getProd
();
};
// 查询列表
// 查询列表
const
getProd
=
()
=>
{
const
getProd
=
()
=>
{
getProdList
({
current
:
1
,
size
:
10
}).
then
((
res
)
=>
{
const
params
=
{
current
:
1
,
size
:
10
,
...(
sortType
.
value
!==
null
&&
{
sortType
:
sortType
.
value
.
sortMode
}),
};
console
.
log
(
params
,
222
);
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
;
});
});
...
...
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