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
490f77c1
Commit
490f77c1
authored
Aug 10, 2024
by
张娇(东信)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
乡村旅居热门路线接口联调
parent
4d8c1287
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
29 deletions
+80
-29
ScenicSpots.vue
src/Components/assistingAgriculture/index/ScenicSpots.vue
+17
-17
Sort.vue
src/Components/assistingAgriculture/index/Sort.vue
+12
-4
village.js
src/api/assistingAgriculture/village.js
+26
-0
RuralTravel.vue
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
+25
-7
presale.vue
src/pages/assistingAgriculture/index/presale.vue
+0
-1
No files found.
src/Components/assistingAgriculture/index/ScenicSpots.vue
View file @
490f77c1
...
@@ -8,27 +8,17 @@
...
@@ -8,27 +8,17 @@
:class=
"
{ active: selectedItem === index }"
:class=
"
{ active: selectedItem === index }"
@tap="selectItem(index)"
@tap="selectItem(index)"
>
>
{{
item
}}
{{
item
.
name
}}
</li>
</li>
</ul>
</ul>
</view>
</view>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
{
defineProps
}
from
'vue'
;
import
{
defineProps
,
onMounted
}
from
'vue'
;
const
items
=
reactive
([
import
{
getTour
}
from
'@/api/assistingAgriculture/village'
;
'智能排序'
,
const
items
=
ref
([]);
'距离优先'
,
const
emit
=
defineEmits
([
'sortParams'
]);
'好评优先'
,
'销量优先'
,
'低价优先'
,
'低价优先'
,
'距离优先'
,
'好评优先'
,
'销量优先'
,
'低价优先'
,
'距离优先'
,
]);
const
selectedItem
=
ref
(
null
);
const
selectedItem
=
ref
(
null
);
const
props
=
defineProps
({
const
props
=
defineProps
({
width
:
{
width
:
{
...
@@ -36,8 +26,18 @@ const props = defineProps({
...
@@ -36,8 +26,18 @@ const props = defineProps({
default
:
'100%'
,
default
:
'100%'
,
},
},
});
});
const
selectItem
=
(
selectItem
)
=>
{
onMounted
(
async
()
=>
{
selectedItem
.
value
=
selectItem
;
getTourList
();
});
const
selectItem
=
(
index
,
item
)
=>
{
selectedItem
.
value
=
index
;
emit
(
'sortParams'
,
item
);
};
// 查询景点
const
getTourList
=
()
=>
{
getTour
().
then
((
res
)
=>
{
console
.
log
(
res
,
111
);
});
};
};
</
script
>
</
script
>
...
...
src/Components/assistingAgriculture/index/Sort.vue
View file @
490f77c1
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
:class=
"
{ active: selectedItem === index }"
:class=
"
{ active: selectedItem === index }"
@tap="selectItem(index)"
@tap="selectItem(index)"
>
>
{{
item
}}
{{
item
.
name
}}
</li>
</li>
</ul>
</ul>
</view>
</view>
...
@@ -15,7 +15,14 @@
...
@@ -15,7 +15,14 @@
<
script
setup
>
<
script
setup
>
import
{
defineProps
}
from
'vue'
;
import
{
defineProps
}
from
'vue'
;
const
items
=
reactive
([
'智能排序'
,
'距离优先'
,
'好评优先'
,
'销量优先'
,
'低价优先'
,
'低价优先'
]);
const
items
=
ref
([
{
name
:
'距离优先'
,
sortName
:
'distance'
},
{
name
:
'好评优先'
,
sortName
:
'grade'
},
{
name
:
'销量优先'
,
sortName
:
'monthSoldNum'
},
{
name
:
'低价优先'
,
sortName
:
'lowPrice'
},
{
name
:
'高价优先'
,
sortName
:
'highPrice'
},
]);
const
emit
=
defineEmits
([
'sortParams'
]);
const
selectedItem
=
ref
(
null
);
const
selectedItem
=
ref
(
null
);
const
props
=
defineProps
({
const
props
=
defineProps
({
width
:
{
width
:
{
...
@@ -23,8 +30,9 @@ const props = defineProps({
...
@@ -23,8 +30,9 @@ const props = defineProps({
default
:
'100%'
,
default
:
'100%'
,
},
},
});
});
const
selectItem
=
(
selectItem
)
=>
{
const
selectItem
=
(
index
,
item
)
=>
{
selectedItem
.
value
=
selectItem
;
selectedItem
.
value
=
index
;
emit
(
'sortParams'
,
item
);
};
};
</
script
>
</
script
>
...
...
src/api/assistingAgriculture/village.js
0 → 100644
View file @
490f77c1
import
{
request
}
from
'../../utils/request'
;
// 查询景点
export
function
getTour
(
data
)
{
return
request
({
url
:
`/sgyrdd/znprod/tour/list`
,
method
:
'GET'
,
data
,
});
}
// 查询热门路线
export
function
getPopularList
(
data
)
{
return
request
({
url
:
`/sgyrdd/prod/popular`
,
method
:
'GET'
,
data
,
});
}
// 查询商品列表
export
function
getProdList
(
data
)
{
return
request
({
url
:
`/sgyrdd/prod/prodList`
,
method
:
'GET'
,
data
,
});
}
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
View file @
490f77c1
...
@@ -55,17 +55,13 @@
...
@@ -55,17 +55,13 @@
:scroll-with-animation=
"true"
:scroll-with-animation=
"true"
@
scroll=
"scroll"
@
scroll=
"scroll"
>
>
<view
class=
"foodCard"
v-for=
"(item, index) in
5
"
:key=
"index"
>
<view
class=
"foodCard"
v-for=
"(item, index) in
popularRouterData
"
:key=
"index"
>
<!--
<img-->
<!--
<img-->
<!-- class="img-icon"-->
<!-- class="img-icon"-->
<!-- src="/static/assistingAgriculture/rural/icon.png"-->
<!-- src="/static/assistingAgriculture/rural/icon.png"-->
<!-- style="width: 118rpx; height: 32rpx"-->
<!-- style="width: 118rpx; height: 32rpx"-->
<!-- />-->
<!-- />-->
<image
<image
class=
"test5"
:src=
"item.imgUrl"
mode=
"widthFix"
/>
class=
"test5"
src=
"/static/assistingAgriculture/rural/img4.png"
mode=
"widthFix"
/>
</view>
</view>
</scroll-view>
</scroll-view>
<!-- 列表-->
<!-- 列表-->
...
@@ -162,7 +158,13 @@ import Sort from '../../../components/assistingAgriculture/index/Sort.vue';
...
@@ -162,7 +158,13 @@ import Sort from '../../../components/assistingAgriculture/index/Sort.vue';
import
DepartureDate
from
'../../../components/assistingAgriculture/index/DepartureDate.vue'
;
import
DepartureDate
from
'../../../components/assistingAgriculture/index/DepartureDate.vue'
;
import
ScenicSpots
from
'../../../components/assistingAgriculture/index/ScenicSpots.vue'
;
import
ScenicSpots
from
'../../../components/assistingAgriculture/index/ScenicSpots.vue'
;
import
Screen
from
'../../../components/assistingAgriculture/index/Screen.vue'
;
import
Screen
from
'../../../components/assistingAgriculture/index/Screen.vue'
;
import
{
getPopularList
,
getProdList
,
getTour
}
from
'@/api/assistingAgriculture/village'
;
import
{
getPresaleList
}
from
'@/api/assistingAgriculture/building'
;
import
{
onMounted
}
from
'vue'
;
onMounted
(
async
()
=>
{
getProd
();
getPopular
();
});
const
rotate
=
ref
(
false
);
const
rotate
=
ref
(
false
);
const
rotate2
=
ref
(
false
);
const
rotate2
=
ref
(
false
);
const
rotate3
=
ref
(
false
);
const
rotate3
=
ref
(
false
);
...
@@ -209,6 +211,7 @@ const cardList = ref([
...
@@ -209,6 +211,7 @@ const cardList = ref([
price
:
'299.00'
,
price
:
'299.00'
,
},
},
]);
]);
const
popularRouterData
=
ref
([]);
const
locationFiltering
=
(
index
)
=>
{
const
locationFiltering
=
(
index
)
=>
{
switch
(
index
)
{
switch
(
index
)
{
case
0
:
case
0
:
...
@@ -237,6 +240,21 @@ const locationFiltering = (index) => {
...
@@ -237,6 +240,21 @@ const locationFiltering = (index) => {
break
;
break
;
}
}
};
};
// 查询热门路线
const
getPopular
=
()
=>
{
getPopularList
({
current
:
1
,
size
:
10
}).
then
((
res
)
=>
{
res
.
data
.
records
.
forEach
((
item
)
=>
{
item
.
imgUrl
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
pic
;
});
popularRouterData
.
value
=
res
.
data
.
records
;
});
};
// 查询商品列表
const
getProd
=
()
=>
{
getProdList
({
current
:
1
,
size
:
10
}).
then
((
res
)
=>
{
console
.
log
(
res
,
222
);
});
};
function
toRouteDetails
()
{
function
toRouteDetails
()
{
// TODO: 跳转到线路详情
// TODO: 跳转到线路详情
xma
.
navigateTo
({
xma
.
navigateTo
({
...
...
src/pages/assistingAgriculture/index/presale.vue
View file @
490f77c1
...
@@ -148,7 +148,6 @@ const params = {
...
@@ -148,7 +148,6 @@ const params = {
const
tabsList
=
ref
([]);
const
tabsList
=
ref
([]);
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
getPresale
();
getPresale
();
// getPresaleProd();
presaleSortList
();
presaleSortList
();
});
});
// 预售板块轮播图
// 预售板块轮播图
...
...
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